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
[question] Difference with Graal for native-image builds (babashka) #485
Comments
Hmm, ProcessProperties.java#L171, it's not Truffle, it's sdk. Can you confirm that it is not a casspath problem with the sdk? Does it really fail with Mandrel? I can give it a try later... |
I just built twice on amd64 Linux with
The |
This issue appears to be stale because it has been open 30 days with no activity. This issue will be closed in 7 days unless |
I'd also like to hear an answer on that. |
I don't think this has anything to do with GraalVM vs. Mandrel (unless I'm missing something obvious). Please report this to the babashka maintainers. Also keep in mind that Mandrel exists as a native-image engine for Quarkus primarily. So I'm not sure the babashka (whatever it is) workflow has any chance of working as I know nothing about it. Simple non-babashka reproducer:
We get the same output (compare to plain |
Looking at the linked issue void-linux/void-packages#42812 please check this thing is actually using native-image. For example
|
Ok, thanks. I use Mandrel instead of GraalVM to build Babashka because I didn't get GraalVM to build on native Linux/musl. The build log says:
I think this uses native-image. |
I can verify the pure Java example works as well. But native-image is called with |
Found the culprit now: Babashka is compiled into an uberjar first, which doesn't have ProcessProperties in the classpath. Thus a compile-time check disables it, and then native-image never picks it up. However, GraalVM seems to have it in the default classpath, so there's a difference still maybe. Anyway, forcing |
Yes, that's the difference. GraalVM is a jlinked JDK with graalvm modules part of it. That includes the sdk[1]. Mandrel treats OpenJDK as immutable and only adds needed jars to the classpath/modulepath as needed. So you've found the correct fix by adding it to the classpath. [1] GraalVM CE
|
I'd suggest to talk to the babashka maintainers whether or not they want to support the Mandrel config. |
Hi, I hope it's okay to ask free-form question here although the issue template mentions Slack.
I built https://github.com/babashka/babashka in Linux following their build info. When I try to run
./bb -e '(babashka.process/exec "ls")'
with the built binary, I get the error messageMessage: exec is not supported in non-GraalVM environments
. After looking into it, I found it generated from here after this call. Since this error is not present in the upstream provided release binaries, I was wondering if this is due do differences for Graal & Mandrel.The text was updated successfully, but these errors were encountered: