Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-4500

[C++] librt and pthread hacks can cause linking problems

    XMLWordPrintableJSON

Details

    Description

      There are a few places (e.g. plasma_store_server and arrow-stream-to-file) where the work I did in https://github.com/apache/arrow/commit/b4278641a6a56c56d2007469b0eb840d52cc007d#diff-6725b893dfc969abac4f4ee39a3a317f is conflicting.

      I got these linking failures on Ubuntu 18.10 using the conda-forge gcc 7.3.0 toolchain

      FAILED: debug/arrow-stream-to-file 
      : && /usr/bin/ccache /home/wesm/miniconda/envs/arrow-3.7/bin/x86_64-conda_cos6-linux-gnu-c++  -Wno-noexcept-type -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -ggdb -O0  -Wall -Wconversion -Wno-sign-conversion -Werror -msse4.2 -fno-omit-frame-pointer -g  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags   -rdynamic src/arrow/ipc/CMakeFiles/arrow-stream-to-file.dir/stream-to-file.cc.o  -o debug/arrow-stream-to-file  -Wl,-rpath,/home/wesm/cpp-toolchain/lib debug/libarrow.a /home/wesm/cpp-toolchain/lib/libboost_filesystem.so /home/wesm/cpp-toolchain/lib/libboost_system.so -lpthread -ldl /home/wesm/cpp-toolchain/lib/libdouble-conversion.a /home/wesm/cpp-toolchain/lib/libbrotlidec-static.a /home/wesm/cpp-toolchain/lib/libbrotlienc-static.a /home/wesm/cpp-toolchain/lib/libbrotlicommon-static.a /home/wesm/cpp-toolchain/lib/libbz2.a /home/wesm/cpp-toolchain/lib/liblz4.a /home/wesm/cpp-toolchain/lib/libsnappy.a /home/wesm/cpp-toolchain/lib/libz.so /home/wesm/cpp-toolchain/lib/libzstd.a /home/wesm/cpp-toolchain/lib/libglog.a /home/wesm/cpp-toolchain/lib/libgflags.a /home/wesm/cpp-toolchain/lib/libboost_regex.so -lrt jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a -pthread && :
      /home/wesm/miniconda/envs/arrow-3.7/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a(nstime.pic.o): undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5'
      /home/wesm/miniconda/envs/arrow-3.7/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /home/wesm/miniconda/envs/arrow-3.7/bin/../x86_64-conda_cos6-linux-gnu/sysroot/usr/lib/../lib/librt.so: error adding symbols: DSO missing from command line
      collect2: error: ld returned 1 exit status
      

      Working on a patch

      Attachments

        Issue Links

          Activity

            People

              wesm Wes McKinney
              wesm Wes McKinney
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h