← Back to issue list

Error when building with charmcraft from edge

View original Github issue

Metadata

Project
charmcraft
Number
#566
Type
issue
State
closed
Author
dstathis
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed superseded

Reason: Maintainer facundobatista closed it as a duplicate of charmcraft#551 and asked the reporter to add setuptools to charm-python-packages. That underlying problem was fixed by merged PR #553 (implementation commit 4b2d291b, merge ccec8b7e) which introduced the charm-python-packages plugin property; the later commenter confirmed adding setuptools and pip resolved their build.

Evaluated by: mr-cal-bot

No scores available.

Issue body

My charm currently builds just fine on the stable channel (1.2.1) but fails with the following message on edge (1.3+22.g08b79ab): ``` $ charmcraft pack Packing charm 'cassandra-k8s_ubuntu-20.04-amd64.charm'... Parts processing error: Failed to run the build script for part 'charm'. (full execution logs in '/tmp/charmcraft.log') Failed to build charm for bases index '0'. (full execution logs in '/home/dylan/snap/charmcraft/common/charmcraft-log-1320vb84') ``` [charmcraft_log.txt](https://github.com/canonical/charmcraft/files/7307637/charmcraft_log.txt)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded 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.
stealth/space-bunny-alpha — closed superseded Closed as a duplicate of #551. The build workaround was to add setuptools—and, for circular dependencies, pip—to charm-python-packages; PR #553 enabled pre-installing such packages.
qwen3.6-35b-a3b-mtp-q6 — — 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.
qwen/qwen3.6-35b-a3b — — Closed as a duplicate of #551. Users resolved the build failure by adding charm-python-packages: [setuptools] to the charm part config. A follow-up noted that including pip was also necessary to resolve circular build dependencies.
qwen3.6-35b-a3b-mtp-q6 — — Closed as a duplicate of #551. A maintainer suggested adding setuptools to charm-python-packages. A follow-up user reported the same error but later identified their specific failure as circular build dependencies, resolved by adding pip to the package list.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: canonical/charmcraft#551 (confidence 95%)

    Maintainer comment explicitly labelled #566 a dup of #551 (Jinja2 packing failure on1.3 edge).

  • Likely Fixed By: canonical/charmcraft#553 (confidence 85%)

    Merged PR adding charm-python-packages (4b2d291b, merge ccec8b7e), the setting used as the documented workaround; the option still exists in the current code.

Related issues

Issue Project State Summary Similarity
#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.
77%
#639 Can't build charm: Failed to build charm for bases index '0' charmcraft closed Closed as a dependency/configuration issue: adding setuptools fixed Jinja2 packing, while Tempita required setuptools <58. A later build recovered after charmcraft clean.
76%
#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.
76%
#2259 Builds fail for 20.04 (in some common circumstances) charmcraft closed Fixed in canonical/charmcraft#2275 (commit 65d01ed5): charm builds now apply a bundled setuptools-scm constraint, avoiding the Python 3.8/3.9 all-source dependency cycle.
71%
#922 Unable to pack charms on a GCP instance charmcraft closed Closed as not a Charmcraft bug: Focal's old setuptools broke pip's wheel installation. Preinstalling setuptools via charm-python-packages works around it; #923 tracked the same regression.
71%