Hi,
I get an error when running gobind on a simple go file after I cross compiled the Go tools for android...
Just tried with Go devel +cb37cfa Sun Mar 1 10:08:49 2015 +0000
What I do:
# update go dev & build go
cd ~/godev
git pull
cd src
export GOROOT_BOOTSTRAP=~/go1.4.2/
./make.bash
# update x/mobile
# install gobind
# run gobind (separate shell by the way)
# PS: GOPATH=/home/philippe/code/mppq:/home/philippe/code/go
.. it works fine.
Now:
# build Go cross compiler for android
# NDK is android-ndk-r10d
CC_FOR_TARGET=$NDK_ROOT/bin/arm-linux-androideabi-gcc GOOS=android GOARCH=arm GOARM=7 ./make.bash
note that I get this warning a few times?:
warning: unable to find runtime/cgo.a
# run gobind (same separate shell as last run of gobind)
and now I get this:
arm-linux-androideabi-gcc: error: unrecognized command line option '-m64'
cgo failed: [go tool cgo -objdir /tmp/net_C843240927 -- -I /tmp/net_C843240927 cgo_linux.go cgo_unix.go]: exit status 1
/home/philippe/godev/src/net/lookup_unix.go:56:20: undeclared name: cgoLookupHost
/home/philippe/godev/src/net/lookup_unix.go:64:20: undeclared name: cgoLookupIP
/home/philippe/godev/src/net/lookup_unix.go:72:19: undeclared name: cgoLookupPort
/home/philippe/godev/src/net/lookup_unix.go:80:20: undeclared name: cgoLookupCNAME
couldn't load packages due to errors: net
It looks to me like the Go toolchain is confused/mixed-up, using the arm cross-compiler stuff instead of the native linux/amd64 !???
Or is it something about with the way gobind works ?
I guess I could always use a third separate Go installation for the android cross compile,
but having 3 Go installations is not my favorite way of doing things ;-p
Any suggestions, am I doing something wrong or is there an actual problem?
Thank you