← Back to issue list

go plugin: Cross compile with CGo

View original Github issue

Metadata

Project
snapcraft
Number
#1343
Type
pull request
State
merged
Author
kalikiana
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged: Enables cross-compilation for the Go plugin when CGo is enabled. Extends prior cross-compilation support to CGo-dependent builds.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1253 go plugin: cross-compilation support snapcraft closed Superseded. The author split the changes into four smaller pull requests: go plugin cross-compilation support, CGo cross-compilation, multi-arch build dependencies, and foreign arch setup.
86%
#1338 go plugin: Add support for cross-compilation snapcraft merged Merged after approval, enabling cross-compilation for the Go plugin via snapcraft's --target-arch flag. Six files were modified with 144 additions and 11 deletions.
82%
#92 go plugin: Use CGO_LDFLAGS when building snapcraft merged Merged an update to the go plugin that applies CGO_LDFLAGS during building, enabling staged libraries from stage-packages to be found. The change passed tests, received approval, and resolved the linked bug.
75%
#5931 docs: golang plugin doc missing information on cross-compiling snapcraft open Go plugin docs omit cross-compilation; reporter shows cross-compile fails because the plugin sets GOBIN (go install error), and clearing GOBIN triggers a missing install-dir error. Untriaged, no labels or maintainer response in ~255 days.
74%
#709 Improve the go plugins usability snapcraft merged Merged to improve Go plugin usability by combining source keywords with go-packages, enabling selective main package builds and remote fallback. Reviewer feedback on tests and build tags was incorporated before approval. The update modifies seven files.
72%
#161 Go plugin creating invalid env snapcraft merged Merged a fix for the Go plugin generating invalid environment variables during python3 executable wrapping. The change removes unnecessary CGO_LDFLAGS. Approved after reviewer confirmation, with a note to backport to the 1.x branch.
71%
#78 plugins: add go plugin (CRAFT-48) craft-parts merged Merged a Go plugin for go.mod-based projects, adapted from Snapcraft V2. Approved by two reviewers, passed CI, and introduced 425 additions across seven files. Co-authored by Sergio Schvezov.
70%