pluginhandler: special case go patchelf failures for classic confinement
Metadata
Current evaluation
Merged PR #2005, making PatchELF failures for classic-confined Go snaps non-fatal warnings and cleaning up base/libc6 stage-package handling.
Resolution: closed resolved
Reason: PR #2005 was merged as commit 0e74c7524. It special-cased Go PatchELF failures under classic confinement so builds warn instead of failing.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Classic confinement for go with patchelf is still a little problematic
and has never really work from a confinement perspective. So we warn if
patchelf fails to run through.
Clean up the logic after the introduction of bases and the requirement
to explicitly add libc6 to stage-packages in case of non host
compatibilities
- [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 PR #2005, making PatchELF failures for classic-confined Go snaps non-fatal warnings and cleaning up base/libc6 stage-package handling. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2005 (commit 0e74c7524), warning on Go patchelf failures under classic confinement and simplifying bases/libc6 handling. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Adds a warning for patchelf failures in classic confinement Go snaps and cleans up bases/libc6 logic. Approved after reviewer questions regarding patchelf crash output were addressed. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Special-cases patchelf failures for Go snaps under classic confinement, issuing a warning instead of failing. Cleans up base and libc6 stage-package logic. Approved after reviewer confirmed expected tool behavior. |
Update history
No update history recorded yet.
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. | |
| #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. | |
| #1794 Apply patchelf work to non classic | snapcraft | closed | Patchelf support was extended from classic confinement to strict snaps by merged PR #3277 (commit fd8e95c3d), resolving #1794. | |
| #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. | |
| #1850 pluginhandler: patch and handle elf files on glibc mismatch | snapcraft | merged | Merged in snapcraft#1850 (bdaf0b7f1), adding host libc6 staging and its dynamic loader when ELF files need newer glibc; fixes #1668 and #1669. | |
| #1805205 Ensure elf patching works correctly with golang created ELF files | snapcraft (launchpad) | closed | Fixed Go ELF patching in snapcore/snapcraft PR #2519 by updating the PatchELF handling used for Go-created binaries. | |
| #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. | |
| #2519 packaging: use local patchelf | snapcraft | merged | Merged as e39d2404c, adopting Patchelf 0.10 and relinking dynamic Go executables; later reverted by #2531 after architecture tests exposed unreliable binaries. |