graal
graal copied to clipboard
`Could not find any unresolved JVM_* symbols in static JDK libraries`
Attempting to build GraalVM according to the instructions found in vm/README.md fails:
$ mx --dynamicimports /substratevm,/tools,/sulong,/graal-js --exclude-components=nju,nic,ni,nil,llp --force-bash-launcher=polyglot build 2>&1 | tee log.txtJAVA_HOME: /usr/lib/jvm/java-11-openjdk-amd64
15 unsatisfied dependencies were removed from build (use -v to list them)
52 non-default dependencies were removed from build (use -v to list them, mx build --all to build them)
WARNING: Adding non-default dependency com.oracle.svm.graal.hotspot.libgraal as it is needed by standard dependency GRAAL_HOTSPOT_LIBRARY
WARNING: Adding non-default dependency GRAAL_HOTSPOT_LIBRARY as it is needed by standard dependency jvmcicompiler-library_native-image.properties
Downloading LLVM_ORG from ['https://lafo.ssw.uni-linz.ac.at/pub/llvm-org/llvm-llvmorg-14.0.3-2-g772a7a659e-bgd661ed0276-linux-amd64.tar.gz']
JvmFuncsFallbacksBuildTask svm-jvmfuncs-fallback-builder... [/media/main/code/graal/substratevm/mxbuild/jdk11/svm-jvmfuncs-fallback-builder/src_gen/JvmFuncsFallbacks.c does not exist]
Could not find any unresolved JVM_* symbols in static JDK libraries
I think I had already run it once before, thus explaining the lack of download messages.
Tangential: Also, how would I just build the JS launcher without Node?
Your JDK probably doesn't include static libraries. Check: ls $JAVA_HOME/lib/*.a
Your JDK probably doesn't include static libraries. Check: ls $JAVA_HOME/lib/*.a
You are correct. There are no static libraries there. Are there supposed to be?
I'm also running into the same issue, using the corretto 11 JVM on macOS. Anyone find a solution?
You are correct. There are no static libraries there. Are there supposed to be?
Not necessarily for running a regular Java program, but GraalVM needs that. Solutions include:
- use a LabsJDK e.g. https://github.com/graalvm/labs-openjdk-19/releases (actually I'm not sure if their release contains shared libraries, but labsjdk are indeed for building graalvm)
- build a jdk with shared library (by
cd jdk && sh configure <args> && make graal-builder-image)
Neither the OpenJDK labs releases nor the results of mx fetch-jdk work for me -- both end with Could not find any unresolved JVM_* symbols in static JDK libraries when trying to mx build SubstrateVM.
Looks like labsjdk-ce-19 does not work but labsjdk-ce-20 does.
For me building OpenJDK (I used jdk-20+36) as @oraluben described in his second solution worked just fine. Build OpenJDK, set JAVA_HOME to <OpenJDK repo>/build/<system-specific dir>/images/graal-builder-jdk, and build GraalVM.