snap: remove leaking LD_LIBRARY_PATH
Metadata
Current evaluation
Merged as da9181487: PR #1635 removed LD_LIBRARY_PATH leakage from snapcraft-classic, fixing LP #1723208 and preventing breakage on hosts such as Trusty.
Resolution: closed resolved
Reason: PR #1635 was approved and merged as commit da9181487, deleting the unnecessary 16-line LD_LIBRARY_PATH setup from the snapcraft-classic wrapper.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)?
- [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)?
- [x] Have you successfully run `./runtests.sh static`?
- [x] Have you successfully run `./runtests.sh unit`?
-----
This PR fixes LP: #1723208 by removing the LD_LIBRARY_PATH set in the snapcraft-classic wrapper. This leaks into the running environment and causes the snap on other distros to break (e.g. Trusty). It also seems completely unnecessary given the rpaths.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as da9181487: PR #1635 removed LD_LIBRARY_PATH leakage from snapcraft-classic, fixing LP #1723208 and preventing breakage on hosts such as Trusty. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1635 (commit da9181487) removed LD_LIBRARY_PATH from the snapcraft-classic wrapper, fixing LP #1723208 and preventing environment leakage that broke snaps on distros such as Trusty. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1635 removed LD_LIBRARY_PATH leakage from the snapcraft-classic wrapper, fixing LP #1723208 and preventing runtime breakage on distros such as Trusty. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #1635, removing LD_LIBRARY_PATH from the snapcraft-classic wrapper and fixing Launchpad bug #1723208. | |
| qwen/qwen3.6-35b-a3b | — | — | Removed leaking LD_LIBRARY_PATH from the snapcraft-classic wrapper, resolving Launchpad bug #1723208. The variable leaked into the environment, breaking snaps on distros like Trusty, and was redundant given existing rpaths. Approved and merged. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged removal of LD_LIBRARY_PATH from the snapcraft-classic wrapper, resolving LP: #1723208. The variable leaked into the runtime environment and broke snaps on other distributions. Removal is safe due to existing rpaths. |
Update history
No update history recorded yet.
Related work
-
Related To:
LP#1723208
(confidence 100%)
The PR explicitly identifies this Launchpad bug as fixed by its change.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1723208 Snapcraft snap doesn't work natively on trusty | snapcraft (launchpad) | closed | Fixed Trusty classic-snap builds by preventing bundled-library LD_LIBRARY_PATH values from leaking into build commands; merged in snapcore/snapcraft#1635 as da9181487. | |
| #2128 project_loader: stop setting LD_LIBRARY_PATH | snapcraft | closed | Closed unmerged in #2128 as unnecessary after the last known Trusty classic-snap user moved to Xenial; no code was changed. | |
| #1765482 Building a classic snap on trusty doesn't work | snapcraft (launchpad) | closed | Trusty classic-snap build segfaults traced to core paths in LD_LIBRARY_PATH. Proposed fix PR canonical/snapcraft#2128 was closed unmerged as unnecessary, leaving the bug unfixed. | |
| #4216 meta: omit LD_LIBRARY_PATH and PATH in classic confinement | snapcraft | merged | Merged PR #4216 (commit 9b6e58337) omits default LD_LIBRARY_PATH and PATH for classic-confinement snaps, resolving #4187. | |
| #4187 Environment is being set for classic snaps | snapcraft | closed | Classic-confinement snaps no longer receive top-level LD_LIBRARY_PATH and PATH; fixed by merged PR #4216 in commit 9b6e58337. | |
| #2484 project loader: remove special LD_LIBRARY_FLAGS handling for classic | snapcraft | merged | Merged PR #2484 (legacy branch, 2019) dropped the special classic-snap LD_LIBRARY_FLAGS handling in the project loader, which caused libc6 mismatches against the base snap. Same fix landed on master as #2485 (commit a8fce1ae5). | |
| #1975498 PATH/LD_LIBRARY_PATH not set in snapcraft 7.0 | snapcraft (launchpad) | closed | PATH/LD_LIBRARY_PATH regression in core22 snaps was fixed by PR #3758, merged as 6e8835dc8 and released in Snapcraft 7.1. | |
| #1570945 Add SNAP_LIBRARY_PATH to LD_LIBRARY_PATH | snapcraft (launchpad) | closed | Fixed in canonical/snapcraft#462, merged as commit a983e470b, by prepending SNAP_LIBRARY_PATH to generated LD_LIBRARY_PATH values so binaries use the OS snap's OpenGL libraries. | |
| #1632 libraries: exclude the full set of libc6 | snapcraft | merged | Merged PR #1632 (commit 1b8ea95c7): snapcraft/internal/libraries.py now excludes every library from the libc6 deb, not just libc.so.6, stopping partial host glibc leaking into classic snaps; later reworked by #1744. | |
| #2049617 ubuntu-desktop-installer LD_LIBRARY_PATH not defined anymore | snapcraft (launchpad) | open | Snapcraft 8 stopped injecting LD_LIBRARY_PATH into classic snaps, breaking ubuntu-desktop-installer rebuilds; the change is intentional, but a compatibility opt-in remains unresolved. |