Repository navigation
package-linux: the HSA runtime set ships with RUNPATH $ORIGIN, so a package from the pinned toolchain passes payload-runpath (engine#3287) - #3313
Conversation
…ackage from the pinned toolchain passes payload-runpath (engine#3287) TheRock links libhsa-runtime64.so.1 and its siblings with RPATHs into its own pip tree ($ORIGIN/../../_rocm_sdk_core/lib/llvm/lib, ...). package-linux.sh staged the set as built, so a package made from the pinned toolchain (config/hrx-toolchain.config) carried 11 non-$ORIGIN RPATHs and failed the release check's payload-runpath row; the c35 payload passed only because its set had been rewritten outside the tree. pack_origin_rpath (scripts/pack-elf.sh) gives every dynamic ELF directly in a directory that carries an RPATH $ORIGIN alone, leaving files with none or with $ORIGIN already byte-identical. package-linux.sh runs it on hrx/llama/bin after staging the set and before the set's ldd check. Measured: a package from the pinned toolchain now has 0 non-$ORIGIN RUNPATHs and its 12 HSA-set files are byte-for-byte the tested c35 payload's (libhsa-runtime64.so.1 sha256 f5462dc3...). NOTICE-BINARY says the RUNPATH is the one change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
PR Reviewer Guide 🔍(Review updated until commit 4bc3e26)Here are some key observations to aid the review process:
|
|
Hardware (strixhalo, AI MAX+ 395, c35 appliance, 2026-11-22): this branch's package (built on ryzen with the pinned toolchain), served through its OWN rewritten HSA set: So the set loads and drives HRX0 with RUNPATH |
…the CI container instead of skipping The build job installs gcc-16 (no bare cc), patchelf and binutils; the test looked for cc/gcc/clang only and returned 77. A missing tool is now a failure, not a skip, and the SKIP_RETURN_CODE property is gone. Run in ubuntu:26.04 (the CI image, unprivileged) with gcc-16 binutils patchelf: PASS, all 12 rows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Persistent review updated to latest commit 7c40cb5 |
…d print ldd/readelf when it does not resolve CI's build job reported 'librunpath.so.1 does not resolve libdep.so.1 beside itself' once; 16 parallel runs in the same ubuntu:26.04 image with gcc-16 pass. The row now says what ldd resolved and shows the dynamic section, so the next failure names its cause instead of a bare FAIL. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Persistent review updated to latest commit 4bc3e26 |
Part of #3287 (release tooling: the cut must reproduce the tested payload from a fresh build).
Problem.
scripts/package-linux.shstages TheRock's HSA runtime set (libhsa-runtime64.so.1, aqlprofile, rocprofiler-register, the 8 rocm_sysdeps libraries) as built. TheRock links them with RPATHs into its own pip tree ($ORIGIN/../../_rocm_sdk_core/lib/llvm/lib,$ORIGIN/rocm_sysdeps/lib, ...), so a package made from the pinned toolchain (config/hrx-toolchain.config, 10.3.0a20261031) carries 11 non-$ORIGINRPATHs and fails1bit-release-check'spayload-runpathrow. The c35 payload passed only because its set had been rewritten outside the tree.Fix.
pack_origin_rpath <dir>inscripts/pack-elf.sh: every dynamic ELF directly in<dir>that carries an RPATH/RUNPATH gets$ORIGINalone; files with none, or already$ORIGIN, stay byte-identical; no recursion, symlinks untouched.package-linux.shcalls it onhrx/llama/binafter staging the set and before the set's own ldd check. NOTICE-BINARY now says the RUNPATH is the one change to the set.Measured (ryzen, 2026-11-22), packaging an engine build made with the pinned toolchain at
/opt/rocm-sdk/rocm-sdk-10.3.0a20261031-gfx1151:$ORIGIN(all in the HSA set)hrx/llama/bin: + the HSA runtime set (12 files ...; 11 RUNPATH(s) set to $ORIGIN), 0 non-$ORIGINRUNPATHs in the packagecmpagainstrel-c35/payload/1bit/hrx/llama/bin; libhsa-runtime64.so.1 sha256f5462dc3…, from the pin's21a66824…)Tests.
tests/pack_origin_rpath_test.sh(ctestpack_origin_rpath): compiled fixtures with a TheRock-shaped DT_RPATH and a RUNPATH are rewritten and still resolve their sibling with no LD_LIBRARY_PATH;$ORIGIN-only and rpath-less libraries, a subdirectory, a symlink and a non-ELF file are untouched; a second run changes nothing; package-linux.sh calls it between staging the set and checking it.pack_modesandpack_checkstill pass.scripts/pre-pr-checks.sh --base origin/main: 17 green, 3 skipped.Hardware: not yet run on strixhalo with this exact package (queued behind the GPU lock); I will add the result as a comment.
🤖 Generated with Claude Code