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

GOARCH=arm failed to build runtime/cgo #3597

Closed
gopherbot opened this issue May 7, 2012 · 4 comments
Closed

GOARCH=arm failed to build runtime/cgo #3597

gopherbot opened this issue May 7, 2012 · 4 comments

Comments

@gopherbot
Copy link
Contributor

by duzy.chan:

The ARM support of runtime/cgo has recently been added. But "GOARCH=arm
./all.bash" will fail.

The package runtime/cgo is the only package requires ARM targeted gcc in this scheme.
Now we can have 5a, 5g, 5l, but without runtime/cgo in the scheme of
"GOARCH=arm", thus we can't use 5a, 5g, 5l with ARM targeted cgo from in our
host like amd64.
@rsc
Copy link
Contributor

rsc commented May 8, 2012

Comment 1:

Try
export CGO_ENABLED=0
before your all.bash

@gopherbot
Copy link
Contributor Author

Comment 2 by duzy.chan:

But without CGO, we can't call C from Go in ARM.

@gopherbot
Copy link
Contributor Author

Comment 3 by duzy.chan:

I once tried to build Go from source by specifying "GOARCh=arm GOHOSTARCH=arm
CC=android-gcc", which the android-gcc is just a bash script wrapper for Android NDK's
ARM gcc. In these way, all those go tools/cmds can be built successfully(with some
modification on the golang sources), and also the runtime/cgo package, except the final
stage that requiring the HOST-built go tools to rebuild all go stuffs, it failed because
I'm using an amd64 host, but now GOHOSTARCM=arm has made a arm version for those go
tools.

@rsc
Copy link
Contributor

rsc commented May 9, 2012

Comment 4:

I misunderstood what you were asking for.
Cross-compilation is not supported when using cgo.
This is true of all architectures, not just arm.

Status changed to Unfortunate.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants