https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104852
--- Comment #4 from Jackson Huff <lightningdzeyenr at gmail dot com> --- (In reply to Jonathan Wakely from comment #2) > For distros other than Red Hat (and Fedora, CentOS etc.) you need to use: > > -Wl,--whole-archive -lpthread -Wl,--no-whole-archive > > Otherwise the pthread symbols do not get pulled in by the linker. This would seem like a fix, but applying those flags to both the ADD_FLAGS variable and both manually specifying then in CMakeLists.txt made no difference (I tried variations for hours but no dice).