control: reopen -1 control: reassign -1 src:cmake control: affects -1 ros-ros-comm control: tags -1 - patch
Hi, after reading up on this, I think this needs fixing in cmake. man gcc: | -pthread| | Define additional macros required for using the POSIX threads
| library. You should use this option consistently for both | compilation and linking. This option is supported on GNU/Linux | targets, most other Unix derivatives, and also on x86 Cygwin and | MinGW targets. So neither adding -lpthread, as done by https://gitlab.kitware.com/cmake/cmake/commit/bd831ed0948a1e99f573f0056f2bee5d3b21009e nor adding /usr/lib/x86_64-linux-gnu/libpthread.so as done by https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=563479 seems correct to me. Note that https://cmake.org/cmake/help/v3.1/module/FindThreads.htmlpromotes CMAKE_THREAD_PREFER_PTHREAD to get -pthread, but it would still need to go into CXXFLAGS (through a to be defined BOOST_FLAGS, maybe), to my understanding. Also having CMAKE_THREAD_PREFER_PTHREAD as default for gcc and clang may make sense?
I will revert the workaround in ros-catkin if you agree. Cheers Jochen
signature.asc
Description: PGP signature