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

[Native Image] JDK-8336768 breaks -H:+ForeignAPISupport #10304

Open
1 task done
zakkak opened this issue Dec 13, 2024 · 2 comments
Open
1 task done

[Native Image] JDK-8336768 breaks -H:+ForeignAPISupport #10304

zakkak opened this issue Dec 13, 2024 · 2 comments

Comments

@zakkak
Copy link
Collaborator

zakkak commented Dec 13, 2024

Describe the Issue

JDK-8336768 changed the signature of jdk.internal.foreign.abi.NativeEntryPoint#make breaking the substitution in com.oracle.svm.core.foreign.Target_jdk_internal_foreign_abi_NativeEntryPoint#make.

Using the latest version of GraalVM can resolve many issues.

GraalVM Version

ca7e8b3

Operating System and Version

Linux fedora 6.11.5-300.fc41.x86_64

Build Command

native-image -J-Dlogging.initial-configurator.min-level=500 -J-Duser.language=en -J-Duser.country=IE -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -H:+UnlockExperimentalVMOptions -H:IncludeLocales=en-IE -H:-UnlockExperimentalVMOptions -J-Dfile.encoding=UTF-8 -J--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED --features=io.quarkus.runner.Feature,io.quarkus.runtime.graal.DisableLoggingFeature,io.quarkus.runtime.graal.SkipConsoleServiceProvidersFeature -J--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED -J--add-exports=java.security.jgss/sun.security.jgss=ALL-UNNAMED -J--add-opens=java.base/java.text=ALL-UNNAMED -J--add-opens=java.base/java.io=ALL-UNNAMED -J--add-opens=java.base/java.lang.invoke=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -H:+UnlockExperimentalVMOptions -H:PrintAnalysisCallTreeType=CSV -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:BuildOutputJSONFile=quarkus-integration-test-picocli-native-999-SNAPSHOT-runner-build-output-stats.json -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:+GenerateBuildArtifactsFile -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:+AllowFoldMethods -H:-UnlockExperimentalVMOptions -H:+UnlockExperimentalVMOptions -H:+ForeignAPISupport -H:-UnlockExperimentalVMOptions -J-Djava.awt.headless=true --no-fallback --link-at-build-time -H:+UnlockExperimentalVMOptions -H:+ReportExceptionStackTraces -H:-UnlockExperimentalVMOptions -H:-AddAllCharsets --enable-url-protocols=http -H:NativeLinkerOption=-no-pie --enable-monitoring=heapdump -H:+UnlockExperimentalVMOptions -H:-UseServiceLoaderFeature -H:-UnlockExperimentalVMOptions -J--add-exports=org.graalvm.nativeimage/org.graalvm.nativeimage.impl=ALL-UNNAMED quarkus-integration-test-picocli-native-999-SNAPSHOT-runner -jar quarkus-integration-test-picocli-native-999-SNAPSHOT-runner.jar

Expected Behavior

Build should complete without errors.

Actual Behavior

Build fails with:

Error: Could not find target method: public static com.oracle.svm.core.foreign.Target_jdk_internal_foreign_abi_NativeEntryPoint com.oracle.svm.core.foreign.Target_jdk_internal_foreign_abi_NativeEntryPoint.make(jdk.internal.foreign.abi.ABIDescriptor,jdk.internal.foreign.abi.VMStorage[],jdk.internal.foreign.abi.VMStorage[],java.lang.invoke.MethodType,boolean,int,boolean)
Internal exception: com.oracle.svm.core.util.UserError$UserException: Could not find target method: public static com.oracle.svm.core.foreign.Target_jdk_internal_foreign_abi_NativeEntryPoint com.oracle.svm.core.foreign.Target_jdk_internal_foreign_abi_NativeEntryPoint.make(jdk.internal.foreign.abi.ABIDescriptor,jdk.internal.foreign.abi.VMStorage[],jdk.internal.foreign.abi.VMStorage[],java.lang.invoke.MethodType,boolean,int,boolean)
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:85)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.findOriginalMethod(AnnotationSubstitutionProcessor.java:872)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleAnnotatedMethodInSubstitutionClass(AnnotationSubstitutionProcessor.java:753)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleSubstitutionClass(AnnotationSubstitutionProcessor.java:700)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.handleClass(AnnotationSubstitutionProcessor.java:359)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor.init(AnnotationSubstitutionProcessor.java:315)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.createAnnotationSubstitutionProcessor(NativeImageGenerator.java:1132)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:977)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:566)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:534)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:545)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:731)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:151)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:99)

Steps to Reproduce

  1. Build GraalVM master
git clone https://github.com/quarkusio/quarkus.git     
cd quarkus                       
export GRAALVM_HOME=/path/to/latest/graalvm/build
./mvnw install -Dquickly -T4
./mvnw -Dnative -pl integration-tests/picocli-native -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests clean package -Dquarkus.native.container-build=false

Additional Context

No response

Build Log Output and Error Messages

No response

@fangerer
Copy link
Member

should be fixed with PR #10301

@zakkak
Copy link
Collaborator Author

zakkak commented Dec 13, 2024

Thank you @fangerer , leaving this open till we see it reflected in https://github.com/oracle/graal/tree/release/graal-vm/24.2 as well.

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

Successfully merging a pull request may close this issue.

2 participants