← Back to issue list

Can't build charm: Failed to build charm for bases index '0'

View original Github issue

Metadata

Project
charmcraft
Number
#639
Type
issue
State
closed
Author
julianaklulo
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Fixed by adding setuptools to charm-python-packages in charmcraft.yaml or running charmcraft clean before packing. The issue was closed after the workaround resolved the jinja2 dependency conflict.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
82%
#792 22.10 - Failed to build charm for bases index '0'. charmcraft closed Rejected as not a Charmcraft bug. The build fails due to a missing series field in metadata.yaml when using the legacy charm tool. The author acknowledged the config change and will coordinate with the Juju team.
78%
#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.
77%
#738 Crash with `charmcraft pack` charmcraft closed 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.
77%
#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.
75%
#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.
74%