Closed liulinghao0421 closed 3 years ago
c++
linux
[root@localhost build]# gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
DCache不能编译通过 /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<testing::TestPartResultReporterInterface>::CreateKey()’中: gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv[_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv]+0x16):对‘pthread_key_create’未定义的引用 /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator > >::CreateKey()’中: gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv[_ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv]+0x16):对‘pthread_key_create’未定义的引用 /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<testing::TestPartResultReporterInterface>::GetOrCreateValue() const’中: gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x16):对‘pthread_getspecific’未定义的引用 gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x79):对‘pthread_setspecific’未定义的引用 collect2: 错误:ld 返回 1 make[2]: [bin/test-TimerThreadTest] 错误 1 make[1]: [test/Proxy/CMakeFiles/test-TimerThreadTest.dir/all] 错误 2 make: *** [all] 错误 2
求大佬指教是为什么?都是拉取的git最新代码
已经解决
What language are you using?
c++
What operating system (Linux, Ubuntu, …) and version?
linux
What runtime / compiler are you using (e.g. jdk version or version of gcc)
[root@localhost build]# gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
DCache不能编译通过 /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<testing::TestPartResultReporterInterface>::CreateKey()’中: gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv[_ZN7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE9CreateKeyEv]+0x16):对‘pthread_key_create’未定义的引用 /usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<std::vector<testing::internal::TraceInfo, std::allocator > >::CreateKey()’中:
gtest-all.cc:(.text._ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv[_ZN7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE9CreateKeyEv]+0x16):对‘pthread_key_create’未定义的引用
/usr/local/tars/cpp/thirdparty/lib64/libgtest.a(gtest-all.cc.o):在函数‘testing::internal::ThreadLocal<testing::TestPartResultReporterInterface >::GetOrCreateValue() const’中:
gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x16):对‘pthread_getspecific’未定义的引用
gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x79):对‘pthread_setspecific’未定义的引用
collect2: 错误:ld 返回 1
make[2]: [bin/test-TimerThreadTest] 错误 1
make[1]: [test/Proxy/CMakeFiles/test-TimerThreadTest.dir/all] 错误 2
make: *** [all] 错误 2
求大佬指教是为什么?都是拉取的git最新代码