Bug#924395: ros-catkin: catkin generates incorrect double -l in pthread libs from boost

Leopold Palomo-Avellaneda leo at alaxarxa.net
Tue Mar 12 14:12:21 GMT 2019


Source: ros-catkin
Severity: important


catkin generates .pc files from its templates. However, arround the inclusion 
of cmake 3.12.x or 3.13.x, the FindBoost macro injects a -lpthread in the
BOOST_libraries. This information is bad resolved by catkin introducing a 
double -l-lpthread in the .pc files generated that use Boost.

I have only detected rosconsole.pc (librosconsole-dev. Source ros-rosconsole)
that has -l-lpthread.

The solution is simple:

--- /usr/share/catkin/cmake/catkin_package.cmake~	2018-12-02 14:35:11.000000000
+0100
+++ /usr/share/catkin/cmake/catkin_package.cmake	2019-03-12 10:30:29.742795867 +0100
@@ -270,7 +270,9 @@
   catkin_filter_libraries_for_build_configuration(libraries
${PKG_CONFIG_LIBRARIES})
   foreach(library ${libraries})
     if(NOT IS_ABSOLUTE ${library})
-      set(library "-l${library}")
+      if(NOT ${library} MATCHES "^-l")
+        set(library "-l${library}")
+      endif()
     endif()
     list_append_deduplicate(PKG_CONFIG_LIBRARIES_WITH_PREFIX ${library})
   endforeach()

I have prepared a new version of the package patched waiting to release team aprovation.

Best regards,

Leopold


-- System Information:
Debian Release: 9.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf

Kernel: Linux 4.14.0-0.bpo.3-amd64 (SMP w/8 CPU cores)
Locale: LANG=ca_ES.UTF-8, LC_CTYPE=ca_ES.UTF-8 (charmap=UTF-8), LANGUAGE=ca_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



More information about the debian-science-maintainers mailing list