-
Notifications
You must be signed in to change notification settings - Fork 1.7k
cannot generate shared library #2193
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
Comments
the problem seems to be that "-cp" is not honoured. |
Looking at the
(added Could it be that
is not the classpath entry that holds the classes you want to build an image from in your environment?
return? |
@uvilop are you still having trouble building shared library native-images? |
The instructions in Implementing Native Methods in Java with Substrate VM are misleading. In particular, the following statement is false:
First of all one has to compile the Java class to bytecode. Afterwards one executes The example code provided there works as is. |
@uvilop please reopen are you still having trouble building shared library native-images. |
Describe GraalVM and your environment :
Run the following to capture compiler version
cl.exe
cc -v
gcc --version
Run the following to capture linker version
cl.exe
cc -Wl,-v
gcc -Wl,--version
java -Xinternalversion
:Have you verified this issue still happens when using the latest snapshot?
You can find snapshot builds here: https://github.com/graalvm/graalvm-ce-dev-builds/releases
Describe the issue
A clear and concise description of the issue.
Describe the full native-image command
Capture full native-image command by running with the `--verbose` flag e.g.:
Code snippet or code repository that reproduces the issue
Steps to reproduce the issue
Please include both build steps as well as run steps
i am trying to reproduce this hello world example.
when i check the shared library:
nm -a libhellonative.so | grep add
the "add" method does not occure.
and consequently:
java -Djava.library.path=. hello.Run
Exception in thread "main" java.lang.UnsatisfiedLinkError: hello/Run.createIsolate()J
at hello.Run.main(Run.java:28)
Expected behavior
i expect that the generated shared library contains a symbol for the native mthod.
but it does not.
Additional context
Details
The text was updated successfully, but these errors were encountered: