You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:
Run "go version" and compare against
http://golang.org/doc/devel/release.html If a newer version of Go exists,
install it and retry what you did to reproduce the problem.
Thanks.
What does 'go version' print?
go1.4rc1 darwin/amd64
What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. install go from source code to build cross-compiler for android by
cd $GOROOT/src && \
./all.bash && \
CC_FOR_TARGET=$NDK_ROOT/bin/arm-linux-androideabi-gcc GOOS=android GOARCH=arm GOARM=7 ./make.bash
2. after install go from source code, there is no issue to build
golang.org/x/mobile/example/basic for target android by ./make.bash in that folder. The
android program can be successfully built.
3. But it have issue to build host darwin/amd64 cgo enabled code by
go build local_cgo_enabled_folder or
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build local_cgo_enabled_folder
What happened?
cc1: error: unrecognized command line option '-m64'
What should have happened instead?
build successfully.
Please provide any additional information below.
The text was updated successfully, but these errors were encountered:
Unfortunately this is a known issue. Once you've built the Go tools as a
cross-compiler, the compiler is baked in. To build for both Android and Darwin you'll
need to build different instances of the tools.
mikioh
changed the title
go1.4rc1 cgo issue for cross-compiler when host: darwin/amd64, target: android/arm
cmd/go: go1.4rc1 cgo issue for cross-compiler when host: darwin/amd64, target: android/arm
Aug 5, 2015
The text was updated successfully, but these errors were encountered: