snap: patch patchelf on riscv64 (CRAFT-566)
Metadata
Current evaluation
Merged PR #3588 via commit bf99dbdb2, conditionally patching PatchELF on riscv64 while leaving other architectures unchanged.
Resolution: closed resolved
Reason: The approved PR was merged into master as commit bf99dbdb2. It applied the PatchELF workaround only on riscv64 to address startup failures without risking existing architectures.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Conditionally patch on riscv64 to reduce the risk of breaking
currently working architectures.
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
-------
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3588 via commit bf99dbdb2, conditionally patching PatchELF on riscv64 while leaving other architectures unchanged. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3588 via bf99dbdb2, conditionally applying patchelf patches on riscv64 to reduce the risk of breaking working architectures. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged to master. Conditionally applies patchelf patches on riscv64 to prevent breaking other architectures. Approved by one reviewer, passed CI, and added 104 lines across three files without impacting test coverage. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a conditional patchelf patch restricted to riscv64 to prevent regressions on other architectures. Successfully integrated into master with no coverage impact. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3841 elf: add elf file patcher | snapcraft | merged | Merged PR #3841 in commit e03a971b3, adding a patchelf-based ELF file patcher ported from Snapcraft 6.x for CRAFT-1191. | |
| #3589 snap: correct patch apply for patchelf | snapcraft | merged | Merged PR #3589 fixed PatchELF patch application in the snap build via commit d9484faf9 (merge a636d26b5). | |
| #1935 elf: contemplate more patching scenarios | snapcraft | merged | Merged PR #1935 as 048adc4a3, adding ELF patching for classic snaps built on bionic targeting core16 and for hooks built with Snapcraft. | |
| #1943963 patchelf creates unloadable non-PIE riscv64 executables | snapcraft (launchpad) | closed | Riscv64 patchelf corruption was fixed by using the safe ET_DYN rewrite path for non-PIE executables, merged in snapcraft PR #3588 (commit d6a8ffe9a). | |
| #2081 elf: patch everything instead of a subset of elf files | snapcraft | merged | Merged PR #2081 restored Snapcraft 2.39 behavior by patching every ELF file; commit 77770452b partially reverted 64f78f762a05. | |
| #1666 Refactor to support elf patching | snapcraft | closed | ELF patching support was refactored by merged PR #1744 in commit ec7ba948a, converting the ELF implementation into reusable libraries. | |
| #2531 snap: revert to patchelf 0.9 with local patches | snapcraft | merged | Merged PR #2531 as commit 44be372e3, reverting from Patchelf 0.10 to locally patched 0.9 after architecture tests exposed unreliable binaries. | |
| #1967 project_loader: improve the logic to install patchelf as a build tool | snapcraft | merged | Merged PR #1967 as commit 84aaac591, improving patchelf build-tool installation and excluding broken Xenial armhf/s390x packages. | |
| #1959 elf: only patch elf files that aren't referenced by DT_NEEDED | snapcraft | merged | Merged as 64f78f762, adding architecture-aware DT_NEEDED filtering to reduce patchelf usage; PR #2081 later partially reverted it and restored patching every ELF file. | |
| #3985 elf: patch elf files for classic mode | snapcraft | merged | Merged PR #3985 as commit a723254b9, adding classic-mode ELF patching so enable-patchelf parts use base-snap libraries or staged libc components. |