From b77e634f38debd8b42ef264a35f6639d0546bd82 Mon Sep 17 00:00:00 2001 From: Marvin Hemmer Date: Mon, 2 Nov 2026 11:24:50 +0100 Subject: [PATCH] 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. --- Framework/AODNative/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Framework/AODNative/CMakeLists.txt b/Framework/AODNative/CMakeLists.txt index b4311f11f1bfd..154826aa31690 100644 --- a/Framework/AODNative/CMakeLists.txt +++ b/Framework/AODNative/CMakeLists.txt @@ -22,7 +22,7 @@ o2_add_library(AODNative src/ReadPlan.cxx TARGETVARNAME targetName PRIVATE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/src - PUBLIC_LINK_LIBRARIES Arrow::arrow_shared + PUBLIC_LINK_LIBRARIES Arrow::arrow_shared Threads::Threads PRIVATE_LINK_LIBRARIES PkgConfig::zstd PkgConfig::lz4 PkgConfig::lzma ZLIB::ZLIB) # Reading over root:// needs the XRootD client, which does not depend on ROOT.