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

Module jdk.compiler.graal does not read a module that exports jdk.vm.ci.services #7651

Closed
Karm opened this issue Oct 23, 2023 · 13 comments
Closed

Comments

@Karm
Copy link
Contributor

Karm commented Oct 23, 2023

Unable to build the latest master 692f52a with the latest LabsJDK labsjdk-ce-21.0.1+12-jvmci-23.1-b22-linux-aarch64.

Steps to reproduce the issue

export JAVA_HOME=/home/tester/karm/labsjdk-ce-21.0.1-jvmci-23.1-b22
rm -rf ${GRAAL}/sdk/mxbuild/
pushd ${GRAAL}/vm
git checkout ${GIT_COMMIT}
mx --dynamicimports /substratevm,/tools,/sulong --exclude-components=nju,nic,ni,nil,llp --force-bash-launchers=polyglot build

Where GRAAL is the path to my cloned repo and GIT_COMMIT is 692f52a.
mx version: 3e76ddcb2a (latest ATTOW)

A much older commit, e.g. 81aafab works fine with the aforementioned latest LabsJDK. If it's not immediately obvious what's wrong, I can bisect that...

Describe GraalVM and your environment:

  • GraalVM version: 692f52a
  • JDK major version: 21
  • OS: CentOS 9 Stream
  • Architecture: aarch64
Compiling com.oracle.truffle.api.dsl.test with javac-daemon(JDK 21)... [dependency com.oracle.truffle.polyglot updated]
Compiling com.oracle.svm.graal.test with javac-daemon(JDK 21)... [dependency GRAAL_PROCESSOR updated]
Compiling com.oracle.svm.graal.hotspot.libgraal with javac-daemon(JDK 21)... [dependency TRUFFLE_LIBGRAAL_PROCESSOR updated]
Compiling com.oracle.svm.polyglot with javac-daemon(JDK 21)... [dependency GRAAL_PROCESSOR updated]
Compiling com.oracle.svm.truffle with javac-daemon(JDK 21)... [dependency GRAAL_PROCESSOR updated]
Archiving SVM... [dependency com.oracle.svm.graal updated]
Compiling com.oracle.svm.truffle.nfi with javac-daemon(JDK 21)... [dependency GRAAL_PROCESSOR updated]
Archiving SULONG_NATIVE_HOME... [dependency com.oracle.truffle.llvm.libraries.bitcode.libcxx updated]
Compiling com.oracle.svm.truffle.nfi.posix with javac-daemon(JDK 21)... [dependency GRAAL_PROCESSOR updated]
Compiling com.oracle.svm.truffle.nfi.windows with javac-daemon(JDK 21)... [dependency GRAAL_PROCESSOR updated]
/usr/lib64/python3.9/tarfile.py:2239: RuntimeWarning: The default behavior of tarfile extraction has been changed to disallow common exploits (including CVE-2007-4559). By default, absolute/parent paths are disallowed and some mode bits are cleared. See https://access.redhat.com/articles/7004769 for more details.
  warnings.warn(
Building com.oracle.truffle.llvm.libraries.bitcode_aarch64 with Ninja... [dependency LLVM_TOOLCHAIN updated]
Building Java module org.graalvm.nativeimage.builder (svm.jar) from SVM
Error: Module jdk.compiler.graal does not read a module that exports jdk.vm.ci.services

Building graalvm-jimage: Failed due to error: 1
@jerboaa
Copy link
Collaborator

jerboaa commented Oct 24, 2023

This is caused by #7650.

@fniephaus @dougxc I take it that the intent is for master to be only JDK 22 compatible unless a JDK 21 has a patch like this one, right?

In other words, it shouldn't be an issue with recently updated labsjdk-21 and/or labsjdk-latest, but might be for OpenJDK users. Thanks!

@dougxc
Copy link
Member

dougxc commented Oct 24, 2023

openjdk/jdk#16189 ensures this also works for OpenJDK.

@jerboaa
Copy link
Collaborator

jerboaa commented Oct 24, 2023

openjdk/jdk#16189 ensures this also works for OpenJDK.

OK. OpenJDK 22, though, right?

@dougxc
Copy link
Member

dougxc commented Oct 24, 2023

OK. OpenJDK 22, though, right?

Yes. It will also works on labsjdk-21 where we backported this change (as noted above). I'm not sure it will be backported in OpenJDK.

@jerboaa
Copy link
Collaborator

jerboaa commented Oct 24, 2023

Thanks for the info.

@jerboaa
Copy link
Collaborator

jerboaa commented Oct 24, 2023

@dougxc In passing, it seems the labsjdk-21 patch still uses the jdk.compiler.graal name while graal master seems to expect jdk.graal.compiler.

@dougxc
Copy link
Member

dougxc commented Oct 24, 2023

There was a second renaming based on feedback in the OpenJDK PR.

@elkorchi elkorchi self-assigned this Jan 15, 2024
@elkorchi
Copy link
Member

@jerboaa @Karm Is this issue still relevant ? if not can you please close it ?

@jerboaa
Copy link
Collaborator

jerboaa commented Jan 22, 2024

It's still an issue for OpenJDK 21 based builds (not labsjdk21). But we are tracking it in graalvm#598. I'm going to close it here.

@jerboaa jerboaa closed this as completed Jan 22, 2024
@boris-petrov
Copy link
Contributor

boris-petrov commented Mar 19, 2024

I got this error (actually not exactly the same but java.lang.module.ResolutionException: Module jdk.graal.compiler does not read a module that exports jdk.vm.ci.services) when I upgraded Graal in my project from 23.1.2 to 24.0.0 running on OpenJDK 21.0.2. I'm using Graal via JVMCI, not GraalVM.

Am I missing something? What's the issue? This error doesn't speak too much to me. :)

@jerboaa
Copy link
Collaborator

jerboaa commented Mar 19, 2024

https://bugs.openjdk.org/browse/JDK-8318027 is in OpenJDK 22, but not in OpenJDK 21. 24.0.0 is OpenJDK 22 compatible only unless you use labsjdk 21 which has the backport.

@boris-petrov
Copy link
Contributor

@jerboaa thanks for the answer! That means that I cannot use 24.0.0 with OpenJDK 21 - I should stay on 23.1.2? And I can update to 24.0.0 once I migrate to JDK 22 where this problem won't exist?

@jerboaa
Copy link
Collaborator

jerboaa commented Mar 19, 2024

Yes.

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

No branches or pull requests

5 participants