Ask Your Question
0

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

asked 2019-01-27 06:18:03 -0500

standmit gravatar image

I can't to build navigation stack ( https://github.com/ros-planning/navig... ). 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
catkin_init_workspace
git clone -b kinetic-devel https://github.com/ros-planning/navigation
cd ..
catkin_make

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/pkg.installspace.context.pc.py, build/navigation/costmap_2d/catkin_generated/pkg.develspace.context.pc.py and build/navigation/costmap_2d/catkin_generated/installspace/costmap_2d.pc

Please, help to solve this problem.

edit retag flag offensive close merge delete

Comments

1

I believe this is a duplicate of #q311753 and #q311685, although you're using Ubuntu.

gvdhoorn gravatar imagegvdhoorn ( 2019-01-27 10:33:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-04-03 00:49:15 -0500

standmit gravatar image

The problem was caused by wrong cmake version

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-01-27 06:18:03 -0500

Seen: 825 times

Last updated: Apr 03