Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Cross build not working on OSX: cgo_export_static main only allowed in cgo-generated code #743

Open
cchantep opened this issue Mar 31, 2019 · 0 comments

Comments

@cchantep
Copy link

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant