mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
./gradlew buildNative fails: "ld: read-only segment has dynamic relocations"
#300
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sin-ack on GitHub (Mar 7, 2025).
System information
OS: Gentoo Linux 2.17 amd64
Compiler version: gcc version 14.2.1 20241221 (Gentoo Hardened 14.2.1_p20241221 p7)
Java version: openjdk 21.0.6 2025-01-21
Pkl commit:
18e7a7e87eDetails
I get the following error when running
./gradlew buildNative:Full build log
@bioball commented on GitHub (Mar 7, 2025):
This looks related: https://github.com/oracle/graal/issues/4076. See remediation here: https://github.com/oracle/graal/issues/4076#issuecomment-1304037035
By the way:
buildNativewill try to build two executables, using musl (statically linked) and glibc (dynamically linked), which we call alpine-linux and linux, respectively (if it finds the musl toolchain on the machine).Do you intend to build both? You can also choose to only build the dynamically linked executable with
./gradlew linuxExecutableAmd64.@sin-ack commented on GitHub (Mar 8, 2025):
Thanks for the tip re: variant; I think building the glibc version should be fine for now. Should this be kept open as a tracking issue or should it be closed?
@bioball commented on GitHub (Mar 8, 2025):
I don't think this one is on us to fix; it's something to do with native-image. I'll close this issue. Thanks!