-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Description
When building for musl targets on Linux, build.sh only copies libhost.a to the target directory. However, platform/main.roc declares that musl targets also require crt1.o, libc.a, and libunwind.a:
x64musl: ["crt1.o", "libhost.a", "libunwind.a", app, "libc.a"],
arm64musl: ["crt1.o", "libhost.a", "libunwind.a", app, "libc.a"],This causes linker failures when trying to build Roc applications:
ld.lld: error: cannot open examples/../platform/targets/x64musl/crt1.o: No such file or directory
ld.lld: error: cannot open examples/../platform/targets/x64musl/libunwind.a: No such file or directory
ld.lld: error: cannot open examples/../platform/targets/x64musl/libc.a: No such file or directory
Fix:
The Rust toolchain already includes these files in its self-contained musl support directory at:
~/.rustup/toolchains/<toolchain>/lib/rustlib/<target>/lib/self-contained/
build.sh should copy these files for musl targets after building libhost.a.
Metadata
Metadata
Assignees
Labels
No labels