Building snap using base-18 is broken with 2.39
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
snapcraft 2.39 broke base-18 builds on bionic due to shebang expansion and missing LD_LIBRARY_PATH. The report was closed without resolution, likely abandoned or superseded by newer base versions.
Suggested action: —
No scores available.
Issue body
We use base-18 when building/installing the MAAS snap, since we'll target bionic for the next MAAS release.
Things worked fine, until snapcraft 2.39 was released. Now building the MAAS snap fails:
https://paste.ubuntu.com/p/Rx7f42K2DB/
I tried a simple patch to snapcraft:
https://paste.ubuntu.com/p/s2t3wct5J3/
This made the build succeed, but the resulting snap was broken. The python scripts couldn't find the non-system modules. Seems like the environment isn't set up, since the '/usr/bin/env python3' shebang got expanded to /usr/bin/python3. Further more, after manually putting the right shebang, the scripts failed like this:
https://paste.ubuntu.com/p/G3dsTh33Fg/
The file libssl.so.1.1 is in the snap, but after some debugging I noticed that LD_LIBRARY_PATH isn't being set.
This problem seem to be related to building against base-18 on bionic. I tried building MAAS 2.3 with snapcraft 2.39 on xenial (against the core base), and that still works.
You can reproduce this bug by running building a snap of https://git.launchpad.net/maas:master, using the attached base-18 snap for the base.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | snapcraft 2.39 broke base-18 builds on bionic due to shebang expansion and missing LD_LIBRARY_PATH. The report was closed without resolution, likely abandoned or superseded by newer base versions. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or merge, likely abandoned or superseded by newer snapcraft versions. The report detailed snapcraft 2.39 breaking base-18 builds due to incorrect shebang expansion and missing LD_LIBRARY_PATH. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. Snapcraft 2.39 broke base-18 builds via incorrect shebang expansion and missing LD_LIBRARY_PATH. No fix or comments were provided. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1862256 snapcraft should complain loudly when building base: core20 snap on i386 | snapcraft (launchpad) | closed | Closed as superseded. Improved architecture parsing in snapcraft now correctly rejects unsupported base-architecture combinations, addressing the original request without requiring explicit i386 core20 checks. | |
| #1839604 build-base seems broken | snapcraft (launchpad) | open | Seven-year-old question about snapcraft rejecting 'base: bare' with 'build-base: core18' via a confusing validation error. No maintainer response; validation was rewritten in snapcraft 8.x, where build-base is now required for bare bases, so the reported combination is now valid. | |
| #1860550 Defining base snap breaks snapping Subiquity | snapcraft (launchpad) | open | Subiquity snap build with base: core18 leaves /snap/bin empty and snapd stuck seeding in ISO; works without base keyword. Reported ~6.5 years ago with zero comments; core18 is EOL and snapcraft 8.x rewrote base handling, so it is no longer applicable. | |
| #4972 Cannot create a snap with base:bare in destructive mode | snapcraft | open | Snapcraft 8.3.2 fails with 'cannot determine build-for architecture' when building a base:bare snap in destructive mode without build-base. Maintainer confirmed build-base is required for bare and plans an earlier, clearer validation error. |