← Back to issue list

Wrong arch being used in core24 project variables

View original Github issue

Metadata

Project
snapcraft
Number
#4770
Type
issue
State
closed
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #4779 (commit 3e3428ec1): craft-application 2.6.3 supplied the build-for architecture fix, with regression coverage added.

Resolution: closed resolved

Reason: The maintainer closed the issue with "Fixed via #4779." PR #4779 is merged as commit 3e3428ec1, updates craft-application to 2.6.3, and adds coverage for BUILD_ON/BUILD_FOR architecture variables.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description The wrong architecture is being used for `CRAFT_ARCH_TRIPLET_BUILD_FOR` for core24 when using `--build-for`. It's probably using the host architecture. The other `ARCH` project variables need to be checked as well. ### To Reproduce ```shell > snapcraft pack --build-for arm64 > unsquashfs test-snap_0.1_arm64.snap > cat squashfs-root/file.txt x86_64-linux-gnu ``` ### Environment n/a ### snapcraft.yaml ```shell name: test-snap version: '0.1' summary: test description: test grade: devel confinement: devmode base: core24 platforms: arm64: build-on: [amd64, arm64] build-for: arm64 parts: my-part: plugin: nil override-build: | echo "${CRAFT_ARCH_TRIPLET_BUILD_FOR}" > $CRAFT_PART_INSTALL/file.txt ``` ### Relevant log output ```shell n/a ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #4779 (commit 3e3428ec1): craft-application 2.6.3 supplied the build-for architecture fix, with regression coverage added.
stealth/space-bunny-alpha — closed resolved Fixed by PR #4779 (3e3428ec1), merged: bumped craft-application to 2.6.3 where the build-for arch fix lives, and added BUILD_ON/BUILD_FOR variable regression coverage.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #4779 (commit 3e3428ec1), which upgraded craft-application to 2.6.3, corrected build-on architecture variables, and added a regression test.
qwen/qwen3.6-35b-a3b — — The CRAFT_ARCH_TRIPLET_BUILD_FOR variable incorrectly used the host architecture instead of the target when using --build-for on core24. The bug was resolved and merged via pull request #4779.
qwen/qwen3.6-35b-a3b — — CRAFT_ARCH_TRIPLET_BUILD_FOR incorrectly used the host architecture instead of the --build-for target for core24. Fixed via PR #4779.
qwen/qwen3.6-35b-a3b — — The CRAFT_ARCH_TRIPLET_BUILD_FOR architecture mismatch in core24 was fixed. The bug incorrectly used the host architecture instead of the --build-for target, resolved via PR #4779.
qwen3.6-35b-a3b-mtp-q6 — — CRAFT_ARCH_TRIPLET_BUILD_FOR incorrectly used the host architecture instead of the --build-for target for core24. The issue was fixed and closed via pull request #4779.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: snapcraft#4779 (confidence 99%)

    Merged resolving PR that upgraded craft-application to 2.6.3 and added architecture-variable regression coverage.

Related issues

Issue Project State Summary Similarity
#4704 Some variables aren't properly set snapcraft closed Fixed core24 architecture/project environment-variable setup by merged PR #4757 (commit 27957515c); remaining CRAFT_PROJECT_NAME/VERSION interpolation stayed tracked in craft-application#320.
74%
#4757 fix: set project variables for core24 snapcraft merged Merged #4757 as commit 27957515c, fixing core24 project-variable expansion and closing #4704/#4702; CRAFT_* setup was linked to canonical/craft-application#320.
72%