← Back to issue list

Linter is checking against host libs when using --build-for argument

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1996206
Type
issue
State
open
Author
~dbruno74
Labels
—
Created
Updated
Closed
—

Current evaluation

Cross-architecture builds may lint arm64 libraries against x86_64 core22 paths; the report remains open, unlabelled, and untriaged without a confirmed fix.

Suggested action: needs triage

Reason: The issue has no labels, assignee, maintainer response, or activity, indicating it has not been visibly triaged. Its x86_64-to-arm64 trace and exact failing command provide a solid reproducer, but cross-architecture ELF dependency resolution is nontrivial and current code evidence was insufficient to confirm a fix.

Evaluated by: mr-cal-bot

Impact: 55 Quick Win: 13 Complexity: 65 Confidence: 84 Actionability: 70

Issue body

Linter (for libraries) is looking for dependencies on core snap lib of the host architecture instead of the target specified in --build-for. This is evident from the trace below, where when checking dependencies of an aarch64 shared object (MAC-IS.so) the LD_LIBRARY_PATH variable looks into /snap/core22/current/lib/x86_64-linux-gnu (and fails). 2022-11-10 15:18:51.725 executing: LD_TRACE_LOADED_OBJECTS=1 LD_LIBRARY_PATH=/root/prime/lib:/root/prime/usr/lib:/snap/core22/current/lib:/snap/core22/current/usr/lib:/snap/core22/current/lib/x86_64-linux-gnu:/snap/core22/current/usr/lib/x86_64-linux-gnu usr/lib/aarch64-linux-gnu/gconv/MAC-IS.so 2022-11-10 15:18:51.734 Unable to determine library dependencies for 'usr/lib/aarch64-linux-gnu/gconv/MAC-IS.so' The following trace has been generated with a part including coreutils:arm64 as stage-packages and building on an x86_64 machine with: snapcraft --build-for=arm64

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 55
Quick Win: 13
Complexity: 65
Confidence: 84
Actionability: 70
needs triage Cross-architecture builds may lint arm64 libraries against x86_64 core22 paths; the report remains open, unlabelled, and untriaged without a confirmed fix.
stealth/space-bunny-alpha
Impact: 46
Quick Win: 20
Complexity: 47
Confidence: 78
Actionability: 84
needs triage Cross-build library linting searches the host core snap's x86_64 paths while checking an aarch64 object, causing incorrect dependency resolution and failure; awaiting triage.
qwen3.6-35b-a3b-mtp-q6
Impact: 65
Quick Win: 29
Staleness: 80
Complexity: 55
Confidence: 35
Support Request: 10
needs triage Linter incorrectly checks library dependencies against host architecture libs instead of target architecture when using --build-for cross-compilation flag. No maintainer response after 1393 days.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Bug report regarding snapcraft linter incorrectly checking host architecture libraries during cross-compilation. Unanswered for over 3 years.
qwen/qwen3.6-35b-a3b
Staleness: 99
Complexity: 60
Confidence: 90
Support Request: 15
close stale Cross-architecture linter incorrectly resolves host library paths instead of target paths when using --build-for. Issue is 3.7 years old with no maintainer response or updates.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 60
Confidence: 75
Support Request: 10
needs triage Linter incorrectly checks library dependencies against host architecture paths instead of the target architecture specified via --build-for. Untriaged, inactive for ~3.5 years.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#4373 library linter fails on foreign archs and can't be disabled for core20 snapcraft open Cross-arch core20 builds still lint foreign ELF files, causing missing-loader failures or QEMU segfaults and potentially 20+ GB core dumps; open PR #6249 proposes the fix.
72%