Это точная проблема (исходный код от: https://github.com/apache/parquet-cpp).
Я использую cmake:
parquet-cpp/test-build$ cmake ..
Это говорит:
-- Found the Snappy library: /home/adam/workspace/parquet-cpp/thirdparty/installed/lib/libsnappy.so
-- Found the ZLIB library: /home/adam/workspace/parquet-cpp/thirdparty/installed/lib/libz.so
-- Found the GTest library: /home/adam/workspace/parquet-cpp/thirdparty/googletest-release-1.7.0/libgtest.a
и затем сделайте VERBOSE = 1: (он добавляет -ldl ../../../thirdparty/googletest-release-1.7.0/libgtest.a к c ++)
adam@gaia:~/workspace/parquet-cpp/test-build$ make VERBOSE=1
/usr/bin/cmake -H/home/adam/workspace/parquet-cpp -B/home/adam/workspace/parquet-cpp/test-build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/adam/workspace/parquet-cpp/test-build/CMakeFiles /home/adam/workspace/parquet-cpp/test-build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
make -f src/parquet/thrift/CMakeFiles/parquet_thrift.dir/build.make src/parquet/thrift/CMakeFiles/parquet_thrift.dir/depend
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
cd /home/adam/workspace/parquet-cpp/test-build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/adam/workspace/parquet-cpp /home/adam/workspace/parquet-cpp/src/parquet/thrift /home/adam/workspace/parquet-cpp/test-build /home/adam/workspace/parquet-cpp/test-build/src/parquet/thrift /home/adam/workspace/parquet-cpp/test-build/src/parquet/thrift/CMakeFiles/parquet_thrift.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
make -f src/parquet/thrift/CMakeFiles/parquet_thrift.dir/build.make src/parquet/thrift/CMakeFiles/parquet_thrift.dir/build
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
make[2]: Nothing to be done for `src/parquet/thrift/CMakeFiles/parquet_thrift.dir/build'.
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
/usr/bin/cmake -E cmake_progress_report /home/adam/workspace/parquet-cpp/test-build/CMakeFiles 40 41 42
[ 5%] Built target parquet_thrift
make -f CMakeFiles/parquet_objlib.dir/build.make CMakeFiles/parquet_objlib.dir/depend
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
cd /home/adam/workspace/parquet-cpp/test-build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/adam/workspace/parquet-cpp /home/adam/workspace/parquet-cpp /home/adam/workspace/parquet-cpp/test-build /home/adam/workspace/parquet-cpp/test-build /home/adam/workspace/parquet-cpp/test-build/CMakeFiles/parquet_objlib.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
make -f CMakeFiles/parquet_objlib.dir/build.make CMakeFiles/parquet_objlib.dir/build
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
make[2]: Nothing to be done for `CMakeFiles/parquet_objlib.dir/build'.
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
/usr/bin/cmake -E cmake_progress_report /home/adam/workspace/parquet-cpp/test-build/CMakeFiles 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
[ 50%] Built target parquet_objlib
make -f CMakeFiles/parquet_shared.dir/build.make CMakeFiles/parquet_shared.dir/depend
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
cd /home/adam/workspace/parquet-cpp/test-build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/adam/workspace/parquet-cpp /home/adam/workspace/parquet-cpp /home/adam/workspace/parquet-cpp/test-build /home/adam/workspace/parquet-cpp/test-build /home/adam/workspace/parquet-cpp/test-build/CMakeFiles/parquet_shared.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
make -f CMakeFiles/parquet_shared.dir/build.make CMakeFiles/parquet_shared.dir/build
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
make[2]: Nothing to be done for `CMakeFiles/parquet_shared.dir/build'.
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
/usr/bin/cmake -E cmake_progress_report /home/adam/workspace/parquet-cpp/test-build/CMakeFiles
[ 50%] Built target parquet_shared
make -f CMakeFiles/parquet_static.dir/build.make CMakeFiles/parquet_static.dir/depend
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
cd /home/adam/workspace/parquet-cpp/test-build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/adam/workspace/parquet-cpp /home/adam/workspace/parquet-cpp /home/adam/workspace/parquet-cpp/test-build /home/adam/workspace/parquet-cpp/test-build /home/adam/workspace/parquet-cpp/test-build/CMakeFiles/parquet_static.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
make -f CMakeFiles/parquet_static.dir/build.make CMakeFiles/parquet_static.dir/build
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
make[2]: Nothing to be done for `CMakeFiles/parquet_static.dir/build'.
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
/usr/bin/cmake -E cmake_progress_report /home/adam/workspace/parquet-cpp/test-build/CMakeFiles
[ 50%] Built target parquet_static
make -f src/parquet/util/CMakeFiles/parquet_test_main.dir/build.make src/parquet/util/CMakeFiles/parquet_test_main.dir/depend
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
cd /home/adam/workspace/parquet-cpp/test-build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/adam/workspace/parquet-cpp /home/adam/workspace/parquet-cpp/src/parquet/util /home/adam/workspace/parquet-cpp/test-build /home/adam/workspace/parquet-cpp/test-build/src/parquet/util /home/adam/workspace/parquet-cpp/test-build/src/parquet/util/CMakeFiles/parquet_test_main.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
make -f src/parquet/util/CMakeFiles/parquet_test_main.dir/build.make src/parquet/util/CMakeFiles/parquet_test_main.dir/build
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
make[2]: Nothing to be done for `src/parquet/util/CMakeFiles/parquet_test_main.dir/build'.
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
/usr/bin/cmake -E cmake_progress_report /home/adam/workspace/parquet-cpp/test-build/CMakeFiles 39
[ 51%] Built target parquet_test_main
make -f src/parquet/CMakeFiles/public-api-test.dir/build.make src/parquet/CMakeFiles/public-api-test.dir/depend
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
cd /home/adam/workspace/parquet-cpp/test-build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/adam/workspace/parquet-cpp /home/adam/workspace/parquet-cpp/src/parquet /home/adam/workspace/parquet-cpp/test-build /home/adam/workspace/parquet-cpp/test-build/src/parquet /home/adam/workspace/parquet-cpp/test-build/src/parquet/CMakeFiles/public-api-test.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
make -f src/parquet/CMakeFiles/public-api-test.dir/build.make src/parquet/CMakeFiles/public-api-test.dir/build
make[2]: Entering directory `/home/adam/workspace/parquet-cpp/test-build'
Linking CXX executable ../../debug/public-api-test
cd /home/adam/workspace/parquet-cpp/test-build/src/parquet && /usr/bin/cmake -E cmake_link_script CMakeFiles/public-api-test.dir/link.txt --verbose=1
/usr/bin/c++ -ggdb -O0 -std=c++11 -Wall -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -g CMakeFiles/public-api-test.dir/public-api-test.cc.o -o ../../debug/public-api-test -rdynamic ../../debug/libparquet_test_main.a ../../debug/libparquet.so -ldl ../../../thirdparty/googletest-release-1.7.0/libgtest.a -lpthread -Wl,-rpath,/home/adam/workspace/parquet-cpp/test-build/debug
CMakeFiles/public-api-test.dir/public-api-test.cc.o: In function `__static_initialization_and_destruction_0':
/home/adam/workspace/parquet-cpp/src/parquet/public-api-test.cc:25: undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/home/adam/workspace/parquet-cpp/src/parquet/public-api-test.cc:31: undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
/home/adam/workspace/parquet-cpp/src/parquet/public-api-test.cc:41: undefined reference to `testing::internal::MakeAndRegisterTestInfo(char const*, char const*, char const*, char const*, testing::internal::CodeLocation, void const*, void (*)(), void (*)(), testing::internal::TestFactoryBase*)'
collect2: error: ld returned 1 exit status
make[2]: *** [debug/public-api-test] Error 1
make[2]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
make[1]: *** [src/parquet/CMakeFiles/public-api-test.dir/all] Error 2
make[1]: Leaving directory `/home/adam/workspace/parquet-cpp/test-build'
make: *** [all] Error 2
Задача ещё не решена.
Других решений пока нет …