Skip to content

Conversation

@wesm
Copy link
Member

@wesm wesm commented Feb 7, 2019

pthread and librt are already part of the public link interface to arrow_static -- tagging on these additional link options can cause the libraries to get passed multiple times to the linker, or in the wrong order, causing link failures in certain environments

FAILED: debug/plasma_store_server 
: && /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 -fPIC -g -Wl,-O2 -Wl,--sort-common
-Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags
-rdynamic
src/plasma/CMakeFiles/plasma_store_server.dir/external_store.cc.o
src/plasma/CMakeFiles/plasma_store_server.dir/hash_table_store.cc.o
src/plasma/CMakeFiles/plasma_store_server.dir/store.cc.o -o
debug/plasma_store_server
-Wl,-rpath,/home/wesm/cpp-toolchain/lib: -lrt debug/libplasma.a
debug/libarrow.a -lrt
/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_system.so
/home/wesm/cpp-toolchain/lib/libboost_filesystem.so
/home/wesm/cpp-toolchain/lib/libboost_regex.so
jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a
/home/wesm/cpp-toolchain/lib64/libflatbuffers.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

@wesm
Copy link
Member Author

wesm commented Feb 8, 2019

+1. If this causes a problem somewhere downstream I'll help resolve it when it comes up

@wesm wesm closed this in 4131484 Feb 8, 2019
xhochy pushed a commit that referenced this pull request Feb 8, 2019
… in some Linux environments

pthread and librt are already part of the public link interface to `arrow_static` -- tagging on these additional link options can cause the libraries to get passed multiple times to the linker, or in the wrong order, causing link failures in certain environments

```
FAILED: debug/plasma_store_server
: && /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 -fPIC -g -Wl,-O2 -Wl,--sort-common
-Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags
-rdynamic
src/plasma/CMakeFiles/plasma_store_server.dir/external_store.cc.o
src/plasma/CMakeFiles/plasma_store_server.dir/hash_table_store.cc.o
src/plasma/CMakeFiles/plasma_store_server.dir/store.cc.o -o
debug/plasma_store_server
-Wl,-rpath,/home/wesm/cpp-toolchain/lib: -lrt debug/libplasma.a
debug/libarrow.a -lrt
/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_system.so
/home/wesm/cpp-toolchain/lib/libboost_filesystem.so
/home/wesm/cpp-toolchain/lib/libboost_regex.so
jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a
/home/wesm/cpp-toolchain/lib64/libflatbuffers.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

```

Author: Wes McKinney <wesm+git@apache.org>

Closes #3583 from wesm/ARROW-4500 and squashes the following commits:

db53dc9 <Wes McKinney> Support ARROW_BUILD_STATIC=OFF
4a189ea <Wes McKinney> Simplify plasma library link libraries
b1d2a27 <Wes McKinney> Remove pthread / librt hacks causing linking issues on Ubuntu 18.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant