PATH/LD_LIBRARY_PATH not set in snapcraft 7.0
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Closed as a reported regression in snapcraft 7.0 where PATH and LD_LIBRARY_PATH are unset after dropping the snapcraft-runner wrapper. A manual workaround was provided.
Suggested action: —
No scores available.
Issue body
Working on the core20->core22 migration for the maas-test-db snap I ran in an issue:
since the snapcraft-runner wrapper has been dropped, PATH and LD_LIBRARY_PATH doesn't seem to be set anymore to the correct values when running snap commands.
Thus, applications relying on libraries provided in the snap fail to find them.
As a workaround I added a copy of the snapcraft-runner wrapper in the snap, and ran commands with it (https://paste.ubuntu.com/p/vH6pCdzZNS/), which makes things work, but this is a regression from the previous behavior.
Also, somewhat related, is it expected for hooks to be run with the same environment as applications WRT PATH/LD_LIBARY_PATH?
Up to core20, we explicitly set the command-chain to snapcraft-runner to provide the env:
hooks:
install:
command-chain:
- snap/command-chain/snapcraft-runner
configure:
command-chain:
- snap/command-chain/snapcraft-runner
but it feels like this should be provided by snapcraft too?
All tests were performed with snapcraft 7.0.post24+gitbd286224 (7521), from latest/edge.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Closed as a reported regression in snapcraft 7.0 where PATH and LD_LIBRARY_PATH are unset after dropping the snapcraft-runner wrapper. A manual workaround was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. The snapcraft 7.0 regression causing missing PATH and LD_LIBRARY_PATH variables remains unfixed and appears abandoned. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without comments, indicating the report was abandoned or superseded. The regression causing missing PATH and LD_LIBRARY_PATH after the snapcraft-runner wrapper removal was not addressed here. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1885294 [4.0.7] hook environment does not contain snap-specific PATH and LD_LIBRARY_PATH (as it used to) | snapcraft (launchpad) | closed | Closed due to inactivity with zero comments. The snapcraft 4.0.7 regression where hook wrappers no longer export snap-specific PATH and LD_LIBRARY_PATH was not addressed or fixed. | |
| #2049617 ubuntu-desktop-installer LD_LIBRARY_PATH not defined anymore | snapcraft (launchpad) | open | Classic snap shell environment no longer sets LD_LIBRARY_PATH, possibly a snapcraft 8.0.1 regression. Untriaged, no maintainer engagement in 961 days. |