Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling against ARM fails #133

Open
leipert opened this issue Jan 25, 2018 · 3 comments
Open

Compiling against ARM fails #133

leipert opened this issue Jan 25, 2018 · 3 comments

Comments

@leipert
Copy link

leipert commented Jan 25, 2018

I am trying to cross-compile for my raspberry pi (see here keybase/client#2938).

env GOOS=linux GOARCH=arm GOARM=5 GO15VENDOREXPERIMENT=1 \
> go build -tags production github.com/keybase/client/go/keybase

returns

# github.com/keybase/client/go/vendor/github.com/keybase/go-framed-msgpack-rpc/rpc/resinit
src/github.com/keybase/client/go/vendor/github.com/keybase/go-framed-msgpack-rpc/rpc/resinit/resinit.go:17:3: undefined: resInit

Do you have any idea how to fix this?

@jzila
Copy link

jzila commented Jan 25, 2018

You can add -tags noresinit and it should work.

@oconnor663
Copy link

I believe you need to export CGO_ENABLED=1 when cross-compiling. The Go language decides that CGO should be silently disabled by default for cross platform builds, and the result is missing symbols in cases where CGO would've provided them. Maybe we should add a !cgo file that triggers a more obvious error, to help with confusion around this? I feel like we considered that before, and I don't remember what we decided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants