← Back to issue list

Use `ld` from the base snap for library linting

View original Github issue

Metadata

Project
snapcraft
Number
#4751
Type
issue
State
open
Author
mr-cal
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed

Current evaluation

Enhancement to use the base snap's `ld --list` instead of the host `ldd` for library linting, fixing spurious unknown symbol warnings on core24. Triaged by a maintainer with an internal ticket; code TODO still references it and it remains unfixed.

Suggested action: keep open

Reason: The issue is triaged (labels 'Status: Triaged', 'Type: Enhancement'), authored by a maintainer, and tracked internally (CRAFT-2847). The fix is clearly not done: snapcraft/elf/_elf_file.py:444 still has 'TODO: use `ld` from the base snap (#4751)' next to the host ldd call, and the newer open issue #6332 shows the same spurious-warning problem persisting on core26. Inactivity for ~16 months is notable, but the issue remains applicable, so it should stay open.

Impact: 45 Quick Win: 22.5 Staleness: 65 Complexity: 50 Confidence: 80 Support Request: 5

Issue body

### What needs to get done Instead of using `ldd` from the host, use `ld --list` from the base snap (`/snap/coreXX/current/lib64/ld-linux-x86-64.so.2 --list`). [`pyelftools`](https://github.com/eliben/pyelftools) may have some helpful utilties ### Why it needs to get done `snapcraft lint` has unknown symbol warnings for core24, because it tries to use a linker from the host (a 22.04 environment) with core24's glibc ([source](https://github.com/canonical/snapcraft/blob/05ef28087a0687a8c5a07e4f979c0a70e2fc3b49/snapcraft/elf/_elf_file.py#L450)). See #4748 for more context

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 45
Quick Win: 22.5
Staleness: 65
Complexity: 50
Confidence: 80
Support Request: 5
keep open Enhancement to use the base snap's `ld --list` instead of the host `ldd` for library linting, fixing spurious unknown symbol warnings on core24. Triaged by a maintainer with an internal ticket; code TODO still references it and it remains unfixed.
qwen/qwen3.6-35b-a3b
Staleness: 80
Complexity: 40
Confidence: 85
Support Request: 5
keep open Enhancement to use the base snap ld instead of the host linker for library linting to resolve core24 symbol warnings. Currently triaged but inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 50
Confidence: 75
Support Request: 5
keep open Enhancement to use the base snap's ld --list instead of host ldd for library linting, resolving core24 symbol warnings. Currently triaged but inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 40
Confidence: 85
Support Request: 10
keep open Replace host ldd with base snap ld --list for library linting to resolve core24 glibc symbol mismatches. Currently triaged as an enhancement, last updated 418 days ago, with an internal Jira ticket created.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/snapcraft#4748 (confidence 85%)

    Referenced in the issue body for context; that PR was superseded and closed, with work redirected to this issue.

  • Related To: canonical/snapcraft#6332 (confidence 75%)

    Newer open issue reporting spurious lint warnings on core26 from the same host-linker/base mismatch, confirming the problem persists.

Related issues

No related issues found above the similarity threshold.