Can't build charm: Failed to build charm for bases index '0'
Metadata
Current evaluation
Closed as a dependency/configuration issue: adding setuptools fixed Jinja2 packing, while Tempita required setuptools <58. A later build recovered after charmcraft clean.
Resolution: closed not a bug
Reason: Maintainer cmatsuoka diagnosed incompatible initial setuptools and documented adding setuptools to charm-python-packages, or pinning it below 58 for Tempita. A later report confirmed that charmcraft clean followed by charmcraft pack restored the build.
Evaluated by: mr-cal-bot
No scores available.
Issue body
I'm trying to build a charm using `charmcraft 1.4.0`, but it fails with the error `"Failed to build charm for bases index '0'"`.
I've build this charm before in this machine, also tried building it in another machine, but got the same error.
The log I get: https://paste.ubuntu.com/p/hfvnSzbxzx/
I appreciate any help with this!
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed not a bug | Closed as a dependency/configuration issue: adding setuptools fixed Jinja2 packing, while Tempita required setuptools <58. A later build recovered after charmcraft clean. | |
| stealth/space-bunny-alpha | — | closed not a bug | Build error in Charmcraft 1.4.0 traced to jinja2 needing a newer setuptools; maintainer closed it as a charm config issue, adding `charm-python-packages: [setuptools]` (or `setuptools < 58` for Tempita) to charmcraft.yaml. A later attempt succeeded after `charmcraft clean`. | |
| stealth/space-bunny-alpha | — | closed not a bug | Closed as a dependency/configuration problem: install setuptools via charm-python-packages, or pin setuptools <58 for Tempita. A later build also recovered after charmcraft clean. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | 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. | |
| qwen/qwen3.6-35b-a3b | — | — | Build failure caused by outdated setuptools. Resolved by adding setuptools to charm-python-packages in charmcraft.yaml or running charmcraft clean followed by pack. Issue closed. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. Resolved as a setuptools version conflict with jinja2. Fixed by adding setuptools to charm-python-packages in charmcraft.yaml or running charmcraft clean followed by pack. |
Update history
No update history recorded yet.
Related work
-
Related To:
charmcraft#632
(confidence 98%)
The directly linked setuptools/MarkupSafe packaging failure had the same dependency cause and was resolved by pinning setuptools <58.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #632 Cant build charm with charmhelpers - missing markupsafe | charmcraft | closed | Charmhelpers-based charm build failed with missing markupsafe via Jinja2/setuptools 58+ vs Tempita 2to3 conflict. cmatsuoka diagnosed it and the reporter confirmed the workaround works; maintainer closed the issue as solved without a charmcraft code change. | |
| #551 [charmcraft 1.3]: Cannot pack a charm with Jinja2 as dependency | charmcraft | closed | Jinja2 pack failure in charmcraft 1.3 was traced to old setuptools in the build venv. Resolved by merged PR #553 (ccec8b7e, commit 4b2d291b) adding a charm-python-packages charm plugin property, letting charms preinstall setuptools. | |
| #566 Error when building with charmcraft from edge | charmcraft | closed | Closed by facundobatista as a duplicate of #551 (Jinja2/setuptools packing failure in 1.3 edge). Resolved via merged PR #553 (ccec8b7e, commit 4b2d291b) adding charm-python-packages; workaround is adding setuptools/pip. | |
| #792 22.10 - Failed to build charm for bases index '0'. | charmcraft | closed | Reporter's reactive charm failed to build; maintainer facundobatista closed it as not a Charmcraft bug — the legacy `charm` tool rejects metadata.yaml without a `series` list. Author agreed and took it to the Juju team. | |
| #738 Crash with `charmcraft pack` | charmcraft | closed | Closed as an upstream Jinja2/setuptools packaging interaction; removing Jinja2 or preinstalling newer pip and setuptools through charm-python-packages restored packing. |