graal
graal copied to clipboard
[GR-30634] Native Linker - missing symbol when using JDK-16 Memory Model
Describe the issue When compiling a codebase that uses the jdk-16 memory model into a native application you will get (at the very least) linker errors:
/usr/bin/ld: tech.v3.datatype.main.o:(.data+0xb28): undefined reference to `Java_jdk_internal_misc_ScopedMemoryAccess_closeScope0'
Steps to reproduce the issue
- Get JDK-16-enabled graalvm
- Use scoped memory segments in your application
- Compile to native application
Describe GraalVM and your environment:
- GraalVM version
graalvm-ce-java16-21.1.0-dev
using included java for jdk-16 access. - OS: Ubuntu
- Architecture: AMD64
More details
The follow on from this is going to be issues around using CLinker and various other classes from the foreign module.
Hi @cnuernber Is it possible for you to provide a small reproducer for this issue? that would be greatly helpful of you
My pleasure:
https://github.com/cnuernber/gn-issue-3314
I'm facing this issue as well. Is this being worked on?
I'm using graal 21.3, jdk 17.
I'm still having this issue with graalvm-ce-java17-22.0.0.2
.
Yes, the issue is tracked internally on GR--30634
Recently started using Arena that is closed after use, and ran into this. Is there a workaround besides not closing the arena?
For the others that may currently have the same issue I just wanted to point out that it still persists with JDK 21, but I worked around it by using Corretto JDK 22, unsure if the pure JDK 22 also works.
Now compiles like a charm.