-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Unable to build native image on Macbook Pro M4 Pro #45842
Comments
Hi @jcuero, I asssume
is working as expected. Could you please try using |
Hi @zakkak, I'm getting the same error. In order to understand, and subsequently be able to generate the native image, I renamed the docker binary and replaced it with a script. After adding the parameter you indicate, I still get the same error
/usr/local/bin/docker
|
Thanks for checking @jcuero unfortunately |
`quarkus.native.container-runtime-options` should be respected when invoking the builder image to get its version. Closes: quarkusio#45842
`quarkus.native.container-runtime-options` should be respected when invoking the builder image to get its version. Closes: quarkusio#45842 (cherry picked from commit 726ba17)
`quarkus.native.container-runtime-options` should be respected when invoking the builder image to get its version. Closes: quarkusio#45842
Describe the bug
I'm trying to create a native image using Apple M4 Pro but I haven't been able to do it due to an error when getting the graalvm version.
./gradlew -Dquarkus.package.type=native -Dquarkus.native.container-build=true -Dquarkus.container-image.build=true clean build
Expected behavior
I expect to be able to include custom parameters that are passed to "docker run" when I want to generate a native image.
docker run --env LANG=C --env _JAVA_OPTIONS=-XX:UseSVE=0 --rm --user 1000:1000 -i quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21 --version
Actual behavior
Under the hood Quarkus executes this command
docker run --env LANG=C --rm --user 1000:1000 -i quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21 --version
I know that the solution for this is to add _JAVA_OPTIONS=-XX:UseSVE=0 but it is not possible to do so because NativeImageBuildRunner.getGraalVMVersion/NativeImageBuildContainerRunner.buildCommand does not receive additional parameters through environment variables.
This method has the problem
quarkus/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildContainerRunner.java
Lines 120 to 123 in 202c65c
This method is already working well
quarkus/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildContainerRunner.java
Lines 125 to 132 in 202c65c
How to Reproduce?
Can be reproduced by running this command
./gradlew -Dquarkus.package.type=native -Dquarkus.native.container-build=true -Dquarkus.container-image.build=true clean build
Output of
uname -a
orver
No response
Output of
java -version
No response
Mandrel or GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: