Snapcraft fails to strip go binaries on arm
Metadata
Current evaluation
ARM cross-builds failed when ELF crawling ran ldd on Go binaries; ubuntu-core/snapcraft PR #440 made ldd failures non-fatal.
Resolution: closed resolved
Reason: Resolved by merged PR #440, commit 80fc40807, which allowed ELF library crawling to continue when ldd failed on cross-compiled binaries.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This is the snapcraft part
```
mdns-publisher:
plugin: go
go-packages: [github.com/kyrofa/mdns-publisher]
```
and this is the result when bulding for arm on Launchpad
```
Stripping mdns-publisher
Command '['/bin/sh', '/tmp/tmpoey0zv3q', 'ldd', b'/build/owncloud-
snap/snap/bin/mdns-publisher']' returned non-zero exit status 1
Traceback (most recent call last):
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 195, in main
builder.build()
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 141, in build
["snapcraft"], path=os.path.join("/build", self.name))
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 92, in run_build_command
self.chroot(["/bin/sh", "-c", command], echo=echo)
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 66, in chroot
"/usr/bin/sudo", "/usr/sbin/chroot", self.chroot_path] + args)
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/sudo', '/usr/sbin/chroot', '/home/buildd/build-SNAPBUILD-541/chroot-autobuild', 'linux32', '/bin/sh', '-c', 'cd /build/owncloud-snap && env LANG=C.UTF-8 snapcraft']' returned non-zero exit status 1
```
Works fine when compiling locally on amd64
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | ARM cross-builds failed when ELF crawling ran ldd on Go binaries; ubuntu-core/snapcraft PR #440 made ldd failures non-fatal. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged canonical/snapcraft#440 (80fc40807): ldd failures during library crawling became warnings, preventing ARM Go cross-builds from failing during binary stripping. | |
| stealth/space-bunny-alpha | — | closed resolved | ARM builds failed during Go binary stripping because ldd returned status 1. A later change used the architecture-matched snapped strip tool in #2051. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Snapcraft failed to strip Go binaries on ARM during Launchpad builds, causing failures despite amd64 success. No fix or comments were provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. The report detailed snapcraft failing to strip Go binaries on ARM during Launchpad builds, triggering an ldd error. Closed without comments, patches, or resolution. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The ARM Go binary stripping failure in Snapcraft was abandoned, as no fix, workaround, or discussion was recorded. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution due to inactivity. Snapcraft fails to strip Go binaries on ARM during Launchpad builds, causing an ldd error. Unaddressed. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
ubuntu-core/snapcraft#440
(confidence 99%)
The issue author linked this PR as the fix, and it was merged as commit 80fc40807.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #5219 Snapcraft unable to compile ARM64 kernel | snapcraft | open | ARM64 core20 kernel cross-builds fail while fetching snapd:arm64; a minimal apt reproducer exists, but the report has no maintainer triage or release mapping. | |
| #5638 Snapcraft fails to run on 32bit userspace container on 64bit ARM kernel. | snapcraft | closed | Fixed by merged PR #6394 (commit e51640488): Snapcraft now maps armv8l to armv7l, supporting ARMHF builds in 32-bit ARM userspace on 64-bit ARM kernels. |