uname -a Linux aegean 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
go version devel +d497eeb Thu Aug 27 00:28:35 2015 +0000 linux/amd64
go env GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mike/Devel/work/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT=""
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
I am running Linux Mint in two Asus laptops and I get the same result:
mike@aegean ~/Desktop $ gomobile init
gomobile: go install -p=4 -pkgdir=/home/mike/Devel/work/go/pkg/gomobile/pkg_android_arm std failed: exit status 2
# runtime/cgo
In file included from /home/mike/Devel/work/go/pkg/gomobile/android-ndk-r10e/arm/sysroot/usr/include/errno.h:31:0,
from /usr/local/go/src/runtime/cgo/cgo.go:52:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:41:20: error: missing binary operator before token "("
# if __GNUC_PREREQ (4, 6) && !defined _LIBC
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:54:44: error: missing binary operator before token "("
# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:59:44: error: missing binary operator before token "("
# if defined __cplusplus && __GNUC_PREREQ (2,8)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:136:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (4,3)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:149:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,97)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:211:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,96)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:229:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,96)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:236:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,5)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:245:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,1)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:254:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,2)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:266:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,8)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:276:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (2,97)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:285:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,3)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:293:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,4)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:307:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,2)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:315:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (4,3)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:341:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (4,3)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:350:20: error: missing binary operator before token "("
#if !__GNUC_PREREQ (2,8)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:355:20: error: missing binary operator before token "("
#if !__GNUC_PREREQ (2,92)
^
/usr/include/x86_64-linux-gnu/sys/cdefs.h:362:19: error: missing binary operator before token "("
#if __GNUC_PREREQ (3,1) && !defined __GNUG__
^
In file included from /home/mike/Devel/work/go/pkg/gomobile/android-ndk-r10e/arm/sysroot/usr/include/string.h:33:0,
from /usr/local/go/src/runtime/cgo/cgo.go:53:
/home/mike/Devel/work/go/pkg/gomobile/android-ndk-r10e/arm/sysroot/usr/include/malloc.h:30:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
extern __mallocfunc void* malloc(size_t);
^
/home/mike/Devel/work/go/pkg/gomobile/android-ndk-r10e/arm/sysroot/usr/include/malloc.h:31:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
extern __mallocfunc void* calloc(size_t, size_t);
That is the complete list of errors
Thank you for trying.
Mike
^