← Back to issue list

PKG_CONFIG_PATH during build step should include multiarch paths

View original Launchpad issue

Metadata

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

Current evaluation

Build-time pkg-config lookup historically omitted staged multiarch .pc files; current craft-parts includes both generic and architecture-triplet pkgconfig directories.

Suggested action: close resolved

Reason: Current craft-parts get_pkg_config_paths() explicitly includes lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig, and its environment documentation lists the stage multiarch path. Snapcraft commit 4a5de243e ("Redo pkg-config handling with library collecting") implemented the expanded handling, making the legacy SNAPCRAFT_STAGE/DEBIAN_MULTIARCH_TUPLE report obsolete.

Evaluated by: mr-cal-bot

Impact: 46 Quick Win: 26 Complexity: 32 Confidence: 96 Actionability: 84

Issue body

Currently the PKG_CONFIG_PATH environmental variable is set to `$SNAPCRAFT_STAGE/lib/pkgconfig` during build step, however, some parts install their pc files at `$SNAPCRAFT_STAGE/lib/$DEBIAN_MULTIARCH_TUPLE/pkgconfig` and as a result the files are not read during the building of other parts. IMO `$SNAPCRAFT_STAGE/lib/$DEBIAN_MULTIARCH_TUPLE/pkgconfig` should also be set as a fallback path.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 46
Quick Win: 26
Complexity: 32
Confidence: 96
Actionability: 84
close resolved Build-time pkg-config lookup historically omitted staged multiarch .pc files; current craft-parts includes both generic and architecture-triplet pkgconfig directories.
qwen/qwen3.6-35b-a3b
Impact: 60
Quick Win: 38
Complexity: 20
Confidence: 70
Actionability: 80
needs triage PKG_CONFIG_PATH during build step excludes multiarch paths, causing build failures for parts depending on such libraries.
qwen/qwen3.8-27b
Impact: 40
Quick Win: 28
Staleness: 95
Complexity: 30
Confidence: 60
Support Request: 10
needs triage Snapcraft build step sets PKG_CONFIG_PATH to only $SNAPCRAFT_STAGE/lib/pkgconfig, missing multiarch lib/<triplet>/pkgconfig paths, so .pc files installed there are not found by later parts. Unlabelled, zero comments, ~8 years old.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 80
Support Request: 10
needs triage Snapcraft build step PKG_CONFIG_PATH omits multiarch lib paths, causing build failures for parts relying on multiarch pkgconfig files. Untriaged, inactive for over seven years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 10
close stale Snapcraft's build step PKG_CONFIG_PATH omits multiarch library paths, causing pkg-config files to be missed. Untriaged and inactive for over 7 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 10
close stale Snapcraft build environment PKG_CONFIG_PATH lacks multiarch paths. Issue is over 7 years old, unlabelled, and has zero maintainer activity. Likely obsolete due to major build system and environment changes in modern Snapcraft versions.

Update history

Date Change
created

Related issues

No related issues found above the similarity threshold.