-
Notifications
You must be signed in to change notification settings - Fork 15.9k
Description
third_party/googletest/googletest/include/gtest/internal/gtest-port.h:1748:: pthread_key_delete(key_)failed with error 22
my system in mysystem.txt mysystem.txt
wget --no-check-certificate https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protobuf-22.3.tar.gz
tar xvf protobuf-22.3.tar.gz
cd protobuf-22.3
installdir=/libs/$(basename $(pwd))
cmake -DCMAKE_INSTALL_PREFIX="$installdir" -DCMAKE_BUILD_TYPE=Debug -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_EXAMPLES=ON -Dprotobuf_BUILD_LIBPROTOC=ON -Dprotobuf_ALLOW_CCACHE=ON -Dprotobuf_WITH_ZLIB=ON -DUNICODE=ON -Dutf8_range_ENABLE_TESTS=ON ..
there were some trouble with linking abseil-cpp and googletest with libgmock.so and pcre2 regex functions
I solved it by adding -lpcre2-posix to files CMakeFiles/*.dir/link.txt, where were compilng problems
[ 98%] Built target bad_any_cast_impl
[ 98%] Building C object third_party/utf8_range/CMakeFiles/utf8_range.dir/naive.c.o
[100%] Building C object third_party/utf8_range/CMakeFiles/utf8_range.dir/range2-neon.c.o
[100%] Building C object third_party/utf8_range/CMakeFiles/utf8_range.dir/range2-sse.c.o
[100%] Linking C static library libutf8_range.a
[100%] Built target utf8_range
[100%] Building CXX object third_party/utf8_range/CMakeFiles/utf8_tests.dir/utf8_validity_test.cc.o
[100%] Linking CXX executable utf8_tests
[100%] Built target utf8_tests
-------------------------------------------- Ok --------------------------------------------------
alexei@Aspire:~/build/protobuf-22.3$ ctest
Test project /home/alexei/build/protobuf-22.3
Start 1: lite-test
1/3 Test #1: lite-test ........................ Passed 0.07 sec
Start 2: full-test
2/3 Test #2: full-test ........................Subprocess aborted***Exception: 589.61 sec
Start 3: utf8_validity_test
3/3 Test #3: utf8_validity_test ............... Passed 1.88 sec
67% tests passed, 1 tests failed out of 3
Total Test time (real) = 592.27 sec
The following tests FAILED:
2 - full-test (Subprocess aborted)
Errors while running CTest
Output from these tests are in: /home/alexei/build/protobuf-22.3/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
third_party/googletest/googletest/include/gtest/internal/gtest-port.h:1748:: pthread_key_delete(key_)failed with error 22
my Environment:
PATH=/usr/local/bin:/home/alexei/.local/bin:/usr/sbin:/usr/bin:/opt/GNAT/2021/bin:/opt/bazel/bin:/opt/gradle/bin:/snap/bin:/opt/jdk/bin
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/x86_64-linux-gnu:/home/alexei/.local/lib:/usr/lib/x86_64-linux-gnu:/usr/lib
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig
JAVA_HOME=/opt/jdk