Skip to content

Commit 0ecd8d7

Browse files
authored
[Runner] Add hot-fix to symlink libc.musl-<ARCH>.so.1 -> libc.so (#192)
1 parent e89113f commit 0ecd8d7

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "BinaryBuilderBase"
22
uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e"
33
authors = ["Elliot Saba <staticfloat@gmail.com>"]
4-
version = "1.1.1"
4+
version = "1.1.2"
55

66
[deps]
77
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"

src/Runner.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,18 @@ function runner_setup!(workspaces, mappings, workspace_root, verbose, kwargs, pl
11441144
end
11451145
end
11461146

1147+
if libc(platform) == "musl"
1148+
# Libraries that link to Musl C library need `libc.musl-<ARCH>.so.1`. However in
1149+
# our Musl toolchains we have only `libc.so` in `${sys_root}/usr/lib`, so here we
1150+
# create a symlink `libc.musl-<ARCH>.so.1` -> `libc.so` until we fix this directly in
1151+
# the compiler shards.
1152+
dir = mktempdir()
1153+
sysroot_libdir = joinpath(dir, "$(aatriplet(platform))/sys-root/usr/lib")
1154+
mkpath(sysroot_libdir)
1155+
symlink("libc.so", joinpath(sysroot_libdir, "libc.musl-$(map_rust_arch(platform)).so.1"))
1156+
push!(mappings, dir => "/opt/$(aatriplet(platform))/nonce")
1157+
end
1158+
11471159
# the workspace_root is always a workspace, and we always mount it first
11481160
insert!(workspaces, 1, workspace_root => "/workspace")
11491161

0 commit comments

Comments
 (0)