← Back to issue list

classic snap fails to build with "cannot find section"

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1736861
Type
issue
State
closed
Author
~elopio
Labels
regression
Created
Updated
Closed

Current evaluation

Snapcraft 2.37's bundled patchelf could not patch gotty for a classic build; maintainers linked NixOS/patchelf#66 and directed users to edge/patchelf-go.

Resolution: closed resolved

Reason: The final maintainer update linked the section-lookup failure to NixOS/patchelf#66 and provided snapcraft's edge/patchelf-go channel as the working path. The issue record does not cite a specific PR or commit.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The gotty snap fails to build on snapcraft 2.37 with the following error: cannot find section '/root/build_gotty/prime/bin/gotty' cannot be patched to function properly as a classic snap: Command '['/snap/snapcraft/924/bin/patchelf', '--set-interpreter', '/snap/core/current/lib/x86_64-linux-gnu/ld-2.23.so', '/root/build_gotty/prime/bin/gotty']' returned non-zero exit status 1. This snap builds correctly with the stable snapcraft, version 2.35. snapcraft.yaml: http://paste.ubuntu.com/26130543/ To reproduce, save this snapcraft.yaml and run: sudo snap install snapcraft --beta --classic SNAPCRAFT_CONTAINER_BUILDS=local snapcraft

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Snapcraft 2.37's bundled patchelf could not patch gotty for a classic build; maintainers linked NixOS/patchelf#66 and directed users to edge/patchelf-go.
stealth/space-bunny-alpha — closed resolved Fixed by snapcraft PR #1798 (commit fa8b7b174), which strips .note.go.buildid before classic ELF patching; Snapcraft 2.38 builds succeeded.
stealth/space-bunny-alpha — closed resolved Snapcraft PR #1798 (commit fa8b7b174) fixed classic Go snap patching by stripping .note.go.buildid, allowing Snapcraft 2.38 builds to succeed.
stealth/space-bunny-alpha — closed resolved Fixed in PR #1798 (commit fa8b7b174) by stripping Go build IDs to make room for classic-confinement PatchELF processing.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The snapcraft 2.37 regression causing patchelf failures for classic snaps was abandoned. No further comments or patches were submitted.
qwen/qwen3.6-35b-a3b — — Closed without comments or resolution. The snapcraft 2.37 regression causing patchelf failures in classic snaps was abandoned or resolved in a subsequent release.
qwen/qwen3.6-35b-a3b — — Closed as a regression. The snapcraft 2.37 classic snap build failure caused by patchelf was fixed in a subsequent release.
qwen3.6-35b-a3b-mtp-q6 — — Closed. Reported a snapcraft 2.37 regression causing classic snap builds to fail due to patchelf errors. Closed without resolution details or comments.

Update history

Date Change
created

Related work

  • Likely Fixed By: patchelf#66 (confidence 85%)

    The maintainer linked this upstream section-detection issue while recommending the Go-based patchelf build.

Related issues

Issue Project State Summary Similarity
#1760897 Classic confined snap started segfaulting after 2.40 upgrade snapcraft (launchpad) open Classic snap segfaults after snapcraft 2.40 due to upstream patchelf corrupting Go binaries; maintainer pointed to the documented no-patchelf build attribute (upstream NixOS/patchelf#146).
79%
#1753995 patchelf warning / binary segfaults snapcraft (launchpad) open PatchELF corrupted Go-built Telegraf classic snaps into runtime segfaults; no-patchelf avoided the crash, but a 2019 Snapcraft 3.8 reproduction remains unverified on current code.
72%