← Back to issue list

docs: golang plugin doc missing information on cross-compiling

View original Github issue

Metadata

Project
snapcraft
Number
#5931
Type
issue
State
open
Author
sed-i
Labels
—
Created
Updated
Closed
—

Current evaluation

Go plugin docs omit a reproducible cross-build failure: its fixed GOBIN makes `go install` reject foreign binaries, while clearing GOBIN prevents the install directory from being created.

Suggested action: needs triage

Reason: The issue has no labels, assignee, or maintainer response. However, the report includes two concrete errors and the implementation unconditionally sets GOBIN to the part's bin directory, while the build runs `go install`; this validates the limitation but requires maintainers to choose whether to document, pre-create, or redesign the plugin.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 24 Complexity: 25 Confidence: 92 Actionability: 72

Issue body

*Please describe the question or issue you're facing with "Go plugin - Snapcraft 8.13.2 documentation".* The "Environment variables" section states that: > During build, this plugin sets `GOBIN` to `${CRAFT_PART_INSTALL}/bin`. However, when I try to cross-compile on amd64, snapcraft pack errors out with: ``` Detailed information: :: + go mod download all :: + go install -p 8 ./... :: go: cannot install cross-compiled binaries when GOBIN is set Recommended resolution: Check the build output and verify the project can work with the 'go' plugin. ``` But when I clear it, ```yaml build-environment: - GOBIN: "" ``` then `pack` fails with: ``` FileNotFoundError: [Errno 2] No such file or directory: '/root/parts/<snap name>/install/usr' ``` --- *Reported from: https://documentation.ubuntu.com/snapcraft/8.13.2/common/craft-parts/reference/plugins/go_plugin/*

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 24
Complexity: 25
Confidence: 92
Actionability: 72
needs triage Go plugin docs omit a reproducible cross-build failure: its fixed GOBIN makes `go install` reject foreign binaries, while clearing GOBIN prevents the install directory from being created.
qwen/qwen3.6-35b-a3b
Impact: 40
Quick Win: 19
Complexity: 40
Confidence: 70
Actionability: 80
keep open Go plugin sets GOBIN which causes cross-compilation to fail; docs don't mention this limitation or workaround
qwen/qwen3.8-27b
Impact: 35
Quick Win: 23
Staleness: 70
Complexity: 35
Confidence: 70
Support Request: 45
needs triage 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.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 45
Confidence: 85
Support Request: 60
needs triage Snapcraft Go plugin documentation lacks cross-compilation guidance. Setting GOBIN causes go install failures during cross-compilation, while clearing it triggers a missing directory error. Untriaged with no maintainer response after 215 days.
qwen3.6-35b-a3b-mtp-q6
Staleness: 70
Complexity: 20
Confidence: 75
Support Request: 30
needs triage Documentation for the Snapcraft Go plugin lacks guidance on handling cross-compilation. Setting GOBIN causes build errors, while clearing it causes missing directory errors. Issue remains untriaged with no maintainer response after 201 days.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#1338 (confidence 68%)

    Related historical work added Go cross-compilation support in the legacy Snapcraft implementation; it does not show that the current Craft Parts Go plugin's GOBIN conflict was resolved.

  • Related To: snapcraft#1343 (confidence 68%)

    Related historical work added CGo-aware Go cross-compilation support, but it does not establish a resolution for the current plugin.

Related issues

No related issues found above the similarity threshold.