-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Enable cross-compilation of native libraries #1446
Comments
Once cross-compilation is fully supported we will also have to ship those with the distribution. |
+1 on this. |
@gilles-duboscq this is a proposal:
In the second step, we would introduce components for native-image native libraries for supported architectures. On This feature would be used as follows:
|
Any news on this? |
The first set of changes that add support for multiarch native projects to |
We would love to be able to cross compile to aarch64 using the native-image tool. Is this supported now? |
Still a unreleased feature, tried this on graalvm 23.3.1 JDK 19 $ native-image --no-server --no-fallback --target=linux-aarch64 -jar build/libs/graalvm-vanilla-all.jar ./build/graalvm-vanilla
Warning: Ignoring server-mode native-image argument --no-server.
Error: Invalid Path entry /home/typer/.sdkman/candidates/java/22.3.1.r19-grl/lib/svm/clibraries/linux-aarch64
Caused by: java.nio.file.NoSuchFileException: /home/typer/.sdkman/candidates/java/22.3.1.r19-grl/lib/svm/clibraries/linux-aarch64 But if a try to install the native image module for a cross OS, I will the another error $ gu -u install "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/llvm-installable-svm-java19-linux-aarch64-22.3.1.jar"
Processing Component: https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/llvm-installable-svm-java19-linux-aarch64-22.3.1.jar
Downloading: Component https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/llvm-installable-svm-java19-linux-aarch64-22.3.1.jar: https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/llvm-installable-svm-java19-linux-aarch64-22.3.1.jar from github.com
Installation of https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.1/llvm-installable-svm-java19-linux-aarch64-22.3.1.jar failed: Component LLVM Runtime Core could not be installed. It requires Architecture aarch64, but the GraalVM provides amd64
Error: Component LLVM Runtime Core could not be installed. It requires Architecture aarch64, but the GraalVM provides amd64
|
Related issue #407 |
I'm working on making the LLVM backend of Graal output ARM programs and a big blocker is that the native C libraries (
libjvm
,liblibchelper
,libstrictmath
notably) are compiled by default for the host platform only.It would be nice to be able to select the target architecture when running
mx build
and have the binaries output to the<os>-aarch64
folder instead of the current<os>-amd64
.The text was updated successfully, but these errors were encountered: