go plugin: Cross compile with CGo
Metadata
Current evaluation
Merged CGo-aware cross-compilation for Go parts in PR #1343 at commit 55fe00c67, following general Go cross-compilation in #1338.
Resolution: closed resolved
Reason: PR #1343 was merged and landed as commit 55fe00c67, adding CGo-aware target-architecture handling for Go parts. It completed the CGo follow-up to merged PR #1338 (a167ec4a3).
Evaluated by: mr-cal-bot
No scores available.
Issue body
Support cross-compilation when using _CGo_ in a **go** part.
Follow-up on [go plugin: Add support for cross-compilation](https://github.com/snapcore/snapcraft/pull/1338).
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged CGo-aware cross-compilation for Go parts in PR #1343 at commit 55fe00c67, following general Go cross-compilation in #1338. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1343 in commit 55fe00c67, adding CGo-aware Go cross-compilation for Go parts as a follow-up to #1338. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1343 as commit 55fe00c67, adding CGo-aware cross-compilation for Go parts and completing the foundation from #1338. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #1343, adding CGo-aware Go cross-compilation support as a follow-up to #1338. Changes were committed as 55fe00c67. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged to enable cross-compilation for Go plugins when CGo is enabled. Approved by one reviewer, the change updates seven files with 83 additions and 7 deletions to correctly handle CGo flags during cross builds. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged update enabling cross-compilation for the Go plugin when CGo is enabled. Extends prior cross-compilation support to handle CGo dependencies, allowing builds for non-native architectures. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/snapcraft#1338
(confidence 100%)
Merged commit a167ec4a3 introduced general Go cross-compilation that PR #1343 extended to CGo.
-
Related To:
canonical/snapcraft#1253
(confidence 95%)
The earlier cross-compilation proposal was split into focused PRs, including PR #1343.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1253 go plugin: cross-compilation support | snapcraft | closed | Closed unmerged after the author split it into #1338 (cross-compilation), #1343 (CGo cross-compile), #1346 (multi-arch build deps) and #1348 (foreign arch setup). #1338 (a167ec4a3) and #1343 (55fe00c67) were merged. | |
| #1338 go plugin: Add support for cross-compilation | snapcraft | merged | Merged #1338 in commit a167ec4a3, adding target-architecture cross-compilation for snaps built from parts using the Go plugin. | |
| #92 go plugin: Use CGO_LDFLAGS when building | snapcraft | merged | Merged PR #92 as commit b397f07be (merge 7a6a4520d), exporting CGO_LDFLAGS from the staged root so Go builds can link libraries installed by stage-packages. |