oracle / graal

GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources πŸš€
https://www.graalvm.org
Other
20.44k stars 1.64k forks source link

Cannot build native image with GraalPython on macOS #7108

Closed sgammon closed 1 year ago

sgammon commented 1 year ago

Reproducer

For this one, I used the hello-graal sample in the graalvm-demos repository:

git clone git@github.com:graalvm/graalvm-demos.git
cd graalvm-demos/hello-graal
$JAVA_HOME/bin/javac -d build src/com/hello/Graal.java
$JAVA_HOME/bin/jar cfvm Hello.jar manifest.txt -C build .
$JAVA_HOME/bin/native-image -jar Hello.jar --language:python

Results in:

The build process encountered an unexpected error:

> java.lang.RuntimeException: There was an error linking the native image: Linker command exited with 1

Linker command executed:
/usr/bin/cc -Wl,-U,___darwin_check_fd_set_overflow -fuse-ld=/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/llvm/bin/ld64.lld -Wl,-exported_symbols_list -Wl,/var/folders/ct/zjhyfpmn6jv_13qq5l2l82sh0000gn/T/SVM-17423389787033617584/exported_symbols.list -Wl,-x -arch arm64 -o /Volumes/VAULTROOM/samples/graalvm/graalvm-demos/hello-graal/Hello Hello.o /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libnet.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libjaas.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libextnet.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libnio.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libmanagement_ext.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/liblibchelper.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libjava.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/builder/clibraries-libffi/libffi.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libfdlibm.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libzip.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libjvm.a -v -L/var/folders/ct/zjhyfpmn6jv_13qq5l2l82sh0000gn/T/SVM-17423389787033617584 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/builder/clibraries-libffi -Wl,-framework,CoreServices -ldl -lpthread -Wl,-framework,Foundation -lz

Linker command output:
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/llvm/bin/ld64.lld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch arm64 -platform_version macos 13.0.0 13.3 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -o /Volumes/VAULTROOM/samples/graalvm/graalvm-demos/hello-graal/Hello -L/var/folders/ct/zjhyfpmn6jv_13qq5l2l82sh0000gn/T/SVM-17423389787033617584 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/builder/clibraries-libffi -L/usr/local/lib -U ___darwin_check_fd_set_overflow -exported_symbols_list /var/folders/ct/zjhyfpmn6jv_13qq5l2l82sh0000gn/T/SVM-17423389787033617584/exported_symbols.list -x Hello.o /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libnet.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libjaas.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libextnet.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libnio.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libmanagement_ext.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/liblibchelper.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libjava.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/builder/clibraries-libffi/libffi.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libfdlibm.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libzip.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libjvm.a -framework CoreServices -ldl -lpthread -framework Foundation -lz -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.3/lib/darwin/libclang_rt.osx.a
ld64.lld: error: undefined symbol: _objc_msgSend$operatingSystemVersion
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _operatingSystemVersion+0x28)

ld64.lld: error: undefined symbol: _objc_msgSend$processInfo
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _operatingSystemVersion+0x1c)

ld64.lld: error: undefined symbol: _objc_msgSend$UTF8String
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatform+0x2c)
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatformFallback+0x2c)

ld64.lld: error: undefined symbol: _objc_msgSend$objectForKey:
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatform+0x28)
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatformFallback+0x28)

ld64.lld: error: undefined symbol: _objc_msgSend$dictionaryWithContentsOfFile:
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatform+0x18)
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatformFallback+0x18)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

GraalVM Native Image Error Report

Build Output

========================================================================================================================
GraalVM Native Image: Generating 'Hello' (executable)...
========================================================================================================================
[1/8] Initializing...                                                                                    (5.7s @ 0.28GB)
 Java version: 20.0.2+9, vendor version: Oracle GraalVM 20.0.2+9.1
 Graal compiler: optimization level: 2, target machine: armv8-a, PGO: off
 C compiler: cc (apple, arm64, 14.0.3)
 Garbage collector: Serial GC (max heap size: 80% of RAM)
 5 user-specific feature(s)
 - com.oracle.graal.python.BouncyCastleFeature
 - com.oracle.svm.truffle.ICU4JFeature: Provides support for ICU4J library.
 - com.oracle.svm.truffle.TruffleBaseFeature: Provides base support for Truffle
 - com.oracle.svm.truffle.TruffleFeature: Enables compilation of Truffle ASTs to machine code
 - org.graalvm.home.HomeFinderFeature: Finds GraalVM paths and its version number
[2/8] Performing analysis...  [********]                                                              (155.8s @ 10.47GB)
  41,022 (96.92%) of 42,325 types reachable
  60,546 (63.29%) of 95,662 fields reachable
 187,122 (73.31%) of 255,256 methods reachable
  29,362 (11.50%) of 255,256 methods included for runtime compilation
  11,587 types,   105 fields, and 3,401 methods registered for reflection
      86 types,    69 fields, and   228 methods registered for JNI access
       5 native libraries: -framework CoreServices, -framework Foundation, dl, pthread, z
[3/8] Building universe...                                                                              (3.6s @ 11.90GB)
[4/8] Parsing methods...      [***]                                                                      (7.7s @ 9.08GB)
[5/8] Inlining methods...     [****]                                                                     (3.7s @ 6.14GB)
[6/8] Compiling methods...    [************]                                                          (140.6s @ 13.21GB)
[7/8] Layouting methods...    [****]                                                                    (19.6s @ 9.95GB)
[8/8] Creating image...       [****
]                                                                     (0.0s @ 6.66GB)

Stack Trace

java.lang.RuntimeException: There was an error linking the native image: Linker command exited with 1

Linker command executed:
/usr/bin/cc -Wl,-U,___darwin_check_fd_set_overflow -fuse-ld=/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/llvm/bin/ld64.lld -Wl,-exported_symbols_list -Wl,/var/folders/ct/zjhyfpmn6jv_13qq5l2l82sh0000gn/T/SVM-17423389787033617584/exported_symbols.list -Wl,-x -arch arm64 -o /Volumes/VAULTROOM/samples/graalvm/graalvm-demos/hello-graal/Hello Hello.o /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libnet.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libjaas.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libextnet.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libnio.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libmanagement_ext.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/liblibchelper.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libjava.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/builder/clibraries-libffi/libffi.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libfdlibm.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libzip.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libjvm.a -v -L/var/folders/ct/zjhyfpmn6jv_13qq5l2l82sh0000gn/T/SVM-17423389787033617584 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/builder/clibraries-libffi -Wl,-framework,CoreServices -ldl -lpthread -Wl,-framework,Foundation -lz

Linker command output:
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/llvm/bin/ld64.lld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch arm64 -platform_version macos 13.0.0 13.3 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -o /Volumes/VAULTROOM/samples/graalvm/graalvm-demos/hello-graal/Hello -L/var/folders/ct/zjhyfpmn6jv_13qq5l2l82sh0000gn/T/SVM-17423389787033617584 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64 -L/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/builder/clibraries-libffi -L/usr/local/lib -U ___darwin_check_fd_set_overflow -exported_symbols_list /var/folders/ct/zjhyfpmn6jv_13qq5l2l82sh0000gn/T/SVM-17423389787033617584/exported_symbols.list -x Hello.o /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libnet.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libjaas.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libextnet.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libnio.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libmanagement_ext.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/liblibchelper.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libjava.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/builder/clibraries-libffi/libffi.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libfdlibm.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/static/darwin-aarch64/libzip.a /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libjvm.a -framework CoreServices -ldl -lpthread -framework Foundation -lz -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.3/lib/darwin/libclang_rt.osx.a
ld64.lld: error: undefined symbol: _objc_msgSend$operatingSystemVersion
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _operatingSystemVersion+0x28)

ld64.lld: error: undefined symbol: _objc_msgSend$processInfo
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _operatingSystemVersion+0x1c)

ld64.lld: error: undefined symbol: _objc_msgSend$UTF8String
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatform+0x2c)
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatformFallback+0x2c)

ld64.lld: error: undefined symbol: _objc_msgSend$objectForKey:
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatform+0x28)
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatformFallback+0x28)

ld64.lld: error: undefined symbol: _objc_msgSend$dictionaryWithContentsOfFile:
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatform+0x18)
>>> referenced by /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64/libdarwin.a(foundation.o):(symbol _systemVersionPlatformFallback+0x18)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.handleLinkerFailure(NativeImageViaCC.java:204)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.runLinkerCommand(NativeImageViaCC.java:151)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.write(NativeImageViaCC.java:121)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:724)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:539)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:408)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:612)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:134)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)

GraalVM Setup

Name Value
Java version 20.0.2+9
Vendor version Oracle GraalVM 20.0.2+9.1
Runtime version 20.0.2+9-jvmci-23.0-b14
C compiler cc (apple, arm64, 14.0.3)
GraalVM release file ``` IMPLEMENTOR="Oracle Corporation" JAVA_RUNTIME_VERSION="20.0.2+9-jvmci-23.0-b14" JAVA_VERSION="20.0.2" JAVA_VERSION_DATE="2023-07-18" LIBC="default" MODULES="java.base java.logging java.management jdk.internal.vm.ci java.compiler java.instrument jdk.jfr jdk.unsupported org.graalvm.sdk java.datatransfer java.xml java.prefs java.desktop java.transaction.xa java.sql jdk.management org.graalvm.truffle jdk.internal.vm.compiler com.oracle.graal.graal_enterprise com.oracle.svm.extraimage_enterprise java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.sql.rowset java.xml.crypto java.se java.smartcardio jdk.accessibility jdk.internal.jvmstat jdk.attach jdk.charsets jdk.zipfs jdk.compiler jdk.crypto.ec jdk.crypto.cryptoki jdk.dynalink jdk.internal.ed jdk.editpad jdk.hotspot.agent jdk.httpserver jdk.incubator.concurrent jdk.incubator.vector jdk.internal.le jdk.internal.opt jdk.internal.vm.compiler.management jdk.internal.vm.compiler.truffle.jfr jdk.jartool jdk.javadoc jdk.jcmd jdk.management.agent jdk.jconsole jdk.jdeps jdk.jdwp.agent jdk.jdi jdk.jlink jdk.jpackage jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.jfr jdk.naming.dns jdk.naming.rmi jdk.net jdk.nio.mapmode jdk.random jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported.desktop jdk.xml.dom org.graalvm.extraimage.builder org.graalvm.js.scriptengine org.graalvm.locator org.graalvm.nativeimage.llvm" OS_ARCH="aarch64" OS_NAME="Darwin" SOURCE=".:git:f55ce2499dcd open:git:7b592588cb4e labsjdk-builder:22a57feecf74f195f6c7f571ff466a44ef8b2303 compiler:bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b graal-enterprise:3f39d8a776a32345a9ed475d766179e1cd5e7fe0 graal-js:b8af554c627475fb02bf2d7820239d5e9b488bcb graal-microservices:3f39d8a776a32345a9ed475d766179e1cd5e7fe0 java-benchmarks:bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b regex:bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b sdk:bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b substratevm:bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b substratevm-enterprise:3f39d8a776a32345a9ed475d766179e1cd5e7fe0 substratevm-enterprise-gcs:c55803e351323c2e16a4689700cb152afbe114eb tools:bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b tools-enterprise:3f39d8a776a32345a9ed475d766179e1cd5e7fe0 truffle:bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b vm:bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b vm-enterprise:3f39d8a776a32345a9ed475d766179e1cd5e7fe0" GRAALVM_VERSION="23.0.1" COMMIT_INFO={"compiler": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689064339, "commit.rev": "bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b"}, "graal-enterprise": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689072039, "commit.rev": "3f39d8a776a32345a9ed475d766179e1cd5e7fe0"}, "graal-js": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689063743, "commit.rev": "b8af554c627475fb02bf2d7820239d5e9b488bcb"}, "graal-microservices": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689072039, "commit.rev": "3f39d8a776a32345a9ed475d766179e1cd5e7fe0"}, "java-benchmarks": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689064339, "commit.rev": "bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b"}, "regex": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689064339, "commit.rev": "bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b"}, "sdk": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689064339, "commit.rev": "bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b"}, "substratevm": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689064339, "commit.rev": "bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b"}, "substratevm-enterprise": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689072039, "commit.rev": "3f39d8a776a32345a9ed475d766179e1cd5e7fe0"}, "substratevm-enterprise-gcs": {"commit.committer": "Christian Haeubl ", "commit.committer-ts": 1674227214, "commit.rev": "c55803e351323c2e16a4689700cb152afbe114eb"}, "tools": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689064339, "commit.rev": "bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b"}, "tools-enterprise": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689072039, "commit.rev": "3f39d8a776a32345a9ed475d766179e1cd5e7fe0"}, "truffle": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689064339, "commit.rev": "bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b"}, "vm": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689064339, "commit.rev": "bb8edf225d75ec3b317bbe7e830c3a3d6c8a772b"}, "vm-enterprise": {"commit.committer": "Marouane El Hallaoui ", "commit.committer-ts": 1689072039, "commit.rev": "3f39d8a776a32345a9ed475d766179e1cd5e7fe0"}} component_catalog="rest://gds.oracle.com/api/20220101/|uln://linux-update.oracle.com/rpc/api/?linux=generic_linux_x86_64_graalvm_jdk20&macos=macos_64_graalvm_jdk20&windows=windows_64_graalvm_jdk20|https://www.graalvm.org/component-catalog/v2/graal-updater-ee-component-catalog-java20.properties" GDS_PRODUCT_ID="D53FAE8052773FFAE0530F15000AA6C6" ```

