Closed qa137 closed 1 month ago
any solution? same problem with python
You are asking native-image for functionality that it doesn't have. It's telling you what is available:
[INFO] [creator] Caused by: com.oracle.svm.driver.NativeImage$NativeImageError: Unknown name in option specification: macro:truffle-svm
[INFO] [creator] Available macro options are:
[INFO] [creator] --macro:junit
[INFO] [creator] --macro:native-image-agent-library
[INFO] [creator] --macro:native-image-configure-launcher
[INFO] [creator] --macro:native-image-diagnostics-agent-library
[INFO] [creator] --macro:native-image-launcher
I don't know why that's unavailable, but check your version. Do you need NIK 23? That is available, but buildpacks are installing 21 according to what you posted. Other possibility, are you using something that requires the Oracle GraalVM? The default is to install Bellsoft NIK, but you can swap in Oracle GraalVM (or GraalVM CE) if you want, see here.
you are right, it works with oracle graalvm jdk23, thanks
Ah, great. Thanks for sharing the fix!
Use the following command to execute the compilation and everything works:
mvn -Pnative clean native:compile
However, executing with the following command fails:mvn -Pnative clean spring-boot:build-image
Describe GraalVM and your environment: GraalVM version: Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37) JDK major version: 21.0.3 (2024-04-16 LTS) OS: macOS Sonoma 14.2.1 Architecture: AMD64
pom.xml
More details: