-
Notifications
You must be signed in to change notification settings - Fork 950
[1.x] Static link musl
during x86 Linux Native Image build
#7823
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
Conversation
musl
during Native Image buildmusl
during Native Image build
CI failure is false positive.
|
musl
during Native Image buildmusl
during Linux Native Image build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
It failed 3 times in a row |
.github/workflows/ci.yml
Outdated
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: '23' | ||
native-image-musl: 'true' | ||
set-java-home: 'false' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an FYI, we produce sbtn in a different repo, so we'd likely need to copy-paste this setting and implement a manual version for QEMU ARM Linux emulation - https://github.com/sbt/sbtn-dist, which I was doing last night coincidentally - eed3si9n/sbtn-dist@e166373
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't make to make a new release soon we can wait for Github Action arm64 runner which are planned to arrive by EOY, then make PR at sbtn-dist
end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So it turns out that --libc=musl
is not supported on ARM Linux:
https://www.graalvm.org/21.3/reference-manual/native-image/ARM64/index.html
This is [info] Running nio/make-clone
[info] [info] welcome to sbt 1.10.4-SNAPSHOT (Eclipse Adoptium Java 21.0.4)
[info] [info] loading settings for project global-plugins from metals.sbt ...
[info] [info] loading global plugins from /tmp/sbt_e3f41de7/global/plugins
[info] [info] loading project definition from /tmp/sbt_e3f41de7/project
[info] [info] compiling 1 Scala source to /tmp/sbt_e3f41de7/project/target/scala-2.12/sbt-1.0/classes ...
[info] [info] done compiling
[info] [success] Generated .bloop/sbt_e3f41de7-build.json
[info] [success] Total time: 0 s, completed Oct 23, 2024, 8:29:06 AM
[info] [info] loading settings for project sbt_e3f41de7 from build.sbt,tests.sbt ...
[info] [warn] Discarding 4 session settings. Use 'session save' to persist session settings.
[info] [info] set current project to sbt_e3f41de7 (in build file:/tmp/sbt_e3f41de7/)
[info] [warn] there are 2 keys that are not used by any other settings/tasks:
[info] [warn]
[info] [warn] * sbt_e3f41de7 / compileLib / target
[info] [warn] +- /tmp/sbt_e3f41de7/build.sbt:12
[info] [warn] * sbt_e3f41de7 / linkLib / target
[info] [warn] +- /tmp/sbt_e3f41de7/build.sbt:46
[info] [warn]
[info] [warn] note: a setting might still be used by a command; to exclude a key from this `lintUnused` check
[info] [warn] either append it to `Global / excludeLintKeys` or call .withRank(KeyRanks.Invisible) on the key
[info] [info] Compiling /tmp/sbt_e3f41de7/src/lib/lib.c to /tmp/sbt_e3f41de7/target/streams/_global/compileLib/_global/streams/lib.o
[info] [info] Linking /tmp/sbt_e3f41de7/target/streams/_global/linkLib/_global/streams/libfoo.so
[info] [info] Building executable /tmp/sbt_e3f41de7/out/main/main.out
[info] [info] Running /tmp/sbt_e3f41de7/out/main/main.out with arguments: '1'
[info] [error] java.io.IOException: Cannot run program "/tmp/sbt_e3f41de7/out/main/main.out": error=2, No such file or directory
[info] [error] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
[info] [error] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
[info] [error] at RunBinary$.apply(RunBinary.scala:10)
[info] [error] at $585ecb8736b3c86dd54c$.$anonfun$$sbtdef$5(/tmp/sbt_e3f41de7/build.sbt:108)
[info] [error] at sbt.util.LoggerContext$LoggerContextImpl$Log.log(LoggerContext.scala:124)
[info] [error] at sbt.internal.util.ManagedLogger.log(ManagedLogger.scala:42)
[info] [error] at sbt.util.Logger.info(Logger.scala:27)
[info] [error] at $585ecb8736b3c86dd54c$.$anonfun$$sbtdef$3(/tmp/sbt_e3f41de7/build.sbt:108)
[info] [error] at $585ecb8736b3c86dd54c$.$anonfun$$sbtdef$3$adapted(/tmp/sbt_e3f41de7/build.sbt:99)
....
[info] [error] Caused by: java.io.IOException: error=2, No such file or directory
[info] [error] at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
[info] [error] at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:295)
[info] [error] at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:225)
[info] [error] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
[info] [error] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
[info] [error] at RunBinary$.apply(RunBinary.scala:10)
[info] [error] at $585ecb8736b3c86dd54c$.$anonfun$$sbtdef$5(/tmp/sbt_e3f41de7/build.sbt:108)
....
[info] [error] (executeMain) java.io.IOException: Cannot run program "/tmp/sbt_e3f41de7/out/main/main.out": error=2, No such file or directory
[info] [error] Total time: 0 s, completed Oct 23, 2024, 8:29:08 AM
Error: x nio/make-clone
Error: Cause of test exception: {line 1} Command failed: executeMain failed It's probably overspecifying as an sbt test, so I'm okay with removing the test. |
I should not have made a conclusion at 1 AM late night 😢. |
musl
during Linux Native Image buildmusl
during x86 Linux Native Image build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
[1.x] Reverts #7823 to restore Linux `sbtn`
Partially fixes #7785
GraalVM does not support static link musl for arm64, we have to wait for upstream support. Hopefully not too many people use
abtn
on arm64 Linux distos without `GLIBC_2.32' installed...