ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

compiler error while processing libcostmap_2d.so

asked 2020-12-04 15:01:52 -0600

serhat gravatar image

updated 2021-04-27 08:29:12 -0600

Hello, I have been working with navigation stack for a while without any problem but now, i am facing compiler error written below

make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libproj.so', needed by '/home/serhatsony/catkin_ws/devel/lib/libcostmap_2d.so'.  Stop.
CMakeFiles/Makefile2:20521: recipe for target 'navigation/costmap_2d/CMakeFiles/costmap_2d.dir/all' failed
make[1]: *** [navigation/costmap_2d/CMakeFiles/costmap_2d.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....


make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libproj.so', needed by '/home/serhatsony/catkin_ws/devel/lib/libcostmap_2d.so'.  Stop.
CMakeFiles/Makefile2:20521: recipe for target 'navigation/costmap_2d/CMakeFiles/costmap_2d.dir/all' failed
make[1]: *** [navigation/costmap_2d/CMakeFiles/costmap_2d.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

I guess, the problem is related to 'some update situtation'. I had executed these two commands: sudo apt-get update sudo apt-get upgrade

any relationship? Or how can i solve this problem? Thank you! UBUNTU 16.04 - Kinetic (I have uploaded directly navigation stack with the branch of kinetic-devel )

edit retag flag offensive close merge delete

Comments

Hello Jarvis again, after doing "apt-get update/upgrade", i am still facing the same problem. I saw the updates on Kinetic Kame as you mentioned in your comment and even upgraded my system too. But the problem keeps resisting. What should i do? Can you explain the solution with a little bit of explanation please? Or what might be the problem? I am new in the Ros in fact.

Thank you!

serhat gravatar image serhat  ( 2020-12-08 12:39:58 -0600 )edit

@serhat please do not post answers that are not actually answers. I've moved your answer into a question comment. First, I'd figure out what versions of VTK, libproj, and pcl you have installed (dpkg -l |grep "vtk\|libproj\|pcl"). Ensure you have libproj-dev installed, ensure you're on the 6.2.0+dfsg1-10ubuntu0.1 versions of VTK (e.g. libvtk6-dev), and on the ROS PCL packages from December 3 (e.g. 1.4.4-0xenial-20201203-014302+0000 for ros-kinetic-perception-pcl). If yes to all of those, did you try cleaning your workspace before building? Can you confirm /usr/lib/x86_64-linux-gnu/libproj.so doesn't exist which is what the error in your question indicates is the problem (it should be installed by libproj-dev package)?

jarvisschultz gravatar image jarvisschultz  ( 2020-12-08 13:45:49 -0600 )edit

Hi Jarvis, I installed libproj-dev. And this solved my problem. I don't get any error while compiling anymore. Thank you for your explanations and patience. Regards.

serhat gravatar image serhat  ( 2020-12-09 03:10:14 -0600 )edit

Glad that worked! The only thing that surprises me a bit is that it wasn't already installed. The latest version of libvtk6-dev (6.2.0+dfsg1-10ubuntu0.1) has a Deb dependency on libproj-dev. Meaning, if your apt upgrade had worked according to my answer you should have had libproj-dev installed automatically. I'm guessing that even though you've fixed your issue, you might still have different package versions installed. For example, if you still had the version of libvtk6-dev from OSRF's repositories (6.2.0+dfsg1-10build1+debian11.1+osrf1) then you wouldn't get libproj-dev installed automatically.

jarvisschultz gravatar image jarvisschultz  ( 2020-12-09 09:16:09 -0600 )edit

Hi Jarvis, the problem might be my internet connection. I work in a university whose wifi is kind of under control(firewall or something like that). I see some errors occasionally while downloading somethings from internet such as "Failed to fetch". In these kind of situations, I open my internet to download properly. But I forget sometimes... and go on with broken downloaded packages or programs. This is my opinion how the some files are overlooked.

serhat gravatar image serhat  ( 2020-12-11 00:18:46 -0600 )edit

Sounds like a reasonable theory. Thanks for the update

jarvisschultz gravatar image jarvisschultz  ( 2020-12-11 11:21:01 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-12-04 16:02:17 -0600

updated 2020-12-07 15:30:38 -0600

Even though the error is slightly different, this is the same error as mentioned in this recent question. You are right, a change was pushed to Ubuntu and OSRF apt repositories that introduced this issue. Here are a few related bug reports:

Current recommended fix is to pin your apt repos to prefer the versions of VTK packages on OSRF's repositories over the ones on Ubuntu's repositories (as mentioned in this answer). To do this, create a file called /etc/apt/preferences.d/ros-pin with the following content

Package: *
Pin: origin packages.ros.org
Pin-Priority: 1000

Then apt-get update and apt-get upgrade can be used to switch you to the OSRF versions. Also note, that you may need to manually install libproj-dev. Hopefully this is a temporary issue that is fixed soon.

UPDATE

As mentioned on this ROS discourse thread, an update to the ROS Kinetic packages that depend on VTK was just released to the package repositories. Users should be able to unpin any pinned packages (e.g. delete file created above), and then run apt-get update/upgrade to install the latest packages, and this error should disappear.

edit flag offensive delete link more

Comments

Thank you very much Jarvis. I'll take a look similar bugs and try to do the steps you said. I appreciate for the feedback!

serhat gravatar image serhat  ( 2020-12-05 04:58:00 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-12-04 15:01:52 -0600

Seen: 472 times

Last updated: Apr 27 '21