Cross build not working on OSX: cgo_export_static main only allowed in cgo-generated code
Opened this issue · 0 comments
cchantep commented
Seem gb
is no longer able to cross build on OSX (was ok on a previous project).
# export GOOS=linux GOARCH=amd64
# gb build
mypkg
errors
internal/race
runtime/internal/sys
runtime/internal/math
unicode/utf8
runtime/internal/atomic
math/bits
sync/atomic
internal/cpu
internal/testlog
internal/bytealg
unicode
math
# runtime
cgo.go:9:3: //go:cgo_export_static main only allowed in cgo-generated code
strconv
FATAL: command "build" failed: exit status 2
... whereas on the same minimal Go code: go build
is working.
# go version
go version go1.12.1 darwin/amd64