← Back to issue list

build: add patchelf to make dependencies

View original Github issue

Metadata

Project
snapcraft
Number
#5486
Type
pull request
State
merged
Author
bepri
Labels
Created
Updated
Closed

Current evaluation

Merged to add patchelf to development environment dependencies, resolving test failures on self-hosted runners. Approved by two reviewers and passed CI checks.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `make lint`? - [ ] Have you successfully run `make test`? --- Since switching to the self-hosted runners, tests have been breaking because patchelf wasn't installed on them. For example, see [this workflow](https://github.com/canonical/snapcraft/actions/runs/14932815042). This PR just adds the apt package to be installed during the creation of the development environment.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged to add patchelf to development environment dependencies, resolving test failures on self-hosted runners. Approved by two reviewers and passed CI checks.
qwen3.6-35b-a3b-mtp-q6 Merged to resolve failing tests on self-hosted runners. Added patchelf to the development environment dependencies, ensuring consistent build execution.
qwen3.6-35b-a3b-mtp-q6 Merged to add patchelf to build dependencies, resolving CI test failures on self-hosted runners by installing the package during development environment setup.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1888 elf: make patchelf a dependency snapcraft merged Merged after reviewer approval and CI checks. The change corrects patchelf handling by removing it from build_tools and properly configuring it as a dependency via debian/control for deb packages and snapcraft bundling for snaps.
78%
#5135 fix(test): add patchelf to dev dependencies for testing snapcraft closed Superseded by PR #5225. The pull request adding patchelf to dev dependencies was closed as obsolete after maintainers discussed architectural concerns regarding patchelf usage in tests and development environments.
77%
#1967 project_loader: improve the logic to install patchelf as a build tool snapcraft merged Merged changes improving patchelf installation logic by excluding it on xenial/armhf and xenial/s390x due to broken builds. Users must provide it manually or use the build-snap. Approved and merged after clarifying error handling and architecture exclusions.
76%
#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.
75%
#3589 snap: correct patch apply for patchelf snapcraft merged Merged a two-line fix correcting patch application for patchelf. Approved by a reviewer, passed CI, and merged to master. An unrelated test failure was noted but disregarded to proceed.
74%
#1873 elf: cleaner patchelf experience snapcraft merged Merged improvements to patchelf handling. The change uses the system patchelf by default, copies files to prevent hard-link conflicts, and provides fallback instructions. Approved by two reviewers and passed CI checks before merging.
73%
#4639 feat: enable patchelf for core24 snapcraft merged Enabled patchelf for core24. Merged after approval from two reviewers and passing CI checks. The change updates six files (+75/-9 lines) with full test coverage on modified code.
73%
#4003 Tests: Make test_patcher not require a real patchelf in /usr/bin snapcraft merged Merged into main. Updates test_patcher to remove the dependency on a system patchelf binary in /usr/bin, resolving a PATH ordering issue. Approved, passed CI, and increased test coverage by 0.61%.
72%
#3841 elf: add elf file patcher snapcraft merged Merged an ELF file patcher using patchelf, ported from Snapcraft 6.x. Approved by one reviewer, passed CI checks, and increased test coverage by 0.26%. Resolves CRAFT-1191.
72%
#2746 elf: handle missing dependencies not found on system snapcraft merged Merged updates to handle missing ELF dependencies when ldd fails to resolve them. The change prevents filtering unresolved libraries, refactors ldd parsing for reliability, and adds unit tests. Approved by one reviewer and passed CI checks.
71%