pluginhandler: patch and handle elf files on glibc mismatch
Metadata
Current evaluation
Merged in snapcraft#1850 (bdaf0b7f1), adding host libc6 staging and its dynamic loader when ELF files need newer glibc; fixes #1668 and #1669.
Resolution: closed resolved
Reason: PR #1850 was approved and merged as commit bdaf0b7f1. It implements fetching and priming host libc6 and using its dynamic loader for glibc mismatches, explicitly closing #1668 and #1669.
Evaluated by: mr-cal-bot
No scores available.
Issue body
If the required glibc is greater than the one provided by the given
base, fetch libc6 from the host, prime it and use the dynamic loader
from there instead.
Closes: #1668 #1669
- [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] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in snapcraft#1850 (bdaf0b7f1), adding host libc6 staging and its dynamic loader when ELF files need newer glibc; fixes #1668 and #1669. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in PR #1850 (commit bdaf0b7f1), fetching and priming host libc6 and using its dynamic loader when the base glibc is insufficient; closes #1668 and #1669. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Resolves glibc mismatches in ELF files by fetching libc6 from the host, priming it, and using its dynamic loader instead of the base snap's. Approved by two reviewers and closes issues #1668 and #1669. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix that patches ELF files on glibc mismatches by fetching and priming libc6 from the host to use its dynamic loader. Resolves issues #1668 and #1669. |
Update history
No update history recorded yet.
Related work
-
Related To:
snapcraft#1668
(confidence 99%)
The newer glibc and ld-linux request was fixed by merged PR #1850.
-
Related To:
snapcraft#1669
(confidence 99%)
The patchelf and future ld-linux compatibility report was fixed by merged PR #1850.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3277 pluginhandler: support using patchelf on strict snaps | snapcraft | merged | Merged PR #3277 as fd8e95c3d, adding per-part enable-patchelf support to patch ELF rpaths and interpreters in strictly confined snaps. | |
| #1669 patchelf with ld-linux from the future | snapcraft | closed | Resolved by commit bdaf0b7f1, which added Snapcraft handling for PatchELF and ELF files when the built glibc/linker does not match the base. | |
| #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. | |
| #3840 elf: add handling and patching helpers | snapcraft | merged | Merged in snapcore/snapcraft#3840 via commit 8a9914510, adding helpers to enumerate ELF binaries and locate architecture-specific dynamic linkers. | |
| #2012 pluginhandler: only do elf checking and patching for type app | snapcraft | merged | Merged PR #2012 in commit eae356003, limiting ELF/libc ABI/API checks and patching to app-type snaps and avoiding unnecessary checks for other snap types. | |
| #1881 elf: better handling for newer libc6 | snapcraft | merged | Merged in snapcraft#1881 (commit 10ab28277), requiring libc6 to be explicitly declared in snapcraft.yaml so newer libc6 dependencies are recorded correctly. | |
| #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. | |
| #2005 pluginhandler: special case go patchelf failures for classic confinement | snapcraft | merged | Merged PR #2005, making PatchELF failures for classic-confined Go snaps non-fatal warnings and cleaning up base/libc6 stage-package handling. | |
| #2926 plugin handler: process elf files only if base is specified | snapcraft | merged | PR #2926 merged into snapcraft master as commit 9b1655d02: the plugin handler now processes ELF files only when a base is specified, unblocking snapd builds (LP #1857019). | |
| #1979 pluginhandler: simplify logic when elf patching is required | snapcraft | merged | Merged PR #1979 as commit 5fd7e3c30, simplifying pluginhandler ELF-patching detection and related tests across six files. |