Wrong arch being used in core24 project variables
Metadata
Current evaluation
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.
Suggested action: —
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 |
|---|---|---|---|---|
| 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. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | The CRAFT_ARCH_TRIPLET_BUILD_FOR variable incorrectly used the host architecture instead of the --build-for target for core24. The bug was fixed via pull request #4779. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1997752 base core20: wrong arch triplet | snapcraft (launchpad) | closed | Closed without a fix or resolution, likely abandoned due to inactivity. The report indicated Snapcraft incorrectly sets SNAPCRAFT_ARCH_TRIPLET when building on a mismatched host architecture. No comments or patches were submitted. | |
| #4486 $CRAFT_ARCH_TRIPLET_BUILD_FOR doesn't work on core22 | snapcraft | closed | Resolved. The $CRAFT_ARCH_TRIPLET_BUILD_FOR substitution failure in core22 environment blocks was fixed in snapcraft 8. A maintainer confirmed the fix with a working test case demonstrating correct variable replacement. | |
| #4704 Some variables aren't properly set | snapcraft | closed | Fixed via PR #4757 by correctly setting architecture variables for core24 cross-architecture builds. CRAFT_PROJECT_NAME and CRAFT_PROJECT_VERSION remain unprocessed and are tracked separately in craft-application issue #320. |