JohnP
JohnP

Reputation: 1

Problems with install build of google cloud storage cpp library on Linux

I am trying to build and install google-cloud-cpp on a Rehat 7 system. I am using the cmake install option using instructions found on https://github.com/googleapis/google-cloud-cpp-common/blob/master/INSTALL.md.

I have installed all of the prerequisites.

The last 2 steps, according to the instructions are:

cmake -H. -Bcmake-out cmake --build cmake-out --target install

When I run the second command command, I get link errors which appear to be from google test:

[ 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

This library has been installed.

Can anyone help me with this?

Thanks for any information,

John

Upvotes: 0

Views: 633

Answers (1)

JohnP
JohnP

Reputation: 1

There appears to be a setup mechanism in google-cloud-cpp/doc/setup-cmake-environment.md which differs from directions in INSTALL.md. The instructions in this file describe how to setup your workstation to build the Google Cloud C++ client libraries using CMake, which is what I was attempting. Using these instructions result in a good build.

Upvotes: 0

Related Questions