graalvm / mandrel-packaging

6 stars 8 forks source link

Explicitly build graal-sdk and add nativeimage, word and collections #359

Closed zakkak closed 1 year ago

zakkak commented 1 year ago

New packages introduced in oracle/graal#7171

Depends on https://github.com/oracle/graal/pull/7205

Supersedes https://github.com/graalvm/mandrel-packaging/pull/358 (?)

jerboaa commented 1 year ago

Unfortunately this doesn't work for me. While testing a rebase of #354 I've run into this error:

[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-install-plugin:2.4:install-file' with basic configurator -->
[DEBUG]   (f) artifactId = truffle-compiler
[DEBUG]   (f) createChecksum = false
[DEBUG]   (f) file = /disk/graal/upstream-sources/graal/truffle/mxbuild/jdk21/dists/jdk17/truffle-compiler.jar
[DEBUG]   (f) groupId = org.graalvm.truffle
[DEBUG]   (f) localRepository =       id: local
      url: file:///home/sgehwolf/.m2/repository/
   layout: default
snapshots: [enabled => true, update => always]
 releases: [enabled => true, update => always]
   blocked: false

[DEBUG]   (f) packaging = jar
[DEBUG]   (f) pomFile = /tmp/tmpng1me9ag.pom
[DEBUG]   (f) repositoryLayout = default
[DEBUG]   (f) sources = /disk/graal/upstream-sources/graal/truffle/mxbuild/jdk21/dists/jdk17/truffle-compiler.src.zip
[DEBUG]   (f) updateReleaseInfo = false
[DEBUG]   (f) version = 23.1.0.SNAPSHOT
[DEBUG] -- end configuration --
[INFO] Installing /disk/graal/upstream-sources/graal/truffle/mxbuild/jdk21/dists/jdk17/truffle-compiler.jar to /home/sgehwolf/.m2/repository/org/graalvm/truffle/truffle-compiler/23.1.0.SNAPSHOT/truffle-compiler-23.1.0.SNAPSHOT.jar
[DEBUG] Writing tracking file /home/sgehwolf/.m2/repository/org/graalvm/truffle/truffle-compiler/23.1.0.SNAPSHOT/_remote.repositories
[INFO] Installing /tmp/tmpng1me9ag.pom to /home/sgehwolf/.m2/repository/org/graalvm/truffle/truffle-compiler/23.1.0.SNAPSHOT/truffle-compiler-23.1.0.SNAPSHOT.pom
[DEBUG] Writing tracking file /home/sgehwolf/.m2/repository/org/graalvm/truffle/truffle-compiler/23.1.0.SNAPSHOT/_remote.repositories
[DEBUG] Installing org.graalvm.truffle:truffle-compiler:23.1.0.SNAPSHOT/maven-metadata.xml to /home/sgehwolf/.m2/repository/org/graalvm/truffle/truffle-compiler/23.1.0.SNAPSHOT/maven-metadata-local.xml
[DEBUG] Installing org.graalvm.truffle:truffle-compiler/maven-metadata.xml to /home/sgehwolf/.m2/repository/org/graalvm/truffle/truffle-compiler/maven-metadata-local.xml
[INFO] Installing /disk/graal/upstream-sources/graal/truffle/mxbuild/jdk21/dists/jdk17/truffle-compiler.src.zip to /home/sgehwolf/.m2/repository/org/graalvm/truffle/truffle-compiler/23.1.0.SNAPSHOT/truffle-compiler-23.1.0.SNAPSHOT-sources.jar
[DEBUG] Writing tracking file /home/sgehwolf/.m2/repository/org/graalvm/truffle/truffle-compiler/23.1.0.SNAPSHOT/_remote.repositories
[DEBUG] Installing org.graalvm.truffle:truffle-compiler:23.1.0.SNAPSHOT/maven-metadata.xml to /home/sgehwolf/.m2/repository/org/graalvm/truffle/truffle-compiler/23.1.0.SNAPSHOT/maven-metadata-local.xml
[DEBUG] Installing org.graalvm.truffle:truffle-compiler/maven-metadata.xml to /home/sgehwolf/.m2/repository/org/graalvm/truffle/truffle-compiler/maven-metadata-local.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.224 s
[INFO] Finished at: 2023-08-21T18:17:08+02:00
[INFO] ------------------------------------------------------------------------
  File "/disk/graal/upstream-sources/mx/mx_enter.py", line 44, in <module>
    mx._main_wrapper()
  File "/disk/graal/upstream-sources/mx/mx.py", line 18604, in _main_wrapper
    main()
  File "/disk/graal/upstream-sources/mx/mx.py", line 18590, in main
    retcode = c(command_args)
  File "/disk/graal/upstream-sources/mx/mx_commands.py", line 145, in __call__
    return self.command_function(*args, **kwargs)
  File "/disk/graal/upstream-sources/mx/mx.py", line 11978, in maven_deploy
    abort(f"'{dist.name}' is not built, run 'mx build' first")
  File "/disk/graal/upstream-sources/mx/mx.py", line 4260, in abort
    traceback.print_stack()
'POLYGLOT' is not built, run 'mx build' first
DEBUG [OperatingSystem] Execute [git, apply, -R, /disk/graal/upstream-sources/mandrel-packaging/resources/mandrel-packaging-wrapper.patch] in /disk/graal/upstream-sources/graal with environment variables []
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Failed, exit code: 1
    at OperatingSystem.exec(build.java:1819)
    at SequentialBuild.lambda$build$0(build.java:636)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:722)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
    at Mx.mavenDeploy(build.java:1053)
    at SequentialBuild.build(build.java:656)
    at build.main(build.java:83)
Caused by: java.lang.RuntimeException: Failed, exit code: 1
    at OperatingSystem.exec(build.java:1808)
    at SequentialBuild.lambda$build$0(build.java:636)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:722)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
    at Mx.mavenDeploy(build.java:1053)
    at SequentialBuild.build(build.java:656)
    at build.main(build.java:83)
    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)

See #360 for a fix which doesn't have that problem.

zakkak commented 1 year ago

superseded by #360