elf: only set rpaths to libs of the same arch
Metadata
Current evaluation
Merged as commit 17f1f8c2f: elf dependency resolution now matches architecture (in addition to soname), so rpaths only point to libs of the same arch. Fixes LP #1752964 (i386 libc picked over amd64).
Resolution: closed resolved
Reason: PR #1988 was approved and merged into master as commit 17f1f8c2f ("elf: only set rpaths to libs of the same arch"), the only commit in elf.py matching that title; the arch_tuple based on EI_CLASS/EI_DATA/e_machine is still present in snapcraft/elf/_elf_file.py today. The work also rebase-landed on #1959 (64f78f762).
Evaluated by: mr-cal-bot
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as commit 17f1f8c2f: elf dependency resolution now matches architecture (in addition to soname), so rpaths only point to libs of the same arch. Fixes LP #1752964 (i386 libc picked over amd64). | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/snapcraft#1988 as commit 17f1f8c2f, restricting ELF rpath selection to libraries matching the target architecture and fixing LP #1752964. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged after reviewer approval. Fixes LP #1752964 by restricting ELF rpath resolution to libraries matching the target architecture alongside soname, preventing incorrect selection when multiple architectures exist in the core snap. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Fixes LP #1752964 by restricting ELF rpath resolution to libraries matching the target architecture, preventing incorrect cross-architecture selections like i386 over amd64. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcraft#1959
(confidence 85%)
Rebase base referenced in the PR body; merged as 64f78f762 and likewise added arch detection to dependency matching.
-
Related To:
snapcraft#1989
(confidence 60%)
Follow-up commit 393ba2c63 'elf: don't parse elf more than necessary' landed alongside #1988.
-
Duplicate Of:
snapcraft#1959
(confidence 45%)
Overlapping arch-detection work in ELF dependency resolution; later commit d65c8de2e ('elf: read ELF type when extracting attributes') refined this.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1781 many: set rpath for elf files for classic | snapcraft | merged | Merged as commit 3eafb9dd6, adding patchelf-based $ORIGIN-relative rpaths for ELF files in classic snaps and avoiding LD_LIBRARY_PATH side effects. |