charmcraft pack on Ubuntu 23.04 (Lunar) fails.
Metadata
Current evaluation
Charmcraft pack failed on Ubuntu 23.04 due to unavailable build environments. PR #1130 addressed the issue but was blocked by an external cloud-images bug. The issue was closed pending upstream resolution.
Suggested action: —
No scores available.
Issue body
When trying to build a charm using ubuntu-23.04 as the base for the build-on and run-on stanzas, I get no charm when using charmcraft-2.2:
```
$ charmcraft pack
No suitable 'build-on' environment found in 'bases[1]' configuration.
No suitable 'build-on' environment found in 'bases[2]' configuration.
No suitable 'build-on' environment found in 'bases[3]' configuration.
No suitable 'build-on' environment found in 'bases[4]' configuration.
No suitable 'build-on' environment found in 'bases[5]' configuration.
No suitable 'build-on' environment found in 'bases[6]' configuration.
No suitable 'build-on' environment found in 'bases[7]' configuration.
Packing the charm
Building charm in '/root' | (3.0s) found charm-tools 3.0.6 (+git-0-1847cbe)
Created 'ovn-dedicated-chassis_ubuntu-22.04-amd64_ubuntu-22.10-amd64.charm'.
Charms packed:
ovn-dedicated-chassis_ubuntu-22.04-amd64_ubuntu-22.10-amd64.charm
```
Although if I switch to the `latest/edge` channel, I get the following error:
```
Created 'ovn-dedicated-chassis_ubuntu-22.04-amd64_ubuntu-22.10-amd64.charm'.
charmcraft internal error: LXDUnstableImageError(brief="Cannot launch an unstable image 'lunar' from remote 'ubuntu-daily'", details='Devel or daily images are not guaranteed and are intended for experimental use only.', resolution=None)
```
The charmcraft.yaml used is the one below. In general we need to be able to build and run charms on any ubuntu base, since Charmed OpenStack is capable of running on LTS releases and interim releases.
Test Case:
```
git clone https://opendev.org/x/charm-ovn-dedicated-chassis
cd charm-ovn-dedicated-chassis/
git fetch https://review.opendev.org/x/charm-ovn-dedicated-chassis refs/changes/38/883438/1 && git checkout FETCH_HEAD
tox -e build
```
Expected Result: charmcraft produces 2 charm files, one for 22.04 and 22.10, another one for 23.04.
Actual Result: only one charm file is built for 22.04 and 22.10
```yaml
type: charm
parts:
charm:
source: src/
plugin: reactive
reactive-charm-build-arguments:
- --binary-wheels-from-source
- -v
build-packages:
- git
- python3-dev
- libffi-dev
- libssl-dev
- rustc
- cargo
build-snaps:
- charm
build-environment:
- CHARM_INTERFACES_DIR: $CRAFT_PROJECT_DIR/interfaces/
- CHARM_LAYERS_DIR: $CRAFT_PROJECT_DIR/layers/
- MAKEFLAGS: -j$(nproc)
bases:
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [amd64]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [amd64]
- name: ubuntu
channel: "22.10"
architectures: [amd64]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [arm64]
- name: ubuntu
channel: "22.10"
architectures: [arm64]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [ppc64el]
- name: ubuntu
channel: "22.10"
architectures: [ppc64el]
- build-on:
- name: ubuntu
channel: "22.04"
architectures: [s390x]
run-on:
- name: ubuntu
channel: "22.04"
architectures: [s390x]
- name: ubuntu
channel: "22.10"
architectures: [s390x]
- build-on:
- name: ubuntu
channel: "23.04"
architectures: [amd64]
run-on:
- name: ubuntu
channel: "23.04"
architectures: [amd64]
- build-on:
- name: ubuntu
channel: "23.04"
architectures: [arm64]
run-on:
- name: ubuntu
channel: "23.04"
architectures: [arm64]
- build-on:
- name: ubuntu
channel: "23.04"
architectures: [ppc64el]
run-on:
- name: ubuntu
channel: "23.04"
architectures: [ppc64el]
- build-on:
- name: ubuntu
channel: "23.04"
architectures: [s390x]
run-on:
- name: ubuntu
channel: "23.04"
architectures: [s390x]
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 | — | — | Charmcraft pack failed on Ubuntu 23.04 due to unavailable build environments. PR #1130 addressed the issue but was blocked by an external cloud-images bug. The issue was closed pending upstream resolution. | |
| qwen/qwen3.6-35b-a3b | — | — | charmcraft pack failed on Ubuntu 23.04 due to missing build environments. PR #1130 was prepared to use buildd images and warn about interim releases, but the issue was closed while blocked by an external cloud-images bug. | |
| qwen/qwen3.6-35b-a3b | — | — | Ubuntu 23.04 charm builds fail due to missing buildd image support. PR #1130 resolves this by switching to buildd images, but remains blocked by Launchpad bug #2007419. The issue is closed pending the upstream fix. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | PR #1130 proposes a fix to use buildd images for interim releases, but the issue remains closed and unresolved due to being blocked by external Launchpad bug #2007419 regarding cloud image availability. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed. PR #1130 addresses Ubuntu 23.04 build failures by using buildd images but remains blocked by an upstream cloud-images bug. Pending upstream resolution. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #501 charmcraft pack fails trying to include a non-existing charm/src/.tox/ | charmcraft | closed | charmcraft pack failed when copying non-existent build directories or files. Users worked around it with charmcraft clean. The issue was closed as fixed upstream in the underlying parts lifecycle code. | |
| #560 Charmcraft pack is giving error frequently | charmcraft | closed | Charmcraft pack failed due to an apt-get network error installing snapd in an LXD container. Maintainers linked it to a known networking issue. The reporter confirmed a workaround failed. Closed without a code fix, likely abandoned. | |
| #497 charmcraft Pack is not Working | charmcraft | closed | Resolved via user environment fix. The permission error stemmed from running charmcraft as root with root-owned files. Switching to a regular user, adding them to the lxd group, and correcting ownership allowed pack to succeed. No code changes required. | |
| #708 fix "charmcraft pack" on macOS | charmcraft | closed | Superseded by PR #718, which fixes the root cause of the macOS charmcraft pack build failure involving missing Linux GCC tools. | |
| #2816 `charmcraft pack` fails on Resolute | charmcraft | open | charmcraft pack fails on Ubuntu Resolute 26.04 host with Jammy container due to AppArmor protocol incompatibility. Untriaged, no maintainer response. | |
| #511 `charmcraft pack` fails running `apt update` | charmcraft | closed | Closed as out of scope. The failure stemmed from an LXD container networking bug, not charmcraft. No code changes were implemented; users were directed to external LXD and Discourse discussions for troubleshooting. | |
| #796 Charmcraft pack on Apple Silicon fails | charmcraft | closed | Charmcraft pack failed on Apple Silicon because Multipass could not locate the Ubuntu 20.04 image. The root cause was a Multipass bug fixed in version 1.9.2. The report was closed as an external dependency issue, not a Charmcraft defect. | |
| #815 charmcraft pack fails - connection timed out could not connect | charmcraft | closed | charmcraft pack failed due to network timeouts connecting to Ubuntu repositories. Rebooting the host restored connectivity and resolved the error. The author closed the report as self-resolved. | |
| #2631 Multiple `charmcraft pack` fail on mismatching platforms | charmcraft | open | Charmcraft 4.2.0+ reuses a managed LXD instance from a prior `charmcraft pack` of a different project, causing the second pack to fail with 'Platform not found in the project definition' when platform sets differ. Still reproducible on 4.3.1 per reporter's 2026-08-17 comment; no maintainer response or labels yet. | |
| #883 Charmcraft (2.0.0) pack with build-packages failing on GitHub actions (but 2.1.0 - latest/candidate - is working) | charmcraft | closed | Closed as not a Charmcraft bug. The build-packages failure on updated GitHub Actions runners was attributed to an underlying Craft Providers library update. A manual apt-get update workaround exists, and version 2.1.0 resolves the issue. |