Crash with `charmcraft pack`
Metadata
Current evaluation
Closed. The crash stemmed from outdated setuptools and pip failing to build jinja2. Resolved via a workaround specifying newer setuptools and pip in charmcraft.yaml. Maintainers attributed the error to upstream packaging and pip limitations.
Suggested action: —
No scores available.
Issue body
First time I try packing a new charm I'm developing...
```
$ uname -a
Linux darkstar 5.13.0-35-generic #40~20.04.1-Ubuntu SMP Mon Mar 7 09:18:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
```
Charm source at https://github.com/PietroPasotti/traefik-route-k8s-operator.git
commit 511a5e9
[charmcraft-20220401-085155.047782.log](https://github.com/canonical/charmcraft/files/8395424/charmcraft-20220401-085155.047782.log)
The second time around, the output is a bit cleaner, but still fails on importing `markupsafe`.
[charmcraft-20220401-090524.694039.log](https://github.com/canonical/charmcraft/files/8395449/charmcraft-20220401-090524.694039.log)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. The crash stemmed from outdated setuptools and pip failing to build jinja2. Resolved via a workaround specifying newer setuptools and pip in charmcraft.yaml. Maintainers attributed the error to upstream packaging and pip limitations. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. Outdated setuptools and pip in the build container cause jinja2 import failures. Workaround: specify newer setuptools and pip in charmcraft.yaml. Maintainers declined to improve error messages, as the failure originates from pip. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. The crash stemmed from jinja2 requiring a newer setuptools/pip than the default build container. Maintainers deemed it an upstream limitation, recommending adding charm-python-packages to charmcraft.yaml or removing jinja2. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #922 Unable to pack charms on a GCP instance | charmcraft | closed | Closed as not a Charmcraft bug. The error stems from a pip and setuptools version mismatch. Maintainers provided a workaround: adding setuptools to charm-python-packages in charmcraft.yaml to force an update and resolve the build failure. | |
| #551 [charmcraft 1.3]: Cannot pack a charm with Jinja2 as dependency | charmcraft | closed | Charmcraft 1.3 failed to pack charms with Jinja2 due to dependency issues. Closed with a setuptools workaround. Resolved via PR #553, which adds a charm-python-packages property to pre-install dependencies before requirements. | |
| #639 Can't build charm: Failed to build charm for bases index '0' | charmcraft | closed | Resolved as a jinja2 and setuptools version conflict. Provided a charmcraft.yaml workaround to install or pin setuptools. A later user confirmed charmcraft clean followed by pack also fixed it. Closed without code changes. | |
| #632 Cant build charm with charmhelpers - missing markupsafe | charmcraft | closed | Charm build failed due to a setuptools version conflict between Jinja2 and Tempita. Resolved by adding charm-python-packages: [setuptools < 58] to charmcraft.yaml. Issue closed as resolved. | |
| #566 Error when building with charmcraft from edge | charmcraft | closed | Closed as a duplicate of #551. Resolved via a config workaround adding setuptools to charm-python-packages. A follow-up confirmed adding pip alongside setuptools fixed circular dependency build failures. | |
| #749 Charmcraft pack crashed with `cannot install all requested build packages` | charmcraft | closed | Closed as a non-issue. The crash resulted from a temporary Ubuntu archive 404 error. Running clean merely coincided with a successful retry. Maintainer closed the report, advising re-opening if the transient failure recurs. |