Hi,
On 01.12.18 06:31, Gianfranco Costamagna wrote:
Package: cmake
Version: 3.13.1-1
Severity: serious
Affects: ros-ros-comm
A simple ros-ros-comm rebuild now fails with the new cmake in unstable,
due to lpthread not being found as target.
I don't know if catkin is to blame, or something else, but clearly the
old cmake in testing is not having issues.
I'm opening this bug to prevent testing migration, until the problem is
sorted out (in one way or the other)
snip of the failure:
-- Using CATKIN_TEST_RESULTS_DIR:
/<<BUILDDIR>>/ros-ros-comm-1.14.3+ds1/obj-x86_64-linux-gnu/test_results
-- Found gtest: gtests will be built
-- nosetests not found, Python tests can not be run (try installing package
'python-nose')
-- catkin 0.7.14
-- Boost version: 1.67.0
-- Found the following Boost libraries:
-- system
-- thread
-- chrono
-- date_time
-- atomic
CMake Error at
obj-x86_64-linux-gnu/devel/share/rostest/cmake/rostestConfig.cmake:146
(message):
Project 'rostest' tried to find library '-lpthread'. The library is
neither a target nor built/installed properly. Did you compile project
'rostest'? Did you find_package() it before the subdirectory containing its
code is included?
Call Stack (most recent call first):
/usr/share/catkin/cmake/catkinConfig.cmake:87 (find_package)
tools/rostest/CMakeLists.txt:23 (find_package)
-- Configuring incomplete, errors occurred!
See also
"/<<BUILDDIR>>/ros-ros-comm-1.14.3+ds1/obj-x86_64-linux-gnu/CMakeFiles/CMakeOutput.log".
See also
"/<<BUILDDIR>>/ros-ros-comm-1.14.3+ds1/obj-x86_64-linux-gnu/CMakeFiles/CMakeError.log".
cd obj-x86_64-linux-gnu && tail -v -n \+0 CMakeCache.txt
==> CMakeCache.txt <==
This problem occurs since my commit adds ${CMAKE_THREAD_LIBS_INIT}
("-lpthread") to
Boost_LIBRARIES when needed:
https://gitlab.kitware.com/cmake/cmake/commit/bd831ed0948a1e99f573f0056f2bee5d3b21009e
ros-catkin iterates over dependency libraries (Boost_LIBRARIES among other
things) and does this:
https://sources.debian.org/src/ros-catkin/0.7.14-7/cmake/templates/pkgConfig.cmake.in/#L118
Until my commit Boost_LIBRARIES only contained absolute paths to boost
libraries so that code
just passes them on. For the "-lpthread" case it calls find_library(...
"-lpthread") which fails.
Adding something like this would probably fix it:
> elseif(${library} MATCHES "^-l")
> list(APPEND @PROJECT_NAME@_LIBRARIES ${library})
CCing Brad, maybe you could comment if ros-catkin should expect -l... entries
there or FindBoost
needs to be changed?
Cheers,
Felix