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

runtime/cgo: PTHREAD_KEYS_MAX defined in both Go and NDKv10 #9374

Closed
jhleath opened this issue Dec 18, 2014 · 0 comments
Closed

runtime/cgo: PTHREAD_KEYS_MAX defined in both Go and NDKv10 #9374

jhleath opened this issue Dec 18, 2014 · 0 comments
Milestone

Comments

@jhleath
Copy link

jhleath commented Dec 18, 2014

What version of Go are you using (go version)?

devel inside the mobile docker container.

What operating system and processor architecture are you using?

Darwin, x86_64 compiling for Android / Arm inside Docker Container.

What did you do?

Ran the command docker run -v $GOPATH/src:/src mobile-21 /bin/bash -c 'cd /src/getmelange.com/mobile && ./make.bash'

What did you expect to see?

A successful compilation of my project.

What did you see instead?

# runtime/cgo
/go/src/runtime/cgo/gcc_android_arm.c:16:0: error: "PTHREAD_KEYS_MAX" redefined [-Werror]
 #define PTHREAD_KEYS_MAX 128
 ^
In file included from /usr/local/android-ndk-r10d/sysroot/usr/include/limits.h:86:0,
                 from /usr/local/android-ndk-r10d/lib/gcc/arm-linux-androideabi/4.8/include-fixed/limits.h:168,
                 from /usr/local/android-ndk-r10d/lib/gcc/arm-linux-androideabi/4.8/include-fixed/syslimits.h:7,
                 from /usr/local/android-ndk-r10d/lib/gcc/arm-linux-androideabi/4.8/include-fixed/limits.h:34,
                 from /usr/local/android-ndk-r10d/sysroot/usr/include/signal.h:34,
                 from /usr/local/android-ndk-r10d/sysroot/usr/include/pthread.h:33,
                 from /go/src/runtime/cgo/gcc_android_arm.c:5:
/usr/local/android-ndk-r10d/sysroot/usr/include/sys/limits.h:166:0: note: this is the location of the previous definition
 #define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX
 ^
cc1: all warnings being treated as errors

Looks to be some sort of redefined constant. Note that I am attempting to change the Docker container to the latest version of the NDK (v10d).

@jhleath jhleath changed the title PTHREAD_KEYS_MAX defined in both Go and NDKv10 mobile: PTHREAD_KEYS_MAX defined in both Go and NDKv10 Dec 18, 2014
@minux minux closed this as completed in 340ef00 Dec 18, 2014
minux referenced this issue in Go-zh/go.old Dec 19, 2014
Fixes #9374.

Change-Id: Ic53757eba98fc43bcd24e25e03876fef917b4da1
Reviewed-on: https://go-review.googlesource.com/1751
Reviewed-by: David Crawshaw <crawshaw@golang.org>
@mikioh mikioh changed the title mobile: PTHREAD_KEYS_MAX defined in both Go and NDKv10 runtime/cgo: PTHREAD_KEYS_MAX defined in both Go and NDKv10 Aug 5, 2015
@mikioh mikioh added this to the Go1.5 milestone Aug 5, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 2016
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

5 participants