Skip to content

Commit 2fef037

Browse files
committed
fix(compat.sycl-runtime): the loader needs libz, and a developer machine had it
CI reported what this machine could not: `libur_loader.so.0` needs `libz.so.1`, the payload does not carry it, and the farm's RUNPATH is the only place the loader looks. On a machine with zlib installed for unrelated reasons the omission was invisible; on a fresh runner every library in the chain failed on it. `xim:zlib` is declared and farmed, and the stub search now tries `lib/` as well as `lib64/` because zlib ships under the former.
1 parent be650b7 commit 2fef037

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

‎pkgs/c/compat.sycl-runtime.lua‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ package = {
5757
-- The install-time edge. Materialised when THIS package installs,
5858
-- which is what makes the payload's directory exist by the time
5959
-- install() below reads it.
60-
deps = { "xim:dpcpp@7.1.0" },
60+
-- `xim:zlib` is not decoration. `libur_loader.so.0` needs
61+
-- `libz.so.1`, which the payload does not carry, and the farm's
62+
-- RUNPATH is the only place the loader looks for it. On a
63+
-- developer machine that had zlib installed for other reasons the
64+
-- omission was invisible; a fresh runner reported
65+
-- `FAIL libsycl.so.9: libz.so.1: cannot open shared object file`.
66+
deps = { "xim:dpcpp@7.1.0", "xim:zlib" },
6167
["2026.09.06"] = {
6268
-- Nothing downloaded matters: the content is the set of
6369
-- symlinks install() creates. A stable, tiny anchor keeps the
@@ -177,15 +183,19 @@ local function farm_libc_stubs(dst, payload)
177183
local wanted = {
178184
{ pkg = "xim-x-glibc", names = { "librt.so.1", "libpthread.so.0", "libdl.so.2" } },
179185
{ pkg = "xim-x-gcc-runtime", names = { "libstdc++.so.6", "libgcc_s.so.1" } },
186+
-- zlib ships under lib/ rather than lib64/, so the search below tries
187+
-- both rather than assuming one layout per package.
188+
{ pkg = "xim-x-zlib", names = { "libz.so.1" } },
180189
}
181190
local found = 0
182191
for _, group in ipairs(wanted) do
183192
for _, name in ipairs(group.names) do
184193
if not os.isfile(path.join(dst, name)) then
185194
for _, root in ipairs(roots) do
186195
local f = io.popen(string.format(
187-
[[ls -1d "%s"/%s/*/lib64/%s 2>/dev/null | sort -V | tail -1]],
188-
root, group.pkg, name))
196+
[[ls -1d "%s"/%s/*/lib64/%s "%s"/%s/*/lib/%s 2>/dev/null ]]
197+
.. [[| sort -V | tail -1]],
198+
root, group.pkg, name, root, group.pkg, name))
189199
local hit = f and (f:read("l") or "") or ""
190200
if f then f:close() end
191201
if hit ~= "" then

0 commit comments

Comments
 (0)