You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@arrow.apache.org by "Zhang, Zhang" <zh...@intel.com> on 2020/07/13 08:00:06 UTC

Errors linking with libarrow.so

I got many "undefined reference" errors when linking with Arrow, see below. Can someone please help? More details:

- Arrow: 0.17.0 (installed via pip)
- OS: Ubuntu 18.04
- GCC 7.5.0

Thanks!
Zhang

c_api.cc:(.text._ZN5arrow4utillsERSoRKNS0_19ToStringOstreamableINS_6StatusEEE[_ZN5arrow4utillsERSoRKNS0_19ToStringOstreamableINS_6StatusEEE]+0x22): undefined reference to `arrow::Status::
ToString[abi:cxx11]() const'
src/CMakeFiles/objxgboost.dir/c_api/c_api.cc.o: In function `arrow::NumericBuilder<arrow::FloatType>::Resize(long)':
c_api.cc:(.text._ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl[_ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl]+0xf2): undefined reference to `arrow::util::detail::StringStreamWrap
per::str[abi:cxx11]()'
c_api.cc:(.text._ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl[_ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl]+0x10a): undefined reference to `arrow::Status::Status(arrow::StatusC
ode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
c_api.cc:(.text._ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl[_ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl]+0x1bd): undefined reference to `arrow::util::detail::StringStreamWra
pper::str[abi:cxx11]()'
c_api.cc:(.text._ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl[_ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl]+0x1d5): undefined reference to `arrow::Status::Status(arrow::StatusC
ode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'


Re: Errors linking with libarrow.so

Posted by "Uwe L. Korn" <uw...@xhochy.com>.
If you are building against the wheel, you need to add `-D_GLIBCXX_USE_CXX11_ABI=0` to the compiler flags of the code you are compiling. ManylinuxX packages still use the old CXX ABI.

Cheers
Uwe

On Mon, Jul 13, 2020, at 10:00 AM, Zhang, Zhang wrote:
> I got many “undefined reference” errors when linking with Arrow, see below. Can someone please help? More details:

> 

> - Arrow: 0.17.0 (installed via pip)

> - OS: Ubuntu 18.04

> - GCC 7.5.0

> 

> Thanks!

> Zhang

> 

> c_api.cc:(.text._ZN5arrow4utillsERSoRKNS0_19ToStringOstreamableINS_6StatusEEE[_ZN5arrow4utillsERSoRKNS0_19ToStringOstreamableINS_6StatusEEE]+0x22): undefined reference to `arrow::Status::

> ToString[abi:cxx11]() const'

> src/CMakeFiles/objxgboost.dir/c_api/c_api.cc.o: In function `arrow::NumericBuilder<arrow::FloatType>::Resize(long)':

> c_api.cc:(.text._ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl[_ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl]+0xf2): undefined reference to `arrow::util::detail::StringStreamWrap

> per::str[abi:cxx11]()'

> c_api.cc:(.text._ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl[_ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl]+0x10a): undefined reference to `arrow::Status::Status(arrow::StatusC

> ode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

> c_api.cc:(.text._ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl[_ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl]+0x1bd): undefined reference to `arrow::util::detail::StringStreamWra

> pper::str[abi:cxx11]()'

> c_api.cc:(.text._ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl[_ZN5arrow14NumericBuilderINS_9FloatTypeEE6ResizeEl]+0x1d5): undefined reference to `arrow::Status::Status(arrow::StatusC

> ode, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'

>