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

Mandrel fails to build with upstream 23.1 release branch #554

Closed
zakkak opened this issue Jul 31, 2023 · 3 comments
Closed

Mandrel fails to build with upstream 23.1 release branch #554

zakkak opened this issue Jul 31, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@zakkak
Copy link
Collaborator

zakkak commented Jul 31, 2023

Description

oracle#7076 breaks mandrel builds.

Since its merge the builds fail with:

Exception in thread "main" java.lang.IllegalArgumentException: Missing scheme
	at java.base/java.nio.file.Path.of(Path.java:200)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.callListModules(NativeImage.java:1617)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.listModulesFromPath(NativeImage.java:1585)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.buildImage(NativeImage.java:1449)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.completeImageBuild(NativeImage.java:1196)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.build(NativeImage.java:1773)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1738)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.main(NativeImage.java:1712)
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Failed, exit code: 1
	at OperatingSystem.exec(build.java:1731)
	at build.buildAgents(build.java:254)
	at build.main(build.java:236)
Caused by: java.lang.RuntimeException: Failed, exit code: 1
	at OperatingSystem.exec(build.java:1720)
	at build.buildAgents(build.java:254)
	at build.main(build.java:236)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at jdk.compiler/com.sun.tools.javac.launcher.Main.execute(Main.java:484)
	at jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:208)
	at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:135)

Inspecting the case of the error we see that OpenJDK throws a java.lang.module.ResolutionException when asking it to list the modules:

/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/bin/java -p /home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/jvmci/graal-sdk.jar:/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/truffle/truffle-compiler.jar:/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/svm/builder/objectfile.jar:/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/svm/builder/native-image-base.jar:/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/svm/builder/pointsto.jar:/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/svm/builder/svm.jar:/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/graalvm/jvmti-agent-base.jar:/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/graalvm/svm-agent.jar:/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/graalvm/svm-configure.jar:/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/graalvm/svm-driver.jar:/home/zakkak/code/mandrel-packaging/mandrel-java21-23.1.0-dev70b50a854f6/lib/svm/library-support.jar --list-modules

Error occurred during initialization of boot layer
java.lang.module.ResolutionException: Module org.graalvm.nativeimage.pointsto does not read a module that exports org.graalvm.compiler.options

Note however, that running the same command on the same jars but this time using GraalVM works as expected. However, using labsJDK still fails which is an indication that this is jlink-related. Indeed, trying to build graal with --no-jlinking results in the same error:

Building libjvmcicompiler.so.image... [dependency NATIVEBRIDGE updated]
Exception in thread "main" java.lang.IllegalArgumentException: Missing scheme
	at java.base/java.nio.file.Path.of(Path.java:200)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.callListModules(NativeImage.java:1616)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.listModulesFromPath(NativeImage.java:1585)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.buildImage(NativeImage.java:1449)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.completeImageBuild(NativeImage.java:1196)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.build(NativeImage.java:1772)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1737)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.main(NativeImage.java:1711)
Exception in thread "main" java.lang.IllegalArgumentException: Missing scheme
	at java.base/java.nio.file.Path.of(Path.java:200)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.callListModules(NativeImage.java:1616)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.listModulesFromPath(NativeImage.java:1585)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.buildImage(NativeImage.java:1449)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.completeImageBuild(NativeImage.java:1196)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.build(NativeImage.java:1772)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1737)
	at org.graalvm.nativeimage.driver/com.oracle.svm.driver.NativeImage.main(NativeImage.java:1711)

Building native-image.image: Failed due to error: 1

How To Reproduce

Steps to reproduce the behavior:

export JAVA_HOME=/path/to/openJD-21
git clone https://github.com/graalvm/mandrel-packaging.git
git clone https://github.com/oracle/graal.git 
cd mandrel-packaging
$JAVA_HOME/bin/java -ea build.java --mx-home /path/to/mx --mandrel-repo ../graal

Configuration:

  • OS: Fedora 38
  • Architecture: AMD64
  • Mandrel version: 23.1-dev 70b50a8
  • JDK version: OpenJDK 21+32 EA

Expected behavior

Mandrel build should succeed

@jerboaa
Copy link
Collaborator

jerboaa commented Aug 21, 2023

This should be fixed once oracle#7205 and graalvm/mandrel-packaging#360 are in.

@jerboaa jerboaa added this to the 23.1.0.0-Final milestone Aug 28, 2023
@jerboaa jerboaa changed the title Mandrel fails to build with latest graal/master Mandrel fails to build with upstream 23.1 release branch Sep 5, 2023
@jerboaa
Copy link
Collaborator

jerboaa commented Sep 5, 2023

The release branch 23.1 has a downstream fix for the --no-jlinking issue. GHA is running here:
https://github.com/graalvm/mandrel/actions/runs/6074123813

I'll close this issue once CI succeeds and create a cloned issue for master (24.0) where we still observe the issue.

@jerboaa
Copy link
Collaborator

jerboaa commented Sep 5, 2023

Closing as CI above confirms that Mandrel builds. Other issues are a different matter.

@jerboaa jerboaa closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants