-
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
Native Image build fails with --docker-image=false #2414
Comments
@idiotwithalaptop I think it makes perfect sense to wrap the value. We already had a similar report. Could you make the change, check it fixes your issue and submit a PR soon for inclusion in the next release (it should be released tomorrow or the day after)? Thanks! |
Sure, i'll sort that out today |
I don't think this is correct. There should be no escaping going on as it is a ProcessBuilder. I am not really sure where docker actually comes into the gradle build? It looks like the build that fails is not using docker, then you do a different build with docker that has an escapting problem that then works after you fix it? I don't think this is actually related to the original failure. I am not sure why the gradle build is not giving more details as to the cause of the original failure. |
Closing for now. Let's revisit if somebody else encounters the issue in recent versions. |
This appears to be an issue in GraalVM's native-image generation itself, where it doesn't report the original cause. I've opened oracle/graal#2241 to improve that. |
encountering same issue with ubuntu 18.04 and graal VM Error: policy com.oracle.svm.core.genscavenge.CollectionPolicy cannot be instantiated. |
Hi,
First of all, my apologies if this has already been raised.
Now, I have recently been trying to build native images using quarkus inside of my own docker container. To do this, I opted to set the
--docker-image
flag to false to avoid the quarkus toolset creating a docker container within a docker container and dealing with the issues that come from that. To my surprise though, this lead to a weird error. To show this I have added a docker-container to thequarkus-quickstart/getting-started
codebase which is available at https://github.com/idiotwithalaptop/quarkus-quickstarts/tree/master/getting-started.Note: In case it helps, all examples below were run on a Macbook Pro running
OSX Mojave 10.14.4
and docker18.09.2, build 6247962
Here's what happens when I run a native build using
gradle
:If I try to run the
native-image
using the same arguments in the output above, it shows that it can't initialise the class specified in-H:InitialCollectionPolicy
:But, it has removed the embedded class
BySpaceAndTime
from the instantiation because the dollar sign$
is being interpolated. To test this, I run the same command again but wrapped with single quotes to avoid interpolation and it works perfectly:A quick search through the
quarkus
codebase and I think I found the culprit. I think https://github.com/quarkusio/quarkus/blob/master/core/creator/src/main/java/io/quarkus/creator/phase/nativeimage/NativeImagePhase.java#L403 should wrap the classname with single quotations:command.add("-H:InitialCollectionPolicy='com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime'");
Thoughts?
The text was updated successfully, but these errors were encountered: