← Back to issue list

[cross-compile] when a deb package that has a dependency to non-architecture deb package, snapcraft does not recognize that and throws a dependency error

View original Github issue

Metadata

Project
snapcraft
Number
#4268
Type
issue
State
open
Author
bugraaydogar
Labels
Status: Needs information
Created
2023-07-11 13:51:23+00:00
Updated
2026-01-27 21:26:04+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Bug Description I experienced a weird error just recently while cross-building a snap based on core22. Basically, when the following dep package is added to the stage-package and `snapcraft --destructive-mode --target-arch=arm64 --enable-experimental-target-arch` is used, it will end up with the following error `Package 'gpsd-clients:arm64' has unmet dependencies: python3-serial`. ``` stage-packages: - gpsd-clients:arm64 ``` However, when I dig further, I realized that it is mainly because the python3-serial package is not architecture specific. If you try to stage-package a different deb package that is architecture specific. There is no error on this. Finally, according to my test results, if you do not specify any architecture, by default amd64 is used and snapcraft makes an exception for amd64 and does not complain about the unmet dependencies. ### To Reproduce 1- Build the following snapcraft.yaml file with `snapcraft --destructive-mode --target-arch=arm64 --enable-experimental-target-arch`. You will end up with `Package 'gpsd-clients:arm64' has unmet dependencies: python3-serial` ``` name: my-snap # you probably want to 'snapcraft register <name>' base: core22 # the base snap is the execution environment for this snap version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' summary: snap for running gpsd multiplexer # 79 char long summary description: | A snap for running GPSD, such that gps data from gpsd supported devices can be multiplexed and served over internal netwok of an ubuntu core machine. grade: devel # must be 'stable' to release into candidate/stable channels confinement: devmode # use 'strict' once you have the right plugs and slots architectures: - build-on: [amd64] build-for: [arm64] parts: gpsd: plugin: nil stage-packages: - gpsd-clients:arm64 ``` Then, build the following snapcraft.yaml file which is using a package that has architecture specific dependencies. ``` name: my-snap # you probably want to 'snapcraft register <name>' base: core22 # the base snap is the execution environment for this snap version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' summary: snap for running gpsd multiplexer # 79 char long summary description: | A snap for running GPSD, such that gps data from gpsd supported devices can be multiplexed and served over internal netwok of an ubuntu core machine. grade: devel # must be 'stable' to release into candidate/stable channels confinement: devmode # use 'strict' once you have the right plugs and slots architectures: - build-on: [amd64] build-for: [arm64] parts: gpsd: plugin: nil stage-packages: - gpsd-tools:arm64 ``` You will realize that, it builds without any issues. ### Environment Ubuntu 22.04 LTS. ### snapcraft.yaml ```shell Already provided. ``` ### Relevant log output ```shell ubuntu@snapcraft-jammy:~/host/work/geoint/issue$ snapcraft pull --destructive-mode --target-arch=arm64 --enable-experimental-target-arch --verbose Starting Snapcraft 7.4.3 Logging execution to '/home/ubuntu/.local/state/snapcraft/log/snapcraft-20230711-131542.525797.log' Running on amd64 for arm64 Initializing parts lifecycle Executing parts lifecycle... Executing parts lifecycle: pull gpsd Executing action Package 'gpsd-clients:arm64' has unmet dependencies: python3-serial. Full execution log: '/home/ubuntu/.local/state/snapcraft/log/snapcraft-20230711-131542.525797.log' ``` ``` ### Additional context _No response_

Evaluation history

No evaluation history available.