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

Quarkus native tests fail with latest GraalVM CE for JDK 22, 24.0.0-dev builds due to wildfly substitution #36686

Closed
zakkak opened this issue Oct 25, 2023 · 3 comments · Fixed by #36944
Assignees
Labels
Milestone

Comments

@zakkak
Copy link
Contributor

zakkak commented Oct 25, 2023

Describe the bug

Quarkus native tests fail with latest GraalVM CE for JDK 22, 24.0.0-dev builds due to wildfly substitution.

The error is:

Error: Substitution target for org.wildfly.common.Substitutions$Target_GraalDirectives is not loaded. Use field `onlyWith` in the `TargetClass` annotation to make substitution only active when needed.
com.oracle.svm.core.util.UserError$UserException: Substitution target for org.wildfly.common.Substitutions$Target_GraalDirectives is not loaded. Use field `onlyWith` in the `TargetClass` annotation to make substitution only active when needed.
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:73)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findTargetClass(AnnotationSubstitutionProcessor.java:1098)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findTargetClass(AnnotationSubstitutionProcessor.java:1047)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findTargetClass(AnnotationSubstitutionProcessor.java:1043)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:375)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:353)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.createAnnotationSubstitutionProcessor(NativeImageGenerator.java:1058)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:924)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:595)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:555)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:540)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:722)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:143)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:98)

Expected behavior

Tests should build and pass.

Actual behavior

Tests fail to build.

How to Reproduce?

  1. Grab a dev build of GraalVM CE with [GR-49610] Rename jdk.compiler.graal to jdk.graal.compiler. oracle/graal#7650 and [GR-48318] Move compiler packages and module to jdk.compiler.graal namespace. oracle/graal#7621 (none available yet) or build it from source:
git clone https://github.com/graalvm/mx
git clone https://github.com/oracle/graal
cd graal
../mx/mx fetch-jdk --java-distribution labsjdk-ce-latest
export JAVA_HOME=/path/to/downloaded/labsjdk
../mx/mx --primary-suite-path substratevm --components="Native Image,LibGraal,Truffle SVM Macro" --native-images=native-image,lib:jvmcicompiler build
export GRAALVM_HOME=$(pwd)/sdk/latest_graalvm_home
  1. export GRAALVM_HOME=/path/to/the/deb-build
  2. ./mvnw -Dnative -pl integration-tests/jpa -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests clean package -Dquarkus.native.container-build=false

Output of uname -a or ver

No response

Output of java -version

No response

Mandrel or GraalVM version (if different from Java)

24.0.0-dev

Quarkus version or git rev

main

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

The issue is caused because wildfly tries to substitute a GraalVM internal class that is no longer available due to the package renaming in oracle/graal#7650 and oracle/graal#7621

@zakkak zakkak added kind/bug Something isn't working area/native-image labels Oct 25, 2023
@zakkak zakkak self-assigned this Oct 25, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 25, 2023

/cc @Karm (mandrel), @galderz (mandrel)

@zakkak
Copy link
Contributor Author

zakkak commented Oct 25, 2023

Upstream wildfly issue wildfly/wildfly-common#74

@zakkak
Copy link
Contributor Author

zakkak commented Oct 25, 2023

The issue has been fixed upstream and should be part of the next release (1.6.1?)

zakkak added a commit to zakkak/quarkus that referenced this issue Nov 8, 2023
@quarkus-bot quarkus-bot bot added this to the 3.6 - main milestone Nov 9, 2023
michelle-purcell pushed a commit to michelle-purcell/quarkus that referenced this issue Nov 9, 2023
michelle-purcell pushed a commit to michelle-purcell/quarkus that referenced this issue Nov 9, 2023
computerlove pushed a commit to computerlove/quarkus that referenced this issue Nov 27, 2023
DavideD pushed a commit to DavideD/quarkus that referenced this issue Nov 27, 2023
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant