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

The build failed with compilation error and $ mx build on Open JDK 21 LTS JDK #9652

Closed
Tibor17 opened this issue Sep 11, 2024 · 5 comments
Closed
Assignees
Labels
openjdk-updates Related to compatibility with upstream JDK changes truffle

Comments

@Tibor17
Copy link

Tibor17 commented Sep 11, 2024

Describe GraalVM and your environment :

  • GraalVM version or commit id if built from source: latest commit 84daad0 (HEAD -> master, origin/master, origin/HEAD)
  • JDK version: Open JDK 21
  • OS and OS Version: Ubuntu
  • Architecture: x64
  • The output of java -Xinternalversion:
 **OpenJDK 64-Bit Server VM (21+35-2513) for linux-amd64 JRE (21+35-2513), built on 2023-08-09T20:25:10Z by "mach5one" with gcc 11.2.0**

Have you verified this issue still happens when using the latest snapshot?
This is the build problem with the compiler.

Describe the issue

/home/tibor17/Idea/graalvm-builder/graal/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/bytecode/BytecodeDisassembler.java:356: error: method lookupConstant in interface ConstantPool cannot be applied to given types;
                Object constant = cp.lookupConstant(cpi, false);
                                    ^
  required: int
  found:    int,boolean
  reason: actual and formal argument lists differ in length
/home/tibor17/Idea/graalvm-builder/graal/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/java/BytecodeParser.java:4719: error: method lookupConstant in interface ConstantPool cannot be applied to given types;
        Object result = constantPool.lookupConstant(cpi, allowBootstrapMethodInvocation);
                                    ^
  required: int
  found:    int,boolean
  reason: actual and formal argument lists differ in length
...
Building Java module org.graalvm.shadowed.icu4j (truffle-icu4j.jar) from TRUFFLE_ICU4J
2 errors

Compiling jdk.graal.compiler with javac-daemon(JDK 21): Failed due to error: 1

Steps to reproduce the issue

export JAVA_HOME=/path/to/jdk-21
$ cd compiler
$ mx build
@Tibor17 Tibor17 changed the title The build failed with compilation error with $ mx build on Open JDK 21 LTS JDK The build failed with compilation error and $ mx build on Open JDK 21 LTS JDK Sep 11, 2024
@selhagani
Copy link
Member

Hi @Tibor17,
Thanks for reaching out to us.

Could you please try downloading and setting up GraalVM before you test? You can download it from this link

@selhagani selhagani self-assigned this Sep 11, 2024
@Tibor17
Copy link
Author

Tibor17 commented Sep 12, 2024

Hi @Tibor17, Thanks for reaching out to us.

Could you please try downloading and setting up GraalVM before you test? You can download it from this link

I have ckecked the link. I am not testing any application with GraalVM. I am building GraalVM. How this link would help me while building?

@selhagani
Copy link
Member

I get you. Thank you for reporting this. I managed to reproduce the issue you're facing and I confirm the error that you encountered. Unfortunately I wasn't able to understand where the issue comes from. Could you please contact mx team directly? you can open an issue using this link: https://github.com/graalvm/mx/issues

Thank you!

@JohnTortugo
Copy link
Contributor

I'm getting this same error.

@zakkak zakkak added the openjdk-updates Related to compatibility with upstream JDK changes label Oct 21, 2024
@zakkak
Copy link
Collaborator

zakkak commented Oct 21, 2024

Hi @selhagani, this looks like a compatibility issue with graal master and upstream OpenJDK 21 LTS. It doesn't look like an mx issue.

AFAIK the GraalVM team keeps graal master compatible with labsjdk 21, but not with upstream OpenJDK builds. Even if you fix or work around this issue the build will probably fail at a later stage due to graalvm#598

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openjdk-updates Related to compatibility with upstream JDK changes truffle
Projects
None yet
Development

No branches or pull requests

4 participants