← Back to issue list

Rust part fails to build on riscv but passes on any other architecture (core22)

View original Github issue

Metadata

Project
snapcraft
Number
#5860
Type
issue
State
closed
Author
Hook25
Labels
Status: Needs information
Created
Updated
Closed

Current evaluation

Closed as a transient issue. The author reported a Rust build failure on riscv/core22 due to a rustup error but later confirmed it was a temporary fluke that did not recur. The issue remains closed pending re-opening if the problem returns.

Suggested action:

No scores available.

Issue body

### Bug Description Building the same part on different architecture fails on riscv core22 with the following error: [(full log here)](https://productionresultssa18.blob.core.windows.net/actions-results/f013c6d2-eec4-474e-977b-92d2705547ce/workflow-job-run-9bd539c9-7a37-560d-a3ef-4bfef2c9a695/logs/job/job-logs.txt?rsct=text%2Fplain&se=2025-10-31T09%3A17%3A50Z&sig=fR%2FONdmcEpvuJ%2B1KHCF30Uwnov3kA0rFsogOLKOeJgs%3D&ske=2025-10-31T20%3A58%3A07Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-10-31T08%3A58%3A07Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2025-10-31T09%3A07%3A45Z&sv=2025-11-05) ``` 2025-10-30T20:01:38.4843633Z Building gnome-randr 2025-10-30T20:01:38.5769595Z Generating build commands for . 2025-10-30T20:01:38.5774469Z :: + cargo read-manifest --manifest-path ./Cargo.toml 2025-10-30T20:01:40.0876637Z :: error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured. 2025-10-30T20:01:40.0883502Z :: help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain. 2025-10-30T20:01:40.0973655Z :: + pushd . 2025-10-30T20:01:40.0994479Z :: /data/parts/gnome-randr/build /data/parts/gnome-randr/build 2025-10-30T20:01:40.1003909Z :: + cargo build --workspace --release 2025-10-30T20:01:41.5791354Z :: error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured. ``` While on armhf (for example, it works just fine) see: [build](https://productionresultssa18.blob.core.windows.net/actions-results/f013c6d2-eec4-474e-977b-92d2705547ce/workflow-job-run-0762c87b-ea41-5f67-bb95-f9806a6e98ed/logs/job/job-logs.txt?rsct=text%2Fplain&se=2025-10-31T09%3A41%3A07Z&sig=4FhOgkZHyGENXI%2BjzX4FU9KDTOicWmOWBMQIf84PU%2F0%3D&ske=2025-10-31T20%3A58%3A15Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-10-31T08%3A58%3A15Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2025-10-31T09%3A31%3A02Z&sv=2025-11-05) > Note: the same exact part on riscv but on core24 builds just fine: [link](https://productionresultssa18.blob.core.windows.net/actions-results/f013c6d2-eec4-474e-977b-92d2705547ce/workflow-job-run-ac57f2af-dee8-5362-a883-0d49e32eef0b/logs/job/job-logs.txt?rsct=text%2Fplain&se=2025-10-31T12%3A41%3A28Z&sig=4MOV1EPag13ZcMPJhV6ACSMvplxn6TfWsyOk59%2FjcnA%3D&ske=2025-10-31T21%3A05%3A10Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-10-31T09%3A05%3A10Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2025-10-31T12%3A31%3A23Z&sv=2025-11-05) ### To Reproduce Create a core22 snap with the following part: ``` gnome-randr: source: https://github.com/maxwellainatchi/gnome-randr-rust.git plugin: rust rust-channel: nightly build-packages: - libdbus-1-dev ``` Build it on any architecture that is not riscv, it passes Build it on riscv: it fails with the error above ### Environment - snapcraft 8.12.0 (all builds for all architectures are on the same snapcraft version) - canonical/snapcraft-multiarch-action@v1 - ubuntu-latest ### snapcraft.yaml ```yaml base: core22 [...] gnome-randr: source: https://github.com/maxwellainatchi/gnome-randr-rust.git plugin: rust rust-channel: nightly build-packages: - libdbus-1-dev [...] ``` ### Relevant log output ```shell 2025-10-30T18:14:27.1954486Z snapcraft 8.12.0 from Canonical✓ installed [...] 2025-10-30T20:01:38.4843633Z Building gnome-randr�[K 2025-10-30T20:01:38.5769595Z Generating build commands for .�[K 2025-10-30T20:01:38.5774469Z :: + cargo read-manifest --manifest-path ./Cargo.toml�[K 2025-10-30T20:01:40.0876637Z :: error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured.�[K 2025-10-30T20:01:40.0883502Z :: help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain.�[K 2025-10-30T20:01:40.0973655Z :: + pushd .�[K 2025-10-30T20:01:40.0994479Z :: /data/parts/gnome-randr/build /data/parts/gnome-randr/build�[K 2025-10-30T20:01:40.1003909Z :: + cargo build --workspace --release�[K 2025-10-30T20:01:41.5791354Z :: error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured.�[K ``` ### Additional context Failing build on [core22 riscv](https://productionresultssa18.blob.core.windows.net/actions-results/f013c6d2-eec4-474e-977b-92d2705547ce/workflow-job-run-9bd539c9-7a37-560d-a3ef-4bfef2c9a695/logs/job/job-logs.txt?rsct=text%2Fplain&se=2025-10-31T09%3A17%3A50Z&sig=fR%2FONdmcEpvuJ%2B1KHCF30Uwnov3kA0rFsogOLKOeJgs%3D&ske=2025-10-31T20%3A58%3A07Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-10-31T08%3A58%3A07Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2025-10-31T09%3A07%3A45Z&sv=2025-11-05) Passing build on [core22 armhf](https://productionresultssa18.blob.core.windows.net/actions-results/f013c6d2-eec4-474e-977b-92d2705547ce/workflow-job-run-0762c87b-ea41-5f67-bb95-f9806a6e98ed/logs/job/job-logs.txt?rsct=text%2Fplain&se=2025-10-31T09%3A41%3A07Z&sig=4FhOgkZHyGENXI%2BjzX4FU9KDTOicWmOWBMQIf84PU%2F0%3D&ske=2025-10-31T20%3A58%3A15Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-10-31T08%3A58%3A15Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2025-10-31T09%3A31%3A02Z&sv=2025-11-05) Passing build on [core24 riscv](https://productionresultssa18.blob.core.windows.net/actions-results/f013c6d2-eec4-474e-977b-92d2705547ce/workflow-job-run-ac57f2af-dee8-5362-a883-0d49e32eef0b/logs/job/job-logs.txt?rsct=text%2Fplain&se=2025-10-31T12%3A41%3A28Z&sig=4MOV1EPag13ZcMPJhV6ACSMvplxn6TfWsyOk59%2FjcnA%3D&ske=2025-10-31T21%3A05%3A10Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-10-31T09%3A05%3A10Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2025-10-31T12%3A31%3A23Z&sv=2025-11-05) The snap part is unchanged, only thing that changes is the base.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed as a transient issue. The author reported a Rust build failure on riscv/core22 due to a rustup error but later confirmed it was a temporary fluke that did not recur. The issue remains closed pending re-opening if the problem returns.
qwen/qwen3.6-35b-a3b Closed as a transient fluke. The author confirmed the rustup error on riscv/core22 did not recur after further testing and will re-open if it happens again. No code changes were applied.
qwen/qwen3.6-35b-a3b Closed as a transient fluke. The rustup version selection failure on riscv core22 did not recur, and the author will re-open if it returns. No code changes were applied.
qwen3.6-35b-a3b-mtp-q6 Closed as a transient fluke. The author reported a Rust build failure on riscv/core22 due to rustup configuration but could not reproduce it after two weeks. No code changes were applied, and the issue was closed pending recurrence.
qwen3.6-35b-a3b-mtp-q6 Closed as a transient fluke. The author confirmed the rustup configuration error on riscv core22 did not reoccur and will re-open if it returns. No code changes were applied.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#4163 snap: use rustup on risc-v snapcraft merged Merged to configure rustup for RISC-V snap builds as a temporary workaround until core22 migration. Approved, passed CI, and targeted for version 7.4.1.
71%