← Back to issue list

packaging: use local patchelf

View original Github issue

Metadata

Project
snapcraft
Number
#2519
Type
pull request
State
merged
Author
cmatsuoka
Labels
Created
Updated
Closed

Current evaluation

Merged. Relinked dynamic executables with the system linker to resolve set-rpath segfaults in Go binaries. Integrates upstream patchelf 0.10 to correctly set interpreters and fix ELF section layout issues.

Suggested action:

No scores available.

Issue body

Pull patchelf from the latest stable tag from the upstream repository, which contains patches critical for snapcraft to work properly with Go ELF binaries. Noteworthy patches and issues fixed: - Avoid inflating file sizes needlessly and allow binaries to be stripped - patchelf --set-interpreter fails with `cannot find section` (#66) - --set-interpreter gives "cannot find section" for go binary (#138) LP: #1805205 Signed-off-by: Claudio Matsuoka <claudio.matsuoka@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
qwen/qwen3.6-35b-a3b Merged. Relinked dynamic executables with the system linker to resolve set-rpath segfaults in Go binaries. Integrates upstream patchelf 0.10 to correctly set interpreters and fix ELF section layout issues.
qwen3.6-35b-a3b-mtp-q6 Merged. Adopted local patchelf 0.10 to resolve Go ELF binary issues. Strategy shifted to relinking dynamic executables with the system linker, fixing rpath segfaults. Approved and merged following coverage validation and reviewer feedback.
qwen3.6-35b-a3b-mtp-q6 Merged. Updated to upstream patchelf and resolved Go ELF binary segfaults by relinking dynamic executables with the system linker. Patchelf 0.10 remains for interpreter settings. Approved and merged.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2531 snap: revert to patchelf 0.9 with local patches snapcraft merged Merged a revert to patchelf 0.9 with local patches after version 0.10 generated unreliable binaries on i386, ppc64el, and s390x. The change restores build stability pending upstream fixes.
75%
#2528 packaging: use our patchelf branch snapcraft merged Merged into master to fix s390x build failures by switching patchelf to a custom branch with a failing test disabled. The one-line change was approved, passed CI, and integrated.
73%