Skip to content

Commit b77e634

Browse files
committed
AODNative: link Threads::Threads publicly
Decoder.cxx and test_ReadPlan.cxx use std::thread, but neither the library nor its test executable linked the threads library. With glibc < 2.34 (e.g. EL8/slc8) pthread_* live in libpthread, so linking fails with -Wl,--no-undefined: libO2AODNative.so: undefined reference to `pthread_create' o2-test-framework-aod-native: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' / DSO missing from command line Newer glibc merges libpthread into libc, which hides the problem there. Make Threads::Threads a public dependency so all consumers get it.
1 parent 86084e0 commit b77e634

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Framework/AODNative/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ o2_add_library(AODNative
2222
src/ReadPlan.cxx
2323
TARGETVARNAME targetName
2424
PRIVATE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/src
25-
PUBLIC_LINK_LIBRARIES Arrow::arrow_shared
25+
PUBLIC_LINK_LIBRARIES Arrow::arrow_shared Threads::Threads
2626
PRIVATE_LINK_LIBRARIES PkgConfig::zstd PkgConfig::lz4 PkgConfig::lzma ZLIB::ZLIB)
2727

2828
# Reading over root:// needs the XRootD client, which does not depend on ROOT.

0 commit comments

Comments
 (0)