在Linux上安装Google Cloud Storage CPP库的安装问题

时间:2020-05-29 17:38:54

标签: cmake installation google-cloud-cpp

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

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

根据指示,最后2个步骤是:

cmake -H。 -Bcmake-out cmake --build cmake-out --target安装

当我运行第二个命令命令时,出现链接错误,该错误似乎来自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

此库已安装。

有人可以帮我吗?

感谢您提供任何信息,

约翰

1 个答案:

答案 0 :(得分:0)

google-cloud-cpp / doc / setup-cmake-environment.md中似乎存在一种设置机制,该机制不同于INSTALL.md中的指示。该文件中的说明描述了如何设置工作站以使用CMake构建Google Cloud C ++客户端库,这就是我正在尝试的方法。使用这些说明可以使构建质量更好。