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

error: ‘__PTHREAD_SPINS’ was not declared in this scope #3636

Closed
anuphalarnkar opened this issue Feb 5, 2016 · 1 comment
Closed

error: ‘__PTHREAD_SPINS’ was not declared in this scope #3636

anuphalarnkar opened this issue Feb 5, 2016 · 1 comment

Comments

@anuphalarnkar
Copy link

Hi,
I am using the following machine:
Arch: PPC64LE
OS: Ubuntu Linux 14.04
Output of uname -a:
Linux fs3 3.19.0-42-generic #48~14.04.1-Ubuntu SMP Fri Dec 18 10:24:40 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux

After applying the #3586, the tests pass successfully for 4 gpu's. But, when I did "make clean" and tried to rebuild again, I got an unexpected error as shown below:

CXX src/gtest/gtest-all.cpp
In file included from /usr/include/powerpc64le-linux-gnu/c++/4.8/bits/gthr-default.h:35:0,
from /usr/include/powerpc64le-linux-gnu/c++/4.8/bits/gthr.h:148,
from /usr/include/c++/4.8/ext/atomicity.h:35,
from /usr/include/c++/4.8/bits/ios_base.h:39,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from ./src/gtest/gtest.h:291,
from src/gtest/gtest-all.cpp:39:
./src/gtest/gtest.h:2306:46: error: ‘PTHREAD_SPINS’ was not declared in this scope
::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, 0 }
^
src/gtest/gtest-all.cpp:1666:1: note: in expansion of macro ‘GTEST_DEFINE_STATIC_MUTEX

GTEST_DEFINE_STATIC_MUTEX
(g_linked_ptr_mutex);
^

make: *** [.build_release/src/gtest/gtest-all.o] Error 1

I did a google search and found that __PTHREAD_SPINS is part of glibc and is present in pthreadtypes.h file.

Any idea folks?

Thanks in advance,
Anup Halarnkar

@anuphalarnkar
Copy link
Author

Sorry guys. It was a broken libc issue. Resolved it after reinstalling libc6 in ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant