← Back to issue list

binutils-related issues with classic snap installed on 14.04

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1668424
Type
issue
State
open
Author
~webdrake
Labels
binutils library linking snap
Created
Updated
Closed
—

Current evaluation

Classic snap built on xenial exposed a static lib whose objects use R_X86_64_REX_GOTPCRELX relocations that trusty's ld can't parse; reporter flagged it as probably not snapcraft-fixable, no action since 2017.

Suggested action: close stale

Reason: The diagnosis is complete but nothing remains for snapcraft to act on: ~mwhudson traced it to xenial's assembler emitting relocations trusty's ld can't read, prescribed `-Wa,-mrelax-relocations=no` at part-build time, and stated "the toolchain has no uniform way of saying 'please generate object files I can pass to a linker from two years ago'"; ~webdrake replied "the chance of this being addressable snapcraft-side was a slim one" and took it to ldc2.snap#17, then never returned. A pickaxe search for `mrelax-relocations` and a message search for relocation/linker/trusty/binutils/classic library return no commits, confirming no fix was ever attempted. The affected subsystem is permanently retired — docs/reference/bases.rst now lists core20 as the oldest supported base and warns "core16 is not a supported base," so a trusty (14.04) build/target environment can no longer be produced or reproduced through snapcraft.

Evaluated by: mr-cal-bot

Impact: 15 Quick Win: 2 Complexity: 60 Confidence: 85 Actionability: 28

Issue body

This is an apparent ABI issue encountered with the ldc2 compiler snap package when running on Ubuntu 14.04. This is probably a rather esoteric issue, but I thought I'd record it in case there is something that can be done snapcraft-side: I imagine it might carry some relevance to any snap package exposing a library to be linked against. ldc2 is a compiler for the D programming language, and the D standard library includes a copy of zlib, which is built from C source before being statically linked into the `libphobos2-ldc.a` static library included in the final snap package. In theory this allows the user to write D programs using zlib's capabilities. However, when trying to compile a simple zlib-using program on Ubuntu 14.04, linking fails with the following message: /usr/bin/gcc zlibtest.o -o zlibtest -L/snap/ldc2/x1/bin/../lib -lphobos2-ldc -ldruntime-ldc -Wl,--gc-sections -lrt -ldl -lpthread -lm -m64 /usr/bin/ld: /snap/ldc2/x1/bin/../lib/libphobos2-ldc.a(zutil.c.o): unrecognized relocation (0x2a) in section `.text' /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status Error: /usr/bin/gcc failed with status: 1 This matches the error message described in the following bug: https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/1545653 ... where problems were encountered trying to link against a library compiled with a later binutils than was available on the host system. This would suggest that there may be a problematic mismatch between the binutils used to build snap packages in a `snapcraft cleanbuild`, versus that available on 14.04. An example program to generate the issue can be found here: https://github.com/ldc-developers/ldc2.snap/issues/17

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 15
Quick Win: 2
Complexity: 60
Confidence: 85
Actionability: 28
close stale Classic snap built on xenial exposed a static lib whose objects use R_X86_64_REX_GOTPCRELX relocations that trusty's ld can't parse; reporter flagged it as probably not snapcraft-fixable, no action since 2017.
stealth/space-bunny-alpha
Impact: 20
Quick Win: 2
Complexity: 70
Confidence: 70
Actionability: 25
close stale Classic ldc2 snap ships object files with relocations the host (Ubuntu 14.04) linker cannot read; mwhudson traced it to xenial as emitting R_X86_64_REX_GOTPCRELX and suggested -Wa,-mrelax-relocations=no; no snapcraft-side fix, no follow-up.
qwen/qwen3.6-35b-a3b
Impact: 10
Quick Win: 1
Complexity: 40
Confidence: 70
Actionability: 20
close stale binutils linker incompatibility when linking against ldc2 snap on Ubuntu 14.04 due to binutils version mismatch between cleanbuild and host
qwen/qwen3.8-27b
Impact: 10
Quick Win: 6
Staleness: 95
Complexity: 45
Confidence: 82
Support Request: 55
close stale ABI/binutils version mismatch: static library built in a snapcraft cleanbuild fails to link on Ubuntu 14.04 with 'unrecognized relocation'. Zero comments, no maintainer interaction; 14.04 is EOL and the current codebase has no binutils handling.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 40
Confidence: 95
Support Request: 20
close stale Linker failure with ldc2 classic snap on Ubuntu 14.04 caused by binutils ABI mismatch. Issue is over 9 years old, targets an EOL OS, and has zero maintainer interaction.
qwen/qwen3.6-35b-a3b
Staleness: 100
Complexity: 20
Confidence: 95
Support Request: 10
close stale Linking failure with ldc2 snap on Ubuntu 14.04 due to binutils mismatch. Issue is 9+ years old, OS is EOL, and has no activity.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 45
Confidence: 92
Support Request: 65
close stale Reporting a binutils ABI mismatch causing linker failures when using the ldc2 classic snap on Ubuntu 14.04. Issue is over 9 years old with no maintainer engagement.

Update history

Date Change
created

Related work

  • Related To: ldc2.snap#17 (confidence 90%)

    Explicitly cross-referenced in the issue body as the upstream ldc2.snap report holding the example reproducer program; that is where the actionable build-flag fix was pursued.

Related issues

Issue Project State Summary Similarity
#1765482 Building a classic snap on trusty doesn't work snapcraft (launchpad) closed Trusty classic-snap build segfaults traced to core paths in LD_LIBRARY_PATH. Proposed fix PR canonical/snapcraft#2128 was closed unmerged as unnecessary, leaving the bug unfixed.
70%