← 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
2025-12-19 04:01:14+00:00
Updated
2025-12-19 04:01:14+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

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

No evaluation history available.