Bug#915148: [Pkg-cmake-team] Bug#915148: cmake: regression in ros-ros-comm build

Jochen Sprickerhof jspricke at debian.org
Thu Dec 6 21:16:48 GMT 2018


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.html

promotes 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20181206/61b7a471/attachment.sig>


More information about the debian-science-maintainers mailing list