Page MenuHomePhabricator

[cmake] Link with pthreads
ClosedPublic

Authored by Fabien on Jun 21 2023, 15:23.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCddd3e4aa8994: [cmake] Link with pthreads
Summary

Since the removal of Boost::thread, there is no more explicit pthread linkage when jemalloc is not used, which is causing weird bugs on some Linux flavors (seen on Ubuntu 20.04, but there might be others).

Test Plan

With Ubuntu 20.04:

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Jun 21 2023, 15:23
PiRK added a subscriber: PiRK.

Tested on ubuntu 20.04 with cmake -GNinja .. -DUSE_JEMALLOC=OFF: it solves the error with ninja check-bitcoin-util

I guess these lines could now be removed from FindJemalloc.cmake?

This revision is now accepted and ready to land.Jun 21 2023, 15:29

I guess these lines could now be removed from FindJemalloc.cmake?

Not really as the scope is different. Jemalloc needs to link against all the libs including our 3rd party dependencies, while we only need to link to 'util' when it's not used.

This revision was automatically updated to reflect the committed changes.