Builder Setup

Class path ``` /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/icu4j/icu4j.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/icu4j/icu4j-charset.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/regex/tregex.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/truffle-nfi.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi-libffi/truffle-nfi-libffi.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/llvm/sulong-native.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/llvm/sulong-core.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/llvm/sulong-api.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/llvm/sulong-managed.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/llvm/sulong-nfi.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/llvm/sulong-enterprise-native.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/llvm/sulong-enterprise.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/bouncycastle-pkix.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/bouncycastle-provider.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/graalpython.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/xz-1.8.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/graalpython-enterprise.jar /Volumes/VAULTROOM/samples/graalvm/graalvm-demos/hello-graal/Hello.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/builder/svm-libffi.jar ```
Module path ``` /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/graal-microservices.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/library-support.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/truffle/truffle-api.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/builder/svm.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/builder/native-image-base.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/builder/objectfile.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/builder/svm-enterprise.jar /Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/builder/pointsto.jar ```
Builder arguments ``` -H:CLibraryPath=/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/clibraries/darwin-aarch64 -H:Path=/Volumes/VAULTROOM/samples/graalvm/graalvm-demos/hello-graal -H:Name@manifest from file:///Volumes/VAULTROOM/samples/graalvm/graalvm-demos/hello-graal/Hello.jar=Hello -H:Class@manifest from file:///Volumes/VAULTROOM/samples/graalvm/graalvm-demos/hello-graal/Hello.jar=com.hello.Graal -H:Features@--macro:truffle@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/macros/truffle/=com.oracle.svm.truffle.TruffleFeature,com.oracle.svm.truffle.TruffleBaseFeature,org.graalvm.home.HomeFinderFeature -H:MaxRuntimeCompileMethods@--macro:truffle@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/macros/truffle/=2500 -H:ClassInitialization@--macro:truffle@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/macros/truffle/=com.oracle.truffle:build_time -H:ClassInitialization@--macro:truffle@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/macros/truffle/=org.graalvm.shadowed.org.jcodings:build_time -H:ClassInitialization@--macro:truffle@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/macros/truffle/=com.oracle.truffle.tools.utils.json:build_time -H:ClassInitialization@--macro:truffle@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/macros/truffle/=org.graalvm.shadowed.org.jline:build_time,org.graalvm.shadowed.org.fusesource.jansi:build_time -H:ClassInitialization@--macro:truffle@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/macros/truffle/=sun.rmi:run_time -H:ClassInitialization@--macro:truffle@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/macros/truffle/=java.rmi:run_time -H:Features@--language:icu4j@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/icu4j/=com.oracle.svm.truffle.ICU4JFeature -H:ServiceLoaderFeatureExcludeServiceProviders@--language:icu4j@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/icu4j/=com.ibm.icu.charset.CharsetProviderICU -H:MaxRuntimeCompileMethods@--language:regex@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/regex/=900 -H:ClassInitialization@--language:regex@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/regex/=com.oracle.truffle.regex:build_time -H:CLibraryPath@--language:nfi@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/=/Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/builder/clibraries-libffi -H:MaxRuntimeCompileMethods@--language:nfi@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/nfi/=600 -H:MaxRuntimeCompileMethods@--language:llvm@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/llvm/=10000 -H:+AddAllCharsets@--language:llvm@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/llvm/ -H:ClassInitialization@--language:llvm@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/llvm/=com.oracle.truffle.llvm:build_time,org.antlr.v4.runtime:build_time -H:MaxRuntimeCompileMethods@--language:python@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/=20000 -H:+AddAllCharsets@--language:python@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/ -H:IncludeLocales@--language:python@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/=no,be,ro,ru,es,se,in,ka,hu,hr,bg,is,mk,da,nn,cs,sq,fr,pl,fo,bs,kl,fa,sv,it,uk,af,tg,ps,de -H:ClassInitialization@--language:python@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/=com.oracle.graal.python:build_time,com.oracle.truffle.regex:build_time,jline:build_time,org.fusesource:build_time -H:ReflectionConfigurationResources@--language:python@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/=com/oracle/graal/python/resources/reflect-config.json -H:ResourceConfigurationResources@--language:python@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/=com/oracle/graal/python/resources/resource-config.json -H:JNIConfigurationResources@--language:python@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/=com/oracle/graal/python/resources/jni-config.json -H:Features@--language:python@file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/languages/python/=com.oracle.graal.python.BouncyCastleFeature -H:FallbackThreshold=0 -H:Features@jar:file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/thirdparty/native-image.properties=com.oracle.svm.thirdparty.gson.GsonFeature -H:Features@jar:file:///Library/Java/JavaVirtualMachines/gvm.jdk20/Contents/Home/lib/svm/library-support.jar!/META-INF/native-image/com.oracle.svm/polyglot/native-image.properties=com.oracle.svm.polyglot.groovy.GroovyIndyInterfaceFeature,com.oracle.svm.polyglot.scala.ScalaFeature -H:+BuildOutputColorful -H:+BuildOutputProgress -H:+BuildOutputLinks ```
Builder properties ``` -Dcom.oracle.graalvm.isaot=true -Dgraalvm.ForcePolyglotInvalid=false -Dgraalvm.ForcePolyglotInvalid=true -Dgraalvm.locatorDisabled=true -Djava.awt.headless=true -Djava.lang.invoke.InnerClassLambdaMetafactory.initializeLambdas=false -Djava.system.class.loader=com.oracle.svm.hosted.NativeImageSystemClassLoader -Djdk.internal.lambda.disableEagerInitialization=true -Djdk.internal.lambda.eagerlyInitialize=false -Djdk.module.main=org.graalvm.nativeimage.builder -Dorg.graalvm.vendor=Oracle Corporation -Dorg.graalvm.vendorurl=https://www.graalvm.org/ -Dorg.graalvm.vendorversion=Oracle GraalVM 20.0.2+9.1 -Dorg.graalvm.version=23.0.1 -Dpolyglot.image-build-time.PreinitializeContexts=python -Dsubstratevm.IgnoreGraalVersionCheck=true -Dtruffle.TruffleRuntime=com.oracle.svm.truffle.api.SubstrateTruffleRuntime -Dtruffle.TruffleRuntime=com.oracle.truffle.api.impl.DefaultTruffleRuntime -Dtruffle.TrustAllTruffleRuntimeProviders=true ```
Features enabled ``` com.oracle.graal.python.BouncyCastleFeature, [] com.oracle.svm.core.IsolateArgumentParserFeature, [] com.oracle.svm.core.IsolateListenerFeature, [com.oracle.svm.core.IsolateListenerSupportFeature] com.oracle.svm.core.IsolateListenerSupportFeature, [] com.oracle.svm.core.RuntimeAssertionsSupportFeature, [] com.oracle.svm.core.StaticFieldsFeature, [] com.oracle.svm.core.StaticFieldsSupportFeature, [] com.oracle.svm.core.SubstrateExitHandlerFeature, [] com.oracle.svm.core.SubstrateSegfaultHandlerFeature, [com.oracle.svm.core.IsolateListenerSupportFeature] com.oracle.svm.core.UniqueShortNameProviderDefaultImplFeature, [] com.oracle.svm.core.UnsafeMemoryUtilFeature, [] com.oracle.svm.core.aarch64.AArch64FrameAccessFeature, [] com.oracle.svm.core.allocationprofile.AllocationProfilingFeature, [com.oracle.svm.core.jdk.RuntimeSupportFeature] com.oracle.svm.core.c.CTypeConversionSupportImplFeature, [] com.oracle.svm.core.c.ProjectHeaderFileHeaderResolversRegistryFeature, [] com.oracle.svm.core.c.function.IsolateSupportImplFeature, [] com.oracle.svm.core.code.CodeInfoFeature, [com.oracle.svm.core.util.CounterFeature] com.oracle.svm.core.code.CodeInfoMemoryWalkerFeature, [] com.oracle.svm.core.code.InstalledCodeObserverSupportFeature, [] com.oracle.svm.core.cpufeature.RuntimeCPUFeatureCheckFeature, [] com.oracle.svm.core.cpufeature.RuntimeCPUFeatureCheckImplFeature, [] com.oracle.svm.core.deopt.DeoptimizationCanaryFeature, [] com.oracle.svm.core.genscavenge.AlignedHeapChunkMemoryWalkerAccessImplFeature, [] com.oracle.svm.core.genscavenge.JfrGCEventFeature, [] com.oracle.svm.core.genscavenge.PinnedObjectImplPinnedObjectSupportImplFeature, [] com.oracle.svm.core.genscavenge.UnalignedHeapChunkMemoryWalkerAccessImplFeature, [] com.oracle.svm.core.genscavenge.graal.BarrierSnippetCountersFeature, [com.oracle.svm.core.util.CounterFeature] com.oracle.svm.core.genscavenge.graal.GenScavengeGCFeature, [com.oracle.svm.core.jdk.RuntimeSupportFeature com.oracle.svm.core.jdk.management.ManagementFeature com.oracle.svm.core.jvmstat.PerfDataFeature com.oracle.svm.core.heap.AllocationFeature] com.oracle.svm.core.graal.RuntimeCompilationCanaryFeature, [] com.oracle.svm.core.graal.aarch64.AArch64NativePatchConsumerFactoryFeature, [] com.oracle.svm.core.graal.aarch64.SubstrateAArch64Feature, [] com.oracle.svm.core.graal.aarch64.SubstrateAArch64GraphBuilderPlugins, [] com.oracle.svm.core.graal.jdk.JDKIntrinsicsFeature, [] com.oracle.svm.core.graal.snippets.CFunctionSnippetsFeature, [] com.oracle.svm.core.graal.snippets.DeoptSnippetsFeature, [] com.oracle.svm.core.graal.snippets.ExceptionFeature, [] com.oracle.svm.core.graal.snippets.SafepointFeature, [] com.oracle.svm.core.graal.snippets.StackOverflowCheckFeature, [] com.oracle.svm.core.graal.snippets.aarch64.AArch64ArithmeticForeignCallsFeature, [] com.oracle.svm.core.graal.snippets.aarch64.AArch64SnippetsFeature, [] com.oracle.svm.core.graal.stackvalue.StackValueFeature, [] com.oracle.svm.core.handles.ObjectHandlesSupportImplFeature, [] com.oracle.svm.core.heap.AllocationFeature, [] com.oracle.svm.core.heap.GCCauseFeature, [] com.oracle.svm.core.heap.HostedHeapSizeVerifierFeature, [] com.oracle.svm.core.heap.ReferenceAccessImplFeature, [] com.oracle.svm.core.heap.ReferenceHandlerThreadFeature, [] com.oracle.svm.core.heap.VMOperationInfosFeature, [] com.oracle.svm.core.heap.VMOperationNamesFeatures, [] com.oracle.svm.core.hub.ClassForNameSupportFeature, [] com.oracle.svm.core.hub.DynamicHubSupportFeature, [] com.oracle.svm.core.identityhashcode.SubstrateIdentityHashCodeFeature, [] com.oracle.svm.core.jdk.AtomicFieldUpdaterFeature, [] com.oracle.svm.core.jdk.ClassLoaderSupportFeature, [] com.oracle.svm.core.jdk.CompletableFutureFeature, [] com.oracle.svm.core.jdk.FileSystemProviderFeature, [] com.oracle.svm.core.jdk.ForkJoinPoolFeature, [] com.oracle.svm.core.jdk.InnocuousForkJoinWorkerThreadFeature, [] com.oracle.svm.core.jdk.JDKVersionSpecificResourceBuilderJDK11OrLaterFeature, [] com.oracle.svm.core.jdk.JRTDisableFeature, [] com.oracle.svm.core.jdk.JavaNetFeature, [] com.oracle.svm.core.jdk.JavaNetHttpFeature, [] com.oracle.svm.core.jdk.NativeLibrarySupportFeature, [] com.oracle.svm.core.jdk.PlatformNativeLibrarySupportFeature, [] com.oracle.svm.core.jdk.RecordSupportJDK11OrEarlierFeature, [] com.oracle.svm.core.jdk.ResourcesFeature, [] com.oracle.svm.core.jdk.RuntimeFeature, [com.oracle.svm.core.jdk.RuntimeSupportFeature] com.oracle.svm.core.jdk.RuntimeSupportFeature, [] com.oracle.svm.core.jdk.SealedClassSupportJDK11OrEarlierFeature, [] com.oracle.svm.core.jdk.ServiceCatalogSupportFeature, [] com.oracle.svm.core.jdk.SimpleWebServerFeature, [] com.oracle.svm.core.jdk.TimeZoneFeature, [] com.oracle.svm.core.jdk.TrustStoreManagerFeature, [] com.oracle.svm.core.jdk.URLProtocolsSupportFeature, [] com.oracle.svm.core.jdk.VarHandleFeature, [] com.oracle.svm.core.jdk.localization.LocalizationFeature, [] com.oracle.svm.core.jdk.management.ManagementFeature, [com.oracle.svm.core.jdk.RuntimeSupportFeature com.oracle.svm.core.thread.ThreadListenerSupportFeature] com.oracle.svm.core.jdk17.RecordSupportJDK17OrLaterFeature, [] com.oracle.svm.core.jdk17.SealedClassSupportJDK17OrLaterFeature, [] com.oracle.svm.core.jfr.sampler.JfrNoExecutionSamplerFeature, [com.oracle.svm.core.jfr.JfrFeature] com.oracle.svm.core.jfr.sampler.JfrRecurringCallbackExecutionSamplerFeature, [com.oracle.svm.core.jfr.JfrFeature] com.oracle.svm.core.jvmstat.PerfDataFeature, [com.oracle.svm.core.thread.VMOperationListenerSupportFeature com.oracle.svm.core.jdk.RuntimeSupportFeature] com.oracle.svm.core.meta.SubstrateObjectConstantEqualityFeature, [] com.oracle.svm.core.option.RuntimeOptionsSupportImplFeature, [] com.oracle.svm.core.option.ValidateImageBuildOptionsFeature, [] com.oracle.svm.core.os.BufferedFileOperationFeature, [] com.oracle.svm.core.os.ImageHeapProviderFeature, [] com.oracle.svm.core.os.OSCommittedMemoryProviderFeature, [] com.oracle.svm.core.posix.IgnoreSIGPIPEFeature, [] com.oracle.svm.core.posix.PosixLoadAverageSupportFeature, [] com.oracle.svm.core.posix.PosixLogHandlerFeature, [] com.oracle.svm.core.posix.PosixNativeLibraryFeature, [] com.oracle.svm.core.posix.PosixRawFileOperationFeature, [] com.oracle.svm.core.posix.PosixSubstrateSegfaultHandlerFeature, [] com.oracle.svm.core.posix.PosixSubstrateSigProfHandlerFeature, [com.oracle.svm.core.IsolateListenerSupportFeature com.oracle.svm.core.jfr.JfrFeature] com.oracle.svm.core.posix.PosixVirtualMemoryProviderFeature, [] com.oracle.svm.core.posix.UnmanagedMemorySupportImplFeature, [] com.oracle.svm.core.posix.aarch64.AArch64DarwinUContextRegisterDumperFeature, [] com.oracle.svm.core.posix.darwin.DarwinImageSingletonsFeature, [] com.oracle.svm.core.posix.darwin.DarwinLibCSupportFeature, [] com.oracle.svm.core.posix.darwin.DarwinProcessPropertiesSupportFeature, [] com.oracle.svm.core.posix.darwin.DarwinStackOverflowSupportFeature, [] com.oracle.svm.core.posix.darwin.DarwinSystemPropertiesFeature, [] com.oracle.svm.core.posix.darwin.DarwinThreadCpuTimeSupportFeature, [] com.oracle.svm.core.posix.darwin.DarwinTimeUtilFeature, [] com.oracle.svm.core.posix.darwin.DarwinVMSemaphoreFeature, [] com.oracle.svm.core.posix.darwin.PhysicalMemorySupportImplFeature, [] com.oracle.svm.core.posix.heapdump.AllocationFreeFileOutputStreamPosixFeature, [] com.oracle.svm.core.posix.pthread.PthreadVMLockFeature, [] com.oracle.svm.core.posix.thread.PosixParkerFactoryFeature, [] com.oracle.svm.core.posix.thread.PosixPlatformThreadsFeature, [] com.oracle.svm.core.posix.thread.PosixVMThreadsFeature, [] com.oracle.svm.core.reflect.target.ReflectionMetadataDecoderImplFeature, [] com.oracle.svm.core.reflect.target.ReflectionMetadataDecoderImplMetadataAccessorImplFeature, [] com.oracle.svm.core.reflect.target.ReflectionMetadataEncodingFeature, [] com.oracle.svm.core.thread.ContinuationsFeature, [] com.oracle.svm.core.thread.JavaThreadsFeature, [] com.oracle.svm.core.thread.SafepointMasterFeature, [] com.oracle.svm.core.thread.ThreadListenerSupportFeature, [] com.oracle.svm.core.thread.ThreadingSupportImplFeature, [] com.oracle.svm.core.thread.VMOperationControlFeature, [] com.oracle.svm.core.thread.VMOperationListenerSupportFeature, [] com.oracle.svm.core.threadlocal.VMThreadLocalInfosFeature, [] com.oracle.svm.core.util.CounterFeature, [] com.oracle.svm.core.util.HostedStringDeduplicationFeature, [] com.oracle.svm.enterprise.core.aarch64.c, [] com.oracle.svm.enterprise.core.ad, [] com.oracle.svm.enterprise.core.ao, [] com.oracle.svm.enterprise.core.auximage.AuxiliaryImageHeapFeature, [] com.oracle.svm.enterprise.core.auximage.ah, [] com.oracle.svm.enterprise.core.copying.a, [] com.oracle.svm.enterprise.core.copying.d, [] com.oracle.svm.enterprise.core.copying.p, [] com.oracle.svm.enterprise.core.d, [] com.oracle.svm.enterprise.core.graal.jdk.a, [] com.oracle.svm.enterprise.core.heap.a, [] com.oracle.svm.enterprise.core.k, [] com.oracle.svm.enterprise.core.monitor.b, [] com.oracle.svm.enterprise.core.posix.a, [com.oracle.svm.enterprise.core.auximage.AuxiliaryImageHeapFeature] com.oracle.svm.enterprise.core.posix.graalos.b, [] com.oracle.svm.enterprise.core.sboutlining.g, [] com.oracle.svm.enterprise.core.sboutlining.i, [com.oracle.svm.core.util.CounterFeature] com.oracle.svm.enterprise.core.sboutlining.l, [] com.oracle.svm.enterprise.core.stringformat.b, [] com.oracle.svm.enterprise.hosted.a, [] com.oracle.svm.enterprise.hosted.d, [] com.oracle.svm.enterprise.hosted.g, [] com.oracle.svm.enterprise.hosted.j, [] com.oracle.svm.enterprise.hosted.m, [] com.oracle.svm.enterprise.hosted.ml.features.provider.a, [] com.oracle.svm.enterprise.hosted.objectinlining.b, [] com.oracle.svm.enterprise.hosted.objectinlining.f, [] com.oracle.svm.enterprise.hosted.phases.a, [] com.oracle.svm.enterprise.hosted.q, [] com.oracle.svm.enterprise.sbom.d, [] com.oracle.svm.enterprise.truffle.PolyglotIsolateHostFeature, [] com.oracle.svm.enterprise.truffle.i, [] com.oracle.svm.enterprise.truffle.k, [com.oracle.svm.enterprise.truffle.i] com.oracle.svm.graal.RuntimeCPUFeatureRegionFeature, [] com.oracle.svm.graal.hosted.DeoptimizationFeature, [com.oracle.svm.core.deopt.DeoptimizationCanaryFeature com.oracle.svm.core.util.CounterFeature] com.oracle.svm.graal.hosted.FieldsOffsetsFeature, [] com.oracle.svm.graal.hosted.LegacyRuntimeCompilationFeature, [com.oracle.svm.core.graal.RuntimeCompilationCanaryFeature com.oracle.svm.graal.hosted.DeoptimizationFeature com.oracle.svm.graal.hosted.FieldsOffsetsFeature] com.oracle.svm.graal.isolated.DisableSnippetCountersFeature, [] com.oracle.svm.graal.isolated.IsolateAwareObjectConstantEqualityFeature, [] com.oracle.svm.graal.meta.aarch64.AArch64RuntimeCodeInstallerPlatformHelperFeature, [] com.oracle.svm.graal.stubs.AArch64StubForeignCallsFeature, [] com.oracle.svm.hosted.AArch64CPUFeatureAccessFeature, [] com.oracle.svm.hosted.ClassLoaderFeature, [] com.oracle.svm.hosted.ClassNewInstanceFeature, [] com.oracle.svm.hosted.ClassPredefinitionFeature, [] com.oracle.svm.hosted.ClassValueFeature, [] com.oracle.svm.hosted.ConcurrentReachabilityHandler, [] com.oracle.svm.hosted.FallbackFeature, [] com.oracle.svm.hosted.Log4ShellFeature, [] com.oracle.svm.hosted.LoggingFeature, [] com.oracle.svm.hosted.ModuleLayerFeature, [] com.oracle.svm.hosted.NativeSecureRandomFilesCloser, [] com.oracle.svm.hosted.ProtectionDomainFeature, [] com.oracle.svm.hosted.ResourcesFeature, [] com.oracle.svm.hosted.SecurityServicesFeature, [] com.oracle.svm.hosted.ServiceLoaderFeature, [] com.oracle.svm.hosted.SubstrateDiagnosticFeature, [] com.oracle.svm.hosted.SystemInOutErrFeature, [] com.oracle.svm.hosted.ameta.HostedDynamicHubFeature, [] com.oracle.svm.hosted.annotation.AnnotationSupportFeature, [] com.oracle.svm.hosted.annotation.AnnotationTypeFeature, [] com.oracle.svm.hosted.c.CGlobalDataFeature, [] com.oracle.svm.hosted.c.function.CEntryPointSupport, [] com.oracle.svm.hosted.classinitialization.ClassInitializationFeature, [] com.oracle.svm.hosted.code.CEntryPointCallStubFeature, [] com.oracle.svm.hosted.code.CEntryPointLiteralFeature, [] com.oracle.svm.hosted.code.CFunctionLinkagesFeature, [] com.oracle.svm.hosted.code.CFunctionPointerCallStubSupportFeature, [] com.oracle.svm.hosted.code.FactoryMethodSupportFeature, [] com.oracle.svm.hosted.code.FrameInfoHostedMethodDataFeature, [] com.oracle.svm.hosted.code.RestrictHeapAccessCalleesFeature, [] com.oracle.svm.hosted.code.SubstrateCompilationDirectivesFeature, [] com.oracle.svm.hosted.code.SubstrateLIRBackendFeature, [] com.oracle.svm.hosted.code.UninterruptibleAnnotationCheckerFeature, [] com.oracle.svm.hosted.code.aarch64.AArch64HostedPatcherFeature, [] com.oracle.svm.hosted.code.aarch64.AArch64HostedTrampolineSupportFeature, [] com.oracle.svm.hosted.fieldfolding.StaticFinalFieldFoldingFeature, [] com.oracle.svm.hosted.heap.HeapDumpFeature, [] com.oracle.svm.hosted.heap.ImageHeapMapFeature, [] com.oracle.svm.hosted.heap.PodFeature, [] com.oracle.svm.hosted.image.DisallowedImageHeapObjectFeature, [com.oracle.svm.core.jdk.management.ManagementFeature] com.oracle.svm.hosted.image.ImageHeapFillerObjectsFeature, [] com.oracle.svm.hosted.image.MethodPointerInvalidHandlerFeature, [] com.oracle.svm.hosted.image.StringInternFeature, [] com.oracle.svm.hosted.image.sources.SourceCacheFeature, [] com.oracle.svm.hosted.jdk.AccessControlContextReplacerFeature, [] com.oracle.svm.hosted.jdk.JDKInitializationFeature, [] com.oracle.svm.hosted.jdk.JDKRegistrations, [] com.oracle.svm.hosted.jdk.JNIRegistrationJava, [] com.oracle.svm.hosted.jdk.JNIRegistrationJavaNet, [] com.oracle.svm.hosted.jdk.JNIRegistrationJavaNio, [] com.oracle.svm.hosted.jdk.JNIRegistrationManagementExt, [] com.oracle.svm.hosted.jdk.JNIRegistrationPrefs, [] com.oracle.svm.hosted.jdk.JNIRegistrationSupport, [] com.oracle.svm.hosted.jdk.JNIRegistrationsJavaZip, [] com.oracle.svm.hosted.jdk.JRTFeature, [] com.oracle.svm.hosted.jdk.localization.CharsetSubstitutionsFeature, [] com.oracle.svm.hosted.jdk.localization.LocalizationFeature, [] com.oracle.svm.hosted.jdk17.JNIRegistrationSupport_JDK17OrLater, [] com.oracle.svm.hosted.jni.JNIAccessFeature, [com.oracle.svm.hosted.meta.KnownOffsetsFeature] com.oracle.svm.hosted.jni.JNIAutomaticFeature, [com.oracle.svm.hosted.jni.JNIFeature] com.oracle.svm.hosted.jni.JNICallWrapperFeature, [com.oracle.svm.hosted.jni.JNIAccessFeature] com.oracle.svm.hosted.jni.JNIFeature, [com.oracle.svm.hosted.jni.JNIFunctionTablesFeature com.oracle.svm.hosted.jni.JNICallWrapperFeature com.oracle.svm.hosted.jni.JNILibraryLoadFeature] com.oracle.svm.hosted.jni.JNIFunctionTablesFeature, [com.oracle.svm.hosted.jni.JNIAccessFeature] com.oracle.svm.hosted.jni.JNILibraryLoadFeature, [] com.oracle.svm.hosted.lambda.StableLambdaProxyNameFeature, [] com.oracle.svm.hosted.meta.HostedMethodNameFactory, [] com.oracle.svm.hosted.meta.InvalidVTableEntryFeature, [] com.oracle.svm.hosted.meta.KnownOffsetsFeature, [com.oracle.svm.hosted.thread.VMThreadMTFeature] com.oracle.svm.hosted.meta.MaterializedConstantFieldsFeature, [] com.oracle.svm.hosted.methodhandles.MethodHandleFeature, [] com.oracle.svm.hosted.option.RuntimeOptionFeature, [] com.oracle.svm.hosted.phases.EnumSwitchFeature, [] com.oracle.svm.hosted.reflect.ReflectionFeature, [] com.oracle.svm.hosted.reflect.ReflectionMetadataEncoderImplFactoryFeature, [] com.oracle.svm.hosted.reflect.proxy.DynamicProxyFeature, [com.oracle.svm.hosted.reflect.ReflectionFeature] com.oracle.svm.hosted.reflect.serialize.SerializationFeature, [com.oracle.svm.hosted.reflect.ReflectionFeature com.oracle.svm.hosted.reflect.proxy.DynamicProxyFeature] com.oracle.svm.hosted.snippets.ExceptionUnwindFeature, [] com.oracle.svm.hosted.snippets.ImplicitExceptionsFeature, [] com.oracle.svm.hosted.substitute.AutomaticSubstitutionFeature, [] com.oracle.svm.hosted.thread.CEntryPointFeature, [com.oracle.svm.hosted.thread.VMThreadMTFeature] com.oracle.svm.hosted.thread.VMThreadMTFeature, [] com.oracle.svm.hosted.xml.JavaxXmlClassAndResourcesLoaderFeature, [] com.oracle.svm.truffle.ICU4JFeature, [] com.oracle.svm.truffle.TruffleBaseFeature, [] com.oracle.svm.truffle.TruffleFeature, [com.oracle.svm.graal.hosted.LegacyRuntimeCompilationFeature com.oracle.svm.truffle.TruffleBaseFeature] com.oracle.svm.truffle.TruffleJFRFeature, [] com.oracle.svm.truffle.nfi.TruffleNFIFeature, [com.oracle.svm.truffle.TruffleBaseFeature] com.oracle.svm.truffle.nfi.posix.PosixTruffleNFIFeature, [] org.graalvm.home.HomeFinderFeature, [] ```
oubidar-Abderrahim commented 1 year ago

Thank you for reporting this, we'll take a look into it shortly

lewurm commented 1 year ago

Hello @sgammon, thanks for your report.

Sorry for the bad experience, a couple of bad events happened here:

  1. With Xcode 14 a new optimization for Objective C calls was introduced, which generates stubs for each target and are exposed as _objc_msgSend$<targetmethod> symbol. The linker is then supposed to insert the symbols accordingly, i.e. you have to use a linker that understands that concept.
  2. 3f84ffe27cdc8527eaa5e34ee04be862deaf36d3 introduced a workaround for linking on darwin-aarch64 if the binary is too big (which is usually the case for GraalPy), and it then will fall back to ld64.lld which we also ship.

So unfortunately for building GraalVM that we ship we sometimes use Xcode 13 and sometimes Xcode 14 (which is a bad bad bad thing, and we have to fix that), so you have like a 50% chance to obtain a release that uses those stubs mentioned in 1.; that is the case for you. Additionally you try to compile something where the workaround mentioned in 2. kicks in and then falls back to ld64.lld. Alas for that release that you are using, we are shipping a version of ld64.ld that does not understand those stubs mentioned in 1. yet, thus the error.

Suggested workaround 1

Try your luck with a slightly different version (terrible advice, I know). E.g. using SDKMAN! via sdk install java 20.0.1-graal got me a "good release". A "bad" release looks like this:

$ nm $JAVA_HOME/lib/svm/clibraries/darwin-aarch64/libdarwin.a | grep -i objc
00000000000000d0 s _OBJC_CLASSLIST_REFERENCES_$_
00000000000000d8 s _OBJC_CLASSLIST_REFERENCES_$_.3
                 U _OBJC_CLASS_$_NSDictionary
                 U _OBJC_CLASS_$_NSProcessInfo
                 U _objc_msgSend$UTF8String
                 U _objc_msgSend$dictionaryWithContentsOfFile:
                 U _objc_msgSend$objectForKey:
                 U _objc_msgSend$operatingSystemVersion
                 U _objc_msgSend$processInfo

A "good" release looks like that:

$ nm $JAVA_HOME/lib/svm/clibraries/darwin-aarch64/libdarwin.a | grep -i objc
00000000000000f0 s _OBJC_CLASSLIST_REFERENCES_$_
00000000000000f8 s _OBJC_CLASSLIST_REFERENCES_$_.5
                 U _OBJC_CLASS_$_NSDictionary
                 U _OBJC_CLASS_$_NSProcessInfo
0000000000000160 s _OBJC_SELECTOR_REFERENCES_
0000000000000178 s _OBJC_SELECTOR_REFERENCES_.11
0000000000000180 s _OBJC_SELECTOR_REFERENCES_.13
0000000000000168 s _OBJC_SELECTOR_REFERENCES_.2
0000000000000170 s _OBJC_SELECTOR_REFERENCES_.7
                 U _objc_msgSend
0000000000000100 s l_OBJC_METH_VAR_NAME_
000000000000010c s l_OBJC_METH_VAR_NAME_.1
0000000000000141 s l_OBJC_METH_VAR_NAME_.10
000000000000014f s l_OBJC_METH_VAR_NAME_.12
0000000000000123 s l_OBJC_METH_VAR_NAME_.6

Suggested workaround 2

Use one of our dev-builds: https://github.com/graalvm/graalvm-ce-dev-builds/releases There we ship a newer LLVM version that contains a ld64.lld which understands the concept of selector stubs and produces code accordingly.

sgammon commented 1 year ago

@lewurm I can confirm that a CE dev build works fine, and I can build against the sdkman release too. That fixes the error (after some other unrelated tweaking) and we can officially build against Python. Not sure if related (perhaps via LLVM) but Ruby is now working for us too.

Thank you for the detailed explanation; I'm not too familiar with this layer of Apple's native code, so it's neat to see why it was failing. That will probably equip me much better later to diagnose. No worries on the experience building; we're just happy to have it working! πŸ‘πŸ»