-
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
native-image: fails to create image with --language:js, types reachable for JIT compilation must not have linkage errors #4654
Comments
Hi Thank you for reporting this, we will take a look into it and get back to you |
Hello, |
@ahoora08 how did you figure out which dependency was causing the break? I ran into the same error. |
I was able to get the native image to build successfully by adding the following dependencies to your pom.xml: <dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-influx</artifactId>
<version>${micrometer.version}</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-jmx</artifactId>
<version>${micrometer.version}</version>
</dependency> So this appears to simply be a consequence of missing dependencies, causing certain classes required by vertx-micrometer-metrics to not be found (the "linkage error" here is a Unfortunately, the error message here is not very helpful. We will try to improve it in newer versions. |
@woess is there any way to include problematic class in error message right now? I ran into a similiar error, but adding micrometer-registry-influx/micrometer-registry-jmx/both doesn't help (and I also already have micrometer-registry-prometheus). It's quite a stopper for a half of a year now (Tinkoff/mockingbird#23) 😔 |
Sorry for the late reply. I'm afraid there's isn't an easy way to surface the failing class. The good news though is that this should be improved now by c6bf8cc which will be included in the upcoming 24.0 and 23.1.2 releases. Until then, you could try out one of our dev builds. |
@woess The same issue occurs with the following dependencies, and is it now fixed in the next release
|
Describe GraalVM and your environment :
java -Xinternalversion
:Describe the issue
Hello,
I'm using
ScriptEngine
API to call some JS scripts in my application.In normal execution it's fine. Trying to package it as a native-image app I got
NullPointerException
when trying to call theeval
method on theScriptEngine
instance at the runtime.After investigating some related issues here, I added
--language:js
to the build properties and then I got the below exceptions:Here is the list of the flags I'm using for building the image:
Finally the version of the related dependencies:
The prerequisite packages are installed
sudo apt-get install build-essential libz-dev zlib1g-dev
Update1
Exact same exception with GraalVM version CE
22.1.0
JDK 11:Update2
I found out that having below dependency is causing the exception. Removing it I get no exception at the build time and both building and execution are fine with
--language:js
flag.Update3
By investigating the transitive dependencies I found out the conflict is exactly with this one
Here is a repos to reproduce the exception:
https://github.com/ahoora08/graalvm-js
The text was updated successfully, but these errors were encountered: