Libdirutils.so.0.1.0: undefined reference to `cb::to_string[abi:cxx11](cb::const_char_buffer)'


#1

I am trying to build the latest Couchbase source (master) on Ubuntu16.04 with ppc64le platform.
At the build level its failing with below error :

  [ 10%] Linking CXX executable platform-dirutils-test
../../libdirutils.so.0.1.0: undefined reference to `cb::to_string[abi:cxx11](cb::const_char_buffer)'
../../libdirutils.so.0.1.0: undefined reference to `cb::io::MemoryMappedFile::~MemoryMappedFile()'
../../libdirutils.so.0.1.0: undefined reference to `cb::io::MemoryMappedFile::MemoryMappedFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cb::io::MemoryMappedFile::Mode const&)'
collect2: error: ld returned 1 exit status
platform/tests/dirutils/CMakeFiles/platform-dirutils-test.dir/build.make:89: recipe for target 'platform/tests/dirutils/platform-dirutils-test' failed
make[2]: *** [platform/tests/dirutils/platform-dirutils-test] Error 1
CMakeFiles/Makefile2:5019: recipe for target 'platform/tests/dirutils/CMakeFiles/platform-dirutils-test.dir/all' failed
make[1]: *** [platform/tests/dirutils/CMakeFiles/platform-dirutils-test.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

Can someone please help me understand the issue and provide some pointers around it?

Thanks,
Sandip Giri


#2

I’m completely unfamiliar with the PowerPC platform, but I will mention that internally we build on Linux using gcc 7.3.0 - what compiler are you using? gcc 5.3.1 that comes with Ubuntu 16.04 will likely not work.


#3

Thanks for your reply @ceej!
I was using gcc5.4.0 compiler.
As per your suggestion, I have installed gcc7.3.0 and tried the build again. However I am still getting the same error.

Thanks,
Sandip


#4

I’m afraid that’s the only suggestion I’ve got. The “platform” package, as its name suggests, is where we keep platform-dependent logic, so it stands to reason that it would be the first to fail when trying to build on a new architecture. Since we’ve never attempted building on PowerPC, I can’t say I’m surprised to see it fail… but I can’t do much more than wish you luck.


#5

Hi @ceej,

I’m looking into the issue , if I make any progress will share the details here.

Thanks,
Sandip