Skip to content

Conversation

@xhochy
Copy link
Member

@xhochy xhochy commented Feb 18, 2019

No description provided.

@kszucs
Copy link
Member

kszucs commented Feb 18, 2019

@xhochy CI is failing.

@wesm
Copy link
Member

wesm commented Feb 19, 2019

The linker command looks fishy:

: && /home/travis/build/apache/arrow/cpp-toolchain/bin/ccache /usr/lib/ccache/g++  -ggdb -O0  -Wall -Wconversion -Wno-sign-conversion -Werror -msse4.2  -B/home/travis/build/apache/arrow/cpp-toolchain/bin -g  -rdynamic src/arrow/CMakeFiles/arrow-column-benchmark.dir/column-benchmark.cc.o  -o debug/arrow-column-benchmark  -Wl,-rpath,/home/travis/build/apache/arrow/cpp-build/debug:/home/travis/build/apache/arrow/cpp-toolchain/lib debug/libarrow_benchmark_main.a debug/libarrow_testing.so.13.0.0 debug/libarrow.so.13.0.0 -ldl /home/travis/build/apache/arrow/cpp-toolchain/lib/libdouble-conversion.a /home/travis/build/apache/arrow/cpp-toolchain/lib/libboost_system.so /home/travis/build/apache/arrow/cpp-toolchain/lib/libboost_filesystem.so /home/travis/build/apache/arrow/cpp-toolchain/lib/libboost_regex.so /home/travis/build/apache/arrow/cpp-toolchain/lib/libgtest.a /home/travis/build/apache/arrow/cpp-toolchain/lib/libgmock_main.a /home/travis/build/apache/arrow/cpp-toolchain/lib/libgmock.a -ldl /home/travis/build/apache/arrow/cpp-toolchain/lib/libbenchmark.a -lpthread jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a -pthread -lrt -Wl,-rpath-link,/home/travis/build/apache/arrow/cpp-toolchain/lib && :

the -lpthread is wrong. Our handling of pthreads is dealt with by the Threads::Threads variable which correctly adds -pthread (@fsaintjacques was just telling me about the difference between these two things). This unfortunately is coming from gbenchmark's cmake config

set_target_properties(benchmark::benchmark PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "-lpthread"
)

This is a bug in gbenchmark. We may have to patch gbenchmark in conda-forge. See

https://stackoverflow.com/a/39547577/776560

also

@wesm
Copy link
Member

wesm commented Feb 19, 2019

I just submitted a PR to gbenchmark

google/benchmark#771

@wesm
Copy link
Member

wesm commented Feb 19, 2019

Google accepted my PR. In the meantime I think we can handle this in the conda-forge build

conda-forge/benchmark-feedstock#4

Change linker statement to use Threads::Threads

Change-Id: I81df95bde48a48bed221dac814836a417c9b16ff
@wesm
Copy link
Member

wesm commented Feb 20, 2019

Hm, it looks like the gbenchmark fix was not sufficient. It seems that the conda-forge packages for gbenchmark are not usable with the Ubuntu Xenial system compilers

cc @pitrou

@pitrou
Copy link
Member

pitrou commented Feb 20, 2019

libstdc++ on 18.04 (Bionic) does have the required symbols:

$ nm --defined-only --demangle /home/antoine/miniconda3/envs/pyarrow/lib/libstdc++.so.6 | \grep std::thread::_M_start_thread
00000000000b8738 T std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>)
00000000000b869e T std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>, void (*)())
00000000000b8576 T std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)())

Perhaps it's a matter of linker option order? Does libbenchmark.a have to come before libarrow.so?

@wesm
Copy link
Member

wesm commented Feb 20, 2019

In Travis here I think the Ubuntu 16.04 toolchain is being used

@wesm
Copy link
Member

wesm commented Feb 25, 2019

What do you want to do with this patch? Seems that using the CF packages with Ubuntu Xenial's gcc 5.4 is a non-starter

@xhochy
Copy link
Member Author

xhochy commented Feb 26, 2019

I'm addressing this in #3688

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.

4 participants