You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the LXD snap, we have some parts that are meant to be supported on some arches only. For example, we don't want to ship QEMU for armhf nor riscv64. As such, the qemu part is constructed to avoid installing the build-packages and the stage-packages when building for armhf/riscv64:
qemu:
build-packages:
- to armhf:
- cmake # placeholder pkg (actually used by lxd part) to avoid installing build-packages on unsupported arches
- to riscv64:
- cmake # placeholder pkg (actually used by lxd part) to avoid installing build-packages on unsupported arches
- else:
- bison
- ...
- librbd-dev
stage-packages:
- to armhf:
- acl # placeholder pkg (actually used by lxd part) to avoid installing stage-packages on unsupported arches
- to riscv64:
- acl # placeholder pkg (actually used by lxd part) to avoid installing stage-packages on unsupported arches
- else:
- genisoimage
- ...
- qemu-system-data # This is needed due to --disable-install-blobs.
...
However, only the last - to $ARCH: clause seems to be respected as on armhf, the builds on LP builders always fail complaining that librbd-dev is not available. librbd-dev is indeed not available for armhf which is the whole reason why we try to exclude it with the - to/- else clauses.
The exclusion works for the - to riscv64: as neither librbd-dev nor qemu-system-data are found in the riscv64 build logs.
important: Inverting the - to armhf: and - to riscv64: made the armhf build work as it then stops trying to pull librbd-dev
Due to canonical/snapcraft#5255, only one `-
to` clause is supported in `build-packages` and `stage-packages`.
Many of our parts would need exclusions for both `armhf` and `riscv64`
but since only one `- to` clause can be used, `armhf` was selected as it
has some packages that are not even installable (not available in
Noble/core24) while they are for `riscv64`.
This means `riscv64` will install some packages for no reasons but at
least it will work.
Another thing worth noting in this PR is the removal of the LXD docs
from the `armhf` build due to some Python wheels being missing for this
arch.
Bug Description
In the LXD snap, we have some parts that are meant to be supported on some arches only. For example, we don't want to ship QEMU for
armhf
norriscv64
. As such, theqemu
part is constructed to avoid installing thebuild-packages
and thestage-packages
when building forarmhf
/riscv64
:However, only the last
- to $ARCH:
clause seems to be respected as onarmhf
, the builds on LP builders always fail complaining thatlibrbd-dev
is not available.librbd-dev
is indeed not available forarmhf
which is the whole reason why we try to exclude it with the- to
/- else
clauses.The exclusion works for the
- to riscv64:
as neitherlibrbd-dev
norqemu-system-data
are found in theriscv64
build logs.important: Inverting the
- to armhf:
and- to riscv64:
made thearmhf
build work as it then stops trying to pulllibrbd-dev
To Reproduce
snapcraft remote-build --platform amd64,armhf,riscv64
on a cloned repo from https://github.com/canonical/lxd-pkg-snapEnvironment
snapcraft.yaml
https://github.com/canonical/lxd-pkg-snap/blob/f3327146996d52e66f8726a88766021f678e2575/snapcraft.yaml
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: