Skip to content

AODNative: link Threads::Threads publicly - #16034

Merged
ktf merged 1 commit into
AliceO2Group:devfrom
mhemmer-cern:dev
Nov 2, 2026
Merged

ktf merged 1 commit into
AliceO2Group:devfrom
mhemmer-cern:dev

Conversation

@mhemmer-cern

Copy link
Copy Markdown
Contributor

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.

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.
@mhemmer-cern
mhemmer-cern requested a review from a team as a code owner November 2, 2026 10:31

@ktf ktf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable, even if EL8 is not really supported anymore.

@mhemmer-cern

Copy link
Copy Markdown
Contributor Author

Looks reasonable, even if EL8 is not really supported anymore.

We will upgrade this year to AlmaLinux 9. 😅

@ktf
ktf merged commit cddec63 into AliceO2Group:dev Nov 2, 2026
11 of 12 checks passed
@ktf

ktf commented Nov 2, 2026

Copy link
Copy Markdown
Member

Error unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants