Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build support for Nix and Guix #22

Closed
ingydotnet opened this issue Dec 29, 2023 · 7 comments
Closed

Build support for Nix and Guix #22

ingydotnet opened this issue Dec 29, 2023 · 7 comments
Assignees

Comments

@ingydotnet
Copy link
Member

ingydotnet commented Dec 29, 2023

The build system for YS is made to work with minimal dependencies: bash, make and curl is about all you need.
The make build command just works, because it uses curl to download, cache and configure: java, javac, jdk, native-image, lein, etc.
If any of these are already installed on the system, those items are ignored.
Only the downloaded versions are used.
This makes for an extremely simple and reliable build system.

However, I'm told this won't work for Nix and Guix. Maybe others?

The YS Makefile system is somewhat complex but also well structured. Every subdir has a Makefile, and all the common parts are included from common/*.mk files.

The important files to adjust here are common/vars.mk and common/clojure.mk.

We need to detect when we are building on Nix/Guix then use the system deps.

I imagine this comes down to not setting JAVA_HOME and PATH to the usual downloaded/cached /tmp/... values.

This is the limit of my understanding.
Creating this issue for others to weigh in on.

@xelxebar
Copy link

xelxebar commented Dec 30, 2023

Thanks for preemptively opening this. The main issue is that Nix and Guix builds are supposed to be 100% reproducible, meaning that the package spec will output the exact same binaries no matter when or where you build it. In particular, dependencies are pinned, so auto-downloading is a no-go.

At the very least, we probably want a switch that tells the build system to not download anything and rely on the build host to supply dependencies. I'll poke at this more later.

@xelxebar
Copy link

xelxebar commented Dec 30, 2023

Currently just sanity checking the build process. Stopped for now after hitting the below error, probably because graalvm stuff isn't on the classpath:

$ nix-shell -p graalvm-ce -p leiningen
$ (cd core; lein install)
...
$ (cd libyamlscript; lein uberjar)
Compiling libyamlscript.core
Compiling 1 source files to /home/x/devel/com.github/yaml/yamlscript/libyamlscript/target/classes
/home/x/devel/com.github/yaml/yamlscript/libyamlscript/src/libyamlscript/API.java:6: error: package org.graalvm.nativeimage.c.function does not exist
import org.graalvm.nativeimage.c.function.CEntryPoint;
                                         ^
...

@ingydotnet
Copy link
Member Author

I pushed a nix branch to allow you to run make build in a nix-shell environment.
Use make distclean sysclean build to make sure you are starting from scratch.
I get the same error as above, but the classpath looks the same on ubuntu as nix.
You can run make -C libyamlscript classpath to see the classpath that lein is using yourself.

[nix-shell:/yamlscript]# (IFS=:; printf '%s\n' $(make --no-print-directory -C libyamlscript/ classpath | tail -1))
Retrieving nrepl/nrepl/1.0.0/nrepl-1.0.0.pom from clojars
Retrieving org/nrepl/incomplete/0.1.0/incomplete-0.1.0.pom from clojars
Retrieving nrepl/nrepl/1.0.0/nrepl-1.0.0.jar from clojars
Retrieving org/nrepl/incomplete/0.1.0/incomplete-0.1.0.jar from clojars
/yamlscript/libyamlscript/test
/yamlscript/libyamlscript/src
/yamlscript/libyamlscript/dev-resources
/yamlscript/libyamlscript/resources
/yamlscript/libyamlscript/target/classes
/root/.m2/repository/org/nrepl/incomplete/0.1.0/incomplete-0.1.0.jar
/root/.m2/repository/org/flatland/ordered/1.15.11/ordered-1.15.11.jar
/root/.m2/repository/org/clojure/clojure/1.11.1/clojure-1.11.1.jar
/root/.m2/repository/borkdude/edamame/1.3.23/edamame-1.3.23.jar
/root/.m2/repository/nrepl/nrepl/1.0.0/nrepl-1.0.0.jar
/root/.m2/repository/org/yaml/snakeyaml/2.1/snakeyaml-2.1.jar
/root/.m2/repository/clj-commons/clj-yaml/1.0.27/clj-yaml-1.0.27.jar
/root/.m2/repository/org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar
/root/.m2/repository/org/babashka/sci.impl.types/0.0.2/sci.impl.types-0.0.2.jar
/root/.m2/repository/borkdude/sci.impl.reflector/0.0.1/sci.impl.reflector-0.0.1.jar
/root/.m2/repository/org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar
/root/.m2/repository/org/clojure/data.json/2.4.0/data.json-2.4.0.jar
/root/.m2/repository/org/snakeyaml/snakeyaml-engine/2.7/snakeyaml-engine-2.7.jar
/root/.m2/repository/yamlscript/core/0.1.34/core-0.1.34.jar
/root/.m2/repository/org/clojure/tools.reader/1.3.4/tools.reader-1.3.4.jar
/root/.m2/repository/org/babashka/sci/0.8.41/sci-0.8.41.jar

I see the same thing running inside docker run -it ubuntu.

root@94505090cf36:/yamlscript# (IFS=:; printf '%s\n' $(make --no-print-directory -C libyamlscript/ classpath | tail -1))
/yamlscript/libyamlscript/test
/yamlscript/libyamlscript/src
/yamlscript/libyamlscript/dev-resources
/yamlscript/libyamlscript/resources
/yamlscript/libyamlscript/target/classes
/root/.m2/repository/org/nrepl/incomplete/0.1.0/incomplete-0.1.0.jar
/root/.m2/repository/org/flatland/ordered/1.15.11/ordered-1.15.11.jar
/root/.m2/repository/org/clojure/clojure/1.11.1/clojure-1.11.1.jar
/root/.m2/repository/borkdude/edamame/1.3.23/edamame-1.3.23.jar
/root/.m2/repository/nrepl/nrepl/1.0.0/nrepl-1.0.0.jar
/root/.m2/repository/org/yaml/snakeyaml/2.1/snakeyaml-2.1.jar
/root/.m2/repository/clj-commons/clj-yaml/1.0.27/clj-yaml-1.0.27.jar
/root/.m2/repository/org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar
/root/.m2/repository/org/babashka/sci.impl.types/0.0.2/sci.impl.types-0.0.2.jar
/root/.m2/repository/borkdude/sci.impl.reflector/0.0.1/sci.impl.reflector-0.0.1.jar
/root/.m2/repository/org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar
/root/.m2/repository/org/clojure/data.json/2.4.0/data.json-2.4.0.jar
/root/.m2/repository/org/snakeyaml/snakeyaml-engine/2.7/snakeyaml-engine-2.7.jar
/root/.m2/repository/yamlscript/core/0.1.34/core-0.1.34.jar
/root/.m2/repository/org/clojure/tools.reader/1.3.4/tools.reader-1.3.4.jar
/root/.m2/repository/org/babashka/sci/0.8.41/sci-0.8.41.jar

I dug around for a while but was unable to get further.
The nix graalvm-ce package is not the one we download by default,
but I can use that one on ubuntu with:

root@94505090cf36:/yamlscript# make sysclean distclean build IS_ROOT=false GRAALVM_CE=1 GRAAL_VER=17

The contents of the graalvm dir are not nearly the same:

[nix-shell:/yamlscript]# which java
/nix/store/aj4pccwa8x81ypp34vrzimm18h6pczz3-graalvm11-ce-22.3.1/bin/java
[nix-shell:/yamlscript]# find /nix/store/aj4pccwa8x81ypp34vrzimm18h6pczz3-graalvm11-ce-22.3.1 -type f > /tmp/nix
[nix-shell:/yamlscript]# diff -u /tmp/ubuntu /tmp/nix
--- /tmp/ubuntu	2023-12-30 17:05:46.040114336 +0000
+++ /tmp/nix	2023-12-30 17:07:24.074865800 +0000
@@ -1,3 +1,40 @@
+GRAALVM-README.md
+LICENSE.txt
+LICENSE_NATIVEIMAGE.txt
+THIRD_PARTY_LICENSE.txt
+bin/.jar-wrapped
+bin/.jarsigner-wrapped
+bin/.java-wrapped
+bin/.javac-wrapped
+bin/.javadoc-wrapped
+bin/.javap-wrapped
+bin/.jcmd-wrapped
+bin/.jconsole-wrapped
+bin/.jdb-wrapped
+bin/.jdeprscan-wrapped
+bin/.jdeps-wrapped
+bin/.jfr-wrapped
+bin/.jhsdb-wrapped
+bin/.jimage-wrapped
+bin/.jinfo-wrapped
+bin/.jjs-wrapped
+bin/.jlink-wrapped
+bin/.jmap-wrapped
+bin/.jmod-wrapped
+bin/.jps-wrapped
+bin/.jrunscript-wrapped
+bin/.jshell-wrapped
+bin/.jstack-wrapped
+bin/.jstat-wrapped
+bin/.jstatd-wrapped
+bin/.keytool-wrapped
+bin/.native-image-wrapped_
+bin/.pack200-wrapped
+bin/.rmic-wrapped
+bin/.rmid-wrapped
+bin/.rmiregistry-wrapped
+bin/.serialver-wrapped
+bin/.unpack200-wrapped
 bin/jar
 bin/jarsigner
 bin/java
@@ -13,27 +50,29 @@
 bin/jhsdb
 bin/jimage
 bin/jinfo
+bin/jjs
 bin/jlink
 bin/jmap
 bin/jmod
-bin/jpackage
 bin/jps
 bin/jrunscript
 bin/jshell
 bin/jstack
 bin/jstat
 bin/jstatd
-bin/jwebserver
 bin/keytool
+bin/native-image
+bin/pack200
+bin/rmic
+bin/rmid
 bin/rmiregistry
 bin/serialver
-conf/jaxp.properties
+bin/unpack200
 conf/logging.properties
 conf/management/jmxremote.access
 conf/management/jmxremote.password.template
 conf/management/management.properties
 conf/net.properties
-conf/sdp/sdp.conf.template
 conf/security/java.policy
 conf/security/java.security
 conf/security/policy/README.txt
@@ -52,12 +91,11 @@
 include/linux/jawt_md.h
 include/linux/jni_md.h
 jmods/com.oracle.graal.graal_enterprise.jmod
-jmods/com.oracle.svm.enterprise.truffle.jmod
-jmods/com.oracle.svm.extraimage_enterprise.jmod
 jmods/com.oracle.svm.svm_enterprise.jmod
 jmods/com.oracle.svm_enterprise.ml_dataset.jmod
-jmods/com.oracle.truffle.enterprise.jmod
-jmods/com.oracle.truffle.enterprise.svm.jmod
+jmods/com.oracle.truffle.regex.jmod
+jmods/com.oracle.truffle.truffle_nfi.jmod
+jmods/com.oracle.truffle.truffle_nfi_libffi.jmod
 jmods/java.base.jmod
 jmods/java.compiler.jmod
 jmods/java.datatransfer.jmod
@@ -90,7 +128,6 @@
 jmods/jdk.editpad.jmod
 jmods/jdk.hotspot.agent.jmod
 jmods/jdk.httpserver.jmod
-jmods/jdk.incubator.vector.jmod
 jmods/jdk.internal.ed.jmod
 jmods/jdk.internal.jvmstat.jmod
 jmods/jdk.internal.le.jmod
@@ -98,6 +135,7 @@
 jmods/jdk.internal.vm.ci.jmod
 jmods/jdk.internal.vm.compiler.jmod
 jmods/jdk.internal.vm.compiler.management.jmod
+jmods/jdk.internal.vm.compiler.truffle.jfr.jmod
 jmods/jdk.jartool.jmod
 jmods/jdk.javadoc.jmod
 jmods/jdk.jcmd.jmod
@@ -107,7 +145,6 @@
 jmods/jdk.jdwp.agent.jmod
 jmods/jdk.jfr.jmod
 jmods/jdk.jlink.jmod
-jmods/jdk.jpackage.jmod
 jmods/jdk.jshell.jmod
 jmods/jdk.jsobject.jmod
 jmods/jdk.jstatd.jmod
@@ -116,10 +153,13 @@
 jmods/jdk.management.jfr.jmod
 jmods/jdk.management.jmod
 jmods/jdk.naming.dns.jmod
+jmods/jdk.naming.ldap.jmod
 jmods/jdk.naming.rmi.jmod
 jmods/jdk.net.jmod
-jmods/jdk.nio.mapmode.jmod
-jmods/jdk.random.jmod
+jmods/jdk.pack.jmod
+jmods/jdk.rmic.jmod
+jmods/jdk.scripting.nashorn.jmod
+jmods/jdk.scripting.nashorn.shell.jmod
 jmods/jdk.sctp.jmod
 jmods/jdk.security.auth.jmod
 jmods/jdk.security.jgss.jmod
@@ -127,11 +167,30 @@
 jmods/jdk.unsupported.jmod
 jmods/jdk.xml.dom.jmod
 jmods/jdk.zipfs.jmod
-jmods/org.graalvm.collections.jmod
-jmods/org.graalvm.extraimage.builder.jmod
-jmods/org.graalvm.nativeimage.jmod
-jmods/org.graalvm.truffle.compiler.jmod
-jmods/org.graalvm.word.jmod
+jmods/org.graalvm.js.scriptengine.jmod
+jmods/org.graalvm.locator.jmod
+jmods/org.graalvm.sdk.jmod
+jmods/org.graalvm.truffle.jmod
+languages/icu4j/icu4j-charset.jar
+languages/icu4j/icu4j.jar
+languages/icu4j/native-image.properties
+languages/nfi-libffi/include/trufflenfi.h
+languages/nfi-libffi/truffle-nfi-libffi.jar
+languages/nfi/builder/clibraries-libffi/include/ffi.h
+languages/nfi/builder/clibraries-libffi/include/ffitarget.h
+languages/nfi/builder/clibraries-libffi/include/svm_libffi.h
+languages/nfi/builder/clibraries-libffi/include/trufflenfi.h
+languages/nfi/builder/clibraries-libffi/libffi.a
+languages/nfi/builder/clibraries-none/.empty.h
+languages/nfi/builder/svm-libffi.jar
+languages/nfi/builder/svm-none.jar
+languages/nfi/include/trufflenfi.h
+languages/nfi/native-image.properties
+languages/nfi/release
+languages/nfi/truffle-nfi-none.jar
+languages/nfi/truffle-nfi.jar
+languages/regex/native-image.properties
+languages/regex/tregex.jar
 legal/java.base/ADDITIONAL_LICENSE_INFO
 legal/java.base/ASSEMBLY_EXCEPTION
 legal/java.base/LICENSE
@@ -158,7 +217,6 @@
 legal/java.desktop/lcms.md
 legal/java.desktop/libpng.md
 legal/java.desktop/mesa3d.md
-legal/java.desktop/pipewire.md
 legal/java.desktop/xwd.md
 legal/java.instrument/ADDITIONAL_LICENSE_INFO
 legal/java.instrument/ASSEMBLY_EXCEPTION
@@ -241,6 +299,7 @@
 legal/jdk.crypto.ec/ADDITIONAL_LICENSE_INFO
 legal/jdk.crypto.ec/ASSEMBLY_EXCEPTION
 legal/jdk.crypto.ec/LICENSE
+legal/jdk.crypto.ec/ecc.md
 legal/jdk.dynalink/ADDITIONAL_LICENSE_INFO
 legal/jdk.dynalink/ASSEMBLY_EXCEPTION
 legal/jdk.dynalink/LICENSE
@@ -254,9 +313,6 @@
 legal/jdk.httpserver/ADDITIONAL_LICENSE_INFO
 legal/jdk.httpserver/ASSEMBLY_EXCEPTION
 legal/jdk.httpserver/LICENSE
-legal/jdk.incubator.vector/ADDITIONAL_LICENSE_INFO
-legal/jdk.incubator.vector/ASSEMBLY_EXCEPTION
-legal/jdk.incubator.vector/LICENSE
 legal/jdk.internal.ed/ADDITIONAL_LICENSE_INFO
 legal/jdk.internal.ed/ASSEMBLY_EXCEPTION
 legal/jdk.internal.ed/LICENSE
@@ -274,12 +330,6 @@
 legal/jdk.internal.vm.ci/ADDITIONAL_LICENSE_INFO
 legal/jdk.internal.vm.ci/ASSEMBLY_EXCEPTION
 legal/jdk.internal.vm.ci/LICENSE
-legal/jdk.internal.vm.compiler.management/ADDITIONAL_LICENSE_INFO
-legal/jdk.internal.vm.compiler.management/ASSEMBLY_EXCEPTION
-legal/jdk.internal.vm.compiler.management/LICENSE
-legal/jdk.internal.vm.compiler/ADDITIONAL_LICENSE_INFO
-legal/jdk.internal.vm.compiler/ASSEMBLY_EXCEPTION
-legal/jdk.internal.vm.compiler/LICENSE
 legal/jdk.jartool/ADDITIONAL_LICENSE_INFO
 legal/jdk.jartool/ASSEMBLY_EXCEPTION
 legal/jdk.jartool/LICENSE
@@ -288,6 +338,8 @@
 legal/jdk.javadoc/LICENSE
 legal/jdk.javadoc/jquery.md
 legal/jdk.javadoc/jqueryUI.md
+legal/jdk.javadoc/jszip.md
+legal/jdk.javadoc/pako.md
 legal/jdk.jcmd/ADDITIONAL_LICENSE_INFO
 legal/jdk.jcmd/ASSEMBLY_EXCEPTION
 legal/jdk.jcmd/LICENSE
@@ -309,9 +361,6 @@
 legal/jdk.jlink/ADDITIONAL_LICENSE_INFO
 legal/jdk.jlink/ASSEMBLY_EXCEPTION
 legal/jdk.jlink/LICENSE
-legal/jdk.jpackage/ADDITIONAL_LICENSE_INFO
-legal/jdk.jpackage/ASSEMBLY_EXCEPTION
-legal/jdk.jpackage/LICENSE
 legal/jdk.jshell/ADDITIONAL_LICENSE_INFO
 legal/jdk.jshell/ASSEMBLY_EXCEPTION
 legal/jdk.jshell/LICENSE
@@ -338,18 +387,29 @@
 legal/jdk.naming.dns/ADDITIONAL_LICENSE_INFO
 legal/jdk.naming.dns/ASSEMBLY_EXCEPTION
 legal/jdk.naming.dns/LICENSE
+legal/jdk.naming.ldap/ADDITIONAL_LICENSE_INFO
+legal/jdk.naming.ldap/ASSEMBLY_EXCEPTION
+legal/jdk.naming.ldap/LICENSE
 legal/jdk.naming.rmi/ADDITIONAL_LICENSE_INFO
 legal/jdk.naming.rmi/ASSEMBLY_EXCEPTION
 legal/jdk.naming.rmi/LICENSE
 legal/jdk.net/ADDITIONAL_LICENSE_INFO
 legal/jdk.net/ASSEMBLY_EXCEPTION
 legal/jdk.net/LICENSE
-legal/jdk.nio.mapmode/ADDITIONAL_LICENSE_INFO
-legal/jdk.nio.mapmode/ASSEMBLY_EXCEPTION
-legal/jdk.nio.mapmode/LICENSE
-legal/jdk.random/ADDITIONAL_LICENSE_INFO
-legal/jdk.random/ASSEMBLY_EXCEPTION
-legal/jdk.random/LICENSE
+legal/jdk.pack/ADDITIONAL_LICENSE_INFO
+legal/jdk.pack/ASSEMBLY_EXCEPTION
+legal/jdk.pack/LICENSE
+legal/jdk.rmic/ADDITIONAL_LICENSE_INFO
+legal/jdk.rmic/ASSEMBLY_EXCEPTION
+legal/jdk.rmic/LICENSE
+legal/jdk.scripting.nashorn.shell/ADDITIONAL_LICENSE_INFO
+legal/jdk.scripting.nashorn.shell/ASSEMBLY_EXCEPTION
+legal/jdk.scripting.nashorn.shell/LICENSE
+legal/jdk.scripting.nashorn/ADDITIONAL_LICENSE_INFO
+legal/jdk.scripting.nashorn/ASSEMBLY_EXCEPTION
+legal/jdk.scripting.nashorn/LICENSE
+legal/jdk.scripting.nashorn/double-conversion.md
+legal/jdk.scripting.nashorn/joni.md
 legal/jdk.sctp/ADDITIONAL_LICENSE_INFO
 legal/jdk.sctp/ASSEMBLY_EXCEPTION
 legal/jdk.sctp/LICENSE
@@ -374,17 +434,30 @@
 lib/classlist
 lib/ct.sym
 lib/graal/graal-processor.jar
+lib/graal_isolate.h
+lib/graal_isolate_dynamic.h
+lib/graalvm/graal-hotspot-library.jar
+lib/graalvm/graal-truffle-compiler-libgraal.jar
 lib/graalvm/jvmti-agent-base.jar
+lib/graalvm/launcher-common.jar
 lib/graalvm/svm-agent.jar
 lib/graalvm/svm-configure.jar
 lib/graalvm/svm-diagnostics-agent.jar
 lib/graalvm/svm-driver.jar
+lib/installer/bin/gu
+lib/installer/components/org.graalvm.component
+lib/installer/components/org.graalvm.native-image.component
+lib/installer/components/polyglot/.registry
+lib/installer/installer.jar
+lib/installer/trufflejson.jar
 lib/jexec
 lib/jfr/default.jfc
 lib/jfr/profile.jfc
+lib/jli/libjli.so
 lib/jrt-fs.jar
 lib/jspawnhelper
 lib/jvm.cfg
+lib/jvmci/compiler-name
 lib/libattach.so
 lib/libawt.so
 lib/libawt_headless.so
@@ -402,19 +475,22 @@
 lib/libjawt.so
 lib/libjdwp.so
 lib/libjimage.so
-lib/libjli.so
 lib/libjsig.so
 lib/libjsound.so
-lib/libjsvml.so
+lib/libjvmcicompiler.h
 lib/libjvmcicompiler.so
+lib/libjvmcicompiler_dynamic.h
 lib/liblcms.so
-lib/lible.so
 lib/libmanagement.so
 lib/libmanagement_agent.so
 lib/libmanagement_ext.so
 lib/libmlib_image.so
+lib/libnative-image-agent.h
 lib/libnative-image-agent.so
+lib/libnative-image-agent_dynamic.h
+lib/libnative-image-diagnostics-agent.h
 lib/libnative-image-diagnostics-agent.so
+lib/libnative-image-diagnostics-agent_dynamic.h
 lib/libnet.so
 lib/libnio.so
 lib/libprefs.so
@@ -422,19 +498,26 @@
 lib/libsaproc.so
 lib/libsctp.so
 lib/libsplashscreen.so
-lib/libsyslookup.so
+lib/libsunec.so
+lib/libtrufflenfi.so
+lib/libunpack.so
 lib/libverify.so
 lib/libzip.so
 lib/modules
+lib/polyglot/bin/polyglot
+lib/polyglot/polyglot-native-api.jar
+lib/polyglot/polyglot_types.h
 lib/psfont.properties.ja
 lib/psfontj2d.properties
 lib/security/blocked.certs
 lib/security/cacerts
 lib/security/default.policy
 lib/security/public_suffix_list.dat
+lib/server/Xusage.txt
 lib/server/classes.jsa
 lib/server/libjsig.so
 lib/server/libjvm.so
+lib/server/vm.properties
 lib/src.zip
 lib/static/linux-amd64/glibc/libattach.a
 lib/static/linux-amd64/glibc/libawt.a
@@ -442,6 +525,7 @@
 lib/static/linux-amd64/glibc/libawt_xawt.a
 lib/static/linux-amd64/glibc/libdt_socket.a
 lib/static/linux-amd64/glibc/libextnet.a
+lib/static/linux-amd64/glibc/libfdlibm.a
 lib/static/linux-amd64/glibc/libfontmanager.a
 lib/static/linux-amd64/glibc/libinstrument.a
 lib/static/linux-amd64/glibc/libj2gss.a
@@ -454,13 +538,9 @@
 lib/static/linux-amd64/glibc/libjdwp.a
 lib/static/linux-amd64/glibc/libjimage.a
 lib/static/linux-amd64/glibc/libjli.a
-lib/static/linux-amd64/glibc/libjpackageapplauncher.a
-lib/static/linux-amd64/glibc/libjpackageapplauncheraux.a
 lib/static/linux-amd64/glibc/libjsig.a
 lib/static/linux-amd64/glibc/libjsound.a
-lib/static/linux-amd64/glibc/libjsvml.a
 lib/static/linux-amd64/glibc/liblcms.a
-lib/static/linux-amd64/glibc/lible.a
 lib/static/linux-amd64/glibc/libmanagement.a
 lib/static/linux-amd64/glibc/libmanagement_agent.a
 lib/static/linux-amd64/glibc/libmanagement_ext.a
@@ -472,7 +552,8 @@
 lib/static/linux-amd64/glibc/libsaproc.a
 lib/static/linux-amd64/glibc/libsctp.a
 lib/static/linux-amd64/glibc/libsplashscreen.a
-lib/static/linux-amd64/glibc/libsyslookup.a
+lib/static/linux-amd64/glibc/libsunec.a
+lib/static/linux-amd64/glibc/libunpack.a
 lib/static/linux-amd64/glibc/libverify.a
 lib/static/linux-amd64/glibc/libzip.a
 lib/static/linux-amd64/musl/libattach.a
@@ -481,6 +562,7 @@
 lib/static/linux-amd64/musl/libawt_xawt.a
 lib/static/linux-amd64/musl/libdt_socket.a
 lib/static/linux-amd64/musl/libextnet.a
+lib/static/linux-amd64/musl/libfdlibm.a
 lib/static/linux-amd64/musl/libfontmanager.a
 lib/static/linux-amd64/musl/libinstrument.a
 lib/static/linux-amd64/musl/libj2gss.a
@@ -493,13 +575,9 @@
 lib/static/linux-amd64/musl/libjdwp.a
 lib/static/linux-amd64/musl/libjimage.a
 lib/static/linux-amd64/musl/libjli.a
-lib/static/linux-amd64/musl/libjpackageapplauncher.a
-lib/static/linux-amd64/musl/libjpackageapplauncheraux.a
 lib/static/linux-amd64/musl/libjsig.a
 lib/static/linux-amd64/musl/libjsound.a
-lib/static/linux-amd64/musl/libjsvml.a
 lib/static/linux-amd64/musl/liblcms.a
-lib/static/linux-amd64/musl/lible.a
 lib/static/linux-amd64/musl/libmanagement.a
 lib/static/linux-amd64/musl/libmanagement_agent.a
 lib/static/linux-amd64/musl/libmanagement_ext.a
@@ -511,17 +589,17 @@
 lib/static/linux-amd64/musl/libsaproc.a
 lib/static/linux-amd64/musl/libsctp.a
 lib/static/linux-amd64/musl/libsplashscreen.a
-lib/static/linux-amd64/musl/libsyslookup.a
+lib/static/linux-amd64/musl/libsunec.a
+lib/static/linux-amd64/musl/libunpack.a
 lib/static/linux-amd64/musl/libverify.a
 lib/static/linux-amd64/musl/libzip.a
-lib/svm-preview/builder/svm-foreign.jar
 lib/svm/LICENSE_NATIVEIMAGE.txt
 lib/svm/bin/native-image
 lib/svm/bin/native-image-configure
+lib/svm/bin/rebuild-images
 lib/svm/builder/clibraries/linux-amd64/include/aarch64cpufeatures.h
 lib/svm/builder/clibraries/linux-amd64/include/amd64cpufeatures.h
 lib/svm/builder/clibraries/linux-amd64/include/amd64hotspotcpuinfo.h
-lib/svm/builder/clibraries/linux-amd64/include/riscv64cpufeatures.h
 lib/svm/builder/clibraries/linux-amd64/libjvm.a
 lib/svm/builder/clibraries/linux-amd64/liblibchelper.a
 lib/svm/builder/lib/libreporterchelper.so
@@ -533,21 +611,39 @@
 lib/svm/clibraries/linux-amd64/include/aarch64cpufeatures.h
 lib/svm/clibraries/linux-amd64/include/amd64cpufeatures.h
 lib/svm/clibraries/linux-amd64/include/amd64hotspotcpuinfo.h
-lib/svm/clibraries/linux-amd64/include/riscv64cpufeatures.h
 lib/svm/clibraries/linux-amd64/libjvm.a
 lib/svm/clibraries/linux-amd64/liblibchelper.a
 lib/svm/library-support.jar
+lib/svm/macros/gu-launcher/native-image.properties
+lib/svm/macros/jvmcicompiler-library/native-image.properties
 lib/svm/macros/native-image-agent-library/native-image.properties
 lib/svm/macros/native-image-configure-launcher/native-image.properties
 lib/svm/macros/native-image-diagnostics-agent-library/native-image.properties
 lib/svm/macros/native-image-launcher/native-image.properties
-lib/svm/macros/truffle-svm/builder/include/ffi.h
-lib/svm/macros/truffle-svm/builder/include/ffitarget.h
-lib/svm/macros/truffle-svm/builder/include/svm_libffi.h
-lib/svm/macros/truffle-svm/builder/include/trufflenfi.h
-lib/svm/macros/truffle-svm/builder/libffi.a
-lib/svm/macros/truffle-svm/native-image.properties
-lib/truffle/builder/truffle-runtime-svm.jar
-lib/truffle/truffle-compiler.jar
+lib/svm/macros/polyglot-launcher/native-image.properties
+lib/svm/macros/polyglot-library/native-image.properties
+lib/svm/macros/polyglot-library/polynative-libpolyglot-macro.jar
+lib/svm/macros/truffle/native-image.properties
+lib/truffle/locator.jar
+lib/truffle/truffle-api.jar
+lib/truffle/truffle-dsl-processor.jar
+lib/truffle/truffle-tck.jar
 lib/tzdb.dat
+nix-support/propagated-build-inputs
+nix-support/setup-hook
 release
+tools/chromeinspector/chromeinspector.jar
+tools/chromeinspector/native-image.properties
+tools/coverage/native-image.properties
+tools/coverage/truffle-coverage.jar
+tools/dap/dap.jar
+tools/dap/native-image.properties
+tools/insight/insight.jar
+tools/insight/native-image.properties
+tools/insightheap/insight-heap.jar
+tools/insightheap/native-image.properties
+tools/lsp/lsp-api.jar
+tools/lsp/lsp.jar
+tools/lsp/native-image.properties
+tools/profiler/native-image.properties
+tools/profiler/truffle-profiler.jar

Hopefully that gives you some ideas for where to dig next.

I'd prefer that you do further testing using make build now that it adjusts for Nix.
Up to you but when we solve it I want to roll it into the Makefile.

@xelxebar
Copy link

@ingydotnet Thanks for poking around. I think we just need to tell lein about graalvm. I believe Nix defines some classpath munging stuff for just this kind of thing. Will take a look.

BTW, trying to ad hoc detect Nix like in the nix branch is just a recipe for pain. In my years as a Guix package maintainer, trust me when I say that we instead want to add general knobs for enabling reproducible builds. That said, the work you did with IS_NIX should give some good pointers in that direction.

Cheers!

@ingydotnet
Copy link
Member Author

@xelxebar sounds good!

@xelxebar
Copy link

xelxebar commented Jan 4, 2024

Started a PR: #29. Moving discussion there.

@ingydotnet
Copy link
Member Author

Closing this issue. Moved to #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants