0

我正在尝试在 Rehat 7 系统上构建和安装 google-cloud-cpp。我正在使用https://github.com/googleapis/google-cloud-cpp-common/blob/master/INSTALL.md上的说明使用 cmake 安装选项。

我已经安装了所有的先决条件。

根据说明,最后两个步骤是:

cmake -H。-bcmake-out cmake --build cmake-out --target install

当我运行第二个命令命令时,我收到似乎来自 google 测试的链接错误:

[ 22%] Built target google_cloud_cpp_common
[ 22%] Built target google_cloud_cpp_testing_grpc
[ 22%] Built target google_cloud_cpp_grpc_utils
[ 23%] Built target google_cloud_cpp_testing
[ 23%] Linking CXX executable internal_background_threads_impl_test
bin/ld: CMakeFiles/common_grpc_utils_internal_background_threads_impl_test.dir/internal/background_threads_impl_test.cc.o: in function `testing::AssertionResult::AppendMessage(testing::Message const&)':
background_threads_impl_test.cc:(.text._ZN7testing15AssertionResult13AppendMessageERKNS_7MessageE[_ZN7testing15AssertionResult13AppendMessageERKNS_7MessageE]+0x77): undefined reference to `testing::Message::GetString[abi:cxx11]() const'
bin/ld: CMakeFiles/common_grpc_utils_internal_background_threads_impl_test.dir/internal/background_threads_impl_test.cc.o: in function `testing::AssertionResult testing::internal::CmpHelperEQFailure<std::future_status, std::future_status>(char const*, char const*, std::future_status const&, std::future_status const&)':
background_threads_impl_test.cc:(.text._ZN7testing8internal18CmpHelperEQFailureISt13future_statusS2_EENS_15AssertionResultEPKcS5_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureISt13future_statusS2_EENS_15AssertionResultEPKcS5_RKT_RKT0_]+0x6c): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
bin/ld: CMakeFiles/common_grpc_utils_internal_background_threads_impl_test.dir/internal/background_threads_impl_test.cc.o: in function `testing::AssertionResult testing::internal::CmpHelperEQFailure<std::thread::id, std::thread::id>(char const*, char const*, std::thread::id const&, std::thread::id const&)':
background_threads_impl_test.cc:(.text._ZN7testing8internal18CmpHelperEQFailureINSt6thread2idES3_EENS_15AssertionResultEPKcS6_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureINSt6thread2idES3_EENS_15AssertionResultEPKcS6_RKT_RKT0_]+0x6c): undefined reference to `testing::internal::EqFailure(char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
collect2: error: ld returned 1 exit status
gmake[2]: *** [google/cloud/CMakeFiles/common_grpc_utils_internal_background_threads_impl_test.dir/build.make:167: google/cloud/internal_background_threads_impl_test] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:2245: google/cloud/CMakeFiles/common_grpc_utils_internal_background_threads_impl_test.dir/all] Error 2
gmake: *** [Makefile:141: all] Error 2

该库已安装。

谁能帮我这个?

感谢您提供任何信息,

约翰

4

1 回答 1

0

google-cloud-cpp/doc/setup-cmake-environment.md 中似乎有一个设置机制,它与 INSTALL.md 中的说明不同。此文件中的说明描述了如何设置您的工作站以使用 CMake 构建 Google Cloud C++ 客户端库,这是我正在尝试的。使用这些说明可以获得良好的构建。

于 2020-05-31T13:47:43.080 回答