Skip to content
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

Binary images are fallback images that require java #210

Open
nkuehn opened this issue Dec 4, 2020 · 0 comments
Open

Binary images are fallback images that require java #210

nkuehn opened this issue Dec 4, 2020 · 0 comments

Comments

@nkuehn
Copy link

nkuehn commented Dec 4, 2020

When trying to use the native image on the documenation CI (vercel) which does not java available by default we (docs / @davifantasia ) found that the native images in the GitHub releases are not actually fully native but graalvm fallback images that require a JVM.

It's my fault effectively, I should have read the logs more carefully and not rely on passing allow-incomplete-classpath when there can be more issues than that. ( https://github.com/commercetools/rmf-codegen/blob/master/tools/cli-application/build.gradle#L23 )

Here's the log line in the last linux build: https://github.com/commercetools/rmf-codegen/runs/1463962319?check_suite_focus=true#step:4:175

2020-11-27T13:41:20.2564243Z Warning: Aborting stand-alone image build. Unsupported features in 4 methods
2020-11-27T13:41:20.2565015Z Detailed message:
2020-11-27T13:41:20.2568041Z Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call or single field access. The method handle must be a compile time constant, e.g., be loaded from a `static final` field. Method that contains the method handle invocation: java.lang.invoke.MethodHandle.invokeBasic()
2020-11-27T13:41:20.2572179Z To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The error is then reported at run time when the invoke is executed.

To pass report-unsupported-elements-at-runtime to the graalvm native image builder we'd have to learn how to pass mulitple options in the gradly nativeImage step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant