Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

CMake Error: Project 'nav_core' tried to find library '-lpthread'

I can't to build navigation stack ( My system is: Ubuntu 16.04 4.15.0-43-generic, ROS Kinetic. What I do:

mkdir -p navigation_ws/src
cd navigation_ws/src
git clone -b kinetic-devel
cd ..

The error message is:

CMake Error at /home/username/navigation_ws/devel/share/costmap_2d/cmake/costmap_2dConfig.cmake:148 (message):
  Project 'nav_core' tried to find library '-lpthread'.  The library is
  neither a target nor built/installed properly.  Did you compile project
  'costmap_2d'? Did you find_package() it before the subdirectory containing
  its code is included?
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
  navigation/nav_core/CMakeLists.txt:4 (find_package)

Then I found that '-l-lpthread' instead of '-lpthread' presents in files: devel/lib/pkgconfig/costmap_2d.pc, build/navigation/costmap_2d/catkin_generated/, build/navigation/costmap_2d/catkin_generated/ and build/navigation/costmap_2d/catkin_generated/installspace/costmap_2d.pc

Please, help to solve this problem.