0

I built libarrow.so and pyarrow from source using gcc7.2 on Redhat 7.4. Still, I am stuck with the following error, which seems to be caused by using different version of gcc (4.8.5 vs. 7.2.0).

[u0017649@sys-97675 ~]$ python
Python 3.7.1 (default, Dec 14 2018, 19:46:41)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyarrow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/u0017649/anaconda3/lib/python3.7/site-packages/pyarrow/__init__.py", line 47, in <module>
    from pyarrow.lib import cpu_count, set_cpu_count
ImportError: /usr/local/lib64/libarrow.so.13: undefined symbol: _ZN5boost6system16generic_categoryEv

I checked with ldconfig, and it clearly shows that libarrow.so is linked with libstdc++.so from Redhat OS (built with gcc4.8.5), not with one from my own build with gcc7.2.0.

[u0017649@sys-97675 ~]$ sudo ldd /usr/local/lib64/libarrow.so.13
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/lib64/libarrow.so.13)
    linux-vdso64.so.1 =>  (0x00003fff92a70000)
    libbrotlienc.so.1 => not found
    libbrotlidec.so.1 => not found
    libbrotlicommon.so.1 => not found
    libdl.so.2 => /lib64/libdl.so.2 (0x00003fff924a0000)
    librt.so.1 => /lib64/librt.so.1 (0x00003fff92470000)
    liblz4.so.1 => /lib64/liblz4.so.1 (0x00003fff92430000)
    libsnappy.so.1 => /lib64/libsnappy.so.1 (0x00003fff92400000)
    libz.so.1 => /lib64/libz.so.1 (0x00003fff923c0000)
    libzstd.so.1.3.7 => not found
    libboost_system.so.1.68.0 => not found
    libboost_filesystem.so.1.68.0 => not found
    libboost_regex.so.1.68.0 => not found
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00003fff92230000)

I re-checked my LD_LIBRARY_PATH, but it looks OK.

[u0017649@sys-97675 ~]$ env | grep LD_ 
LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:/lib64:/lib:

What did I do wrong ? How do I fix this situation ? Pls help.

nasica88
  • 1,185
  • 10
  • 10

1 Answers1

0

Never mind. I was stupid enough to use 'sudo' in front of ldd for nothing, which changed the environment variable of LD_LIBRARY_PATH. Without sudo, the proper LD_LIBRARY_PATH set, I could see everything was fine.

nasica88
  • 1,185
  • 10
  • 10