Skip to content
This repository was archived by the owner on Mar 6, 2020. It is now read-only.
This repository was 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

@cchantep

Description

@cchantep

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions