snapcraft can't find modules installed under 'stage' dir
Metadata
Current evaluation
Closed as invalid after maintainers could not reproduce the problem across repeated clean builds; separate pkg-config support for build-packages was mentioned.
Resolution: closed not a bug
Reason: On 2016-02-25, Sergiu Ens marked the report invalid because his builds succeeded repeatedly. He noted planned pkg-config work for build-packages, but supplied evidence contains no linked PR or commit resolving it.
Evaluated by: mr-cal-bot
No scores available.
Issue body
A module in a package specified under "stage-packages", for example,
stage-packages:
- libmirserver-dev
cannot be found, when CMakeLists.txt of a part refers to it by
find_package(PkgConfig)
pkg_check_modules(
MIRSERVER REQUIRED mirserver
)
I believe pkg-config is looking for it in the system directories, not in the stage directory.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed not a bug | Closed as invalid after maintainers could not reproduce the problem across repeated clean builds; separate pkg-config support for build-packages was mentioned. | |
| stealth/space-bunny-alpha | — | closed not a bug | Closed as invalid after clean builds worked without the workaround; manual pkg-config environment variables exposed missing dependency metadata, and a related fix was planned. | |
| stealth/space-bunny-alpha | — | closed not a bug | Closed as invalid after repeated builds succeeded; a possible build-packages pkg-config improvement was mentioned, but no linked PR or fix was recorded. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without a fix after 22 days of inactivity; no comments, commits, or resolving PRs were recorded for snapcraft#1541620. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Report regarding pkg-config failing to locate stage-packages in the stage directory was abandoned after 22 days with no comments or fixes. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The report details snapcraft failing to locate stage-packages via pkg-config because it searches system directories instead of the stage directory. No fix or workaround was provided. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1531481 snapcraft should setup search paths/flags for parts built after parts | snapcraft (launchpad) | closed | Fixed pkg-config dependency discovery by using the shared stage directory for parts linked with after:, resolving build isolation failures. | |
| #1686484 snapcraft fails when two parts have the same file in the stage keyword | snapcraft (launchpad) | closed | Closed as stale in August 2026 after nearly nine years without a fix; the discussion provided no confirmed workaround. | |
| #1567054 Snapcraft clean doesn't remove pkg-config override | snapcraft (launchpad) | closed | Closed as unreproducible: the maintainer could not reproduce the reported `snapcraft clean` or `snapcraft clean <part-name>` behavior. |