catkin build fails but catkin_make works | ld: cannot find -lvesc_driver_nodelet [closed]

asked 2021-05-02 13:21:14 -0500

Combinacijus gravatar image

updated 2021-05-03 01:56:14 -0500

gvdhoorn gravatar image

Issue on Github

I'm trying to migrate morph package from catkin_make to catkin build but can't find the problem (I'm new to catkin and cmake). catkin_make_isolated doesn't work too so some dependency should be missing. I already referred to catkin build migration guide and tried to modify CMakeLists in morph_hw (this one fails to build) and vesc_driver packages (this one should build vesc_driver_nodelet which is not found by linker).

To reproduce the error:

mkdir morph_ws
cd morph_ws/
git clone --recurse-submodules https://github.com/roaldlemmens/morph.git src
catkin build

catkin build output:

Starting  >>> vesc                                                                                                                                                                           
Finished  <<< vesc                                        [ 0.4 seconds ]                                                                                                                    
__________________________________________________________________________
Errors     << morph_hw:make /home/xavier/ros_ws/myrobot_ws/logs/morph_hw/build.make.011.log                                                                                                  
/usr/bin/ld: cannot find -lvesc_driver_nodelet
collect2: error: ld returned 1 exit status
make[2]: *** [/home/xavier/ros_ws/myrobot_ws/devel/.private/morph_hw/lib/morph_hw/robot] Error 1
make[1]: *** [CMakeFiles/robot.dir/all] Error 2
make: *** [all] Error 2
cd /home/xavier/ros_ws/myrobot_ws/build/morph_hw; catkin build --get-env morph_hw | catkin env -si  /usr/bin/make --jobserver-fds=3,4 -j; cd -

..........................................................................
Failed     << morph_hw:make                               [ Exited with code 2 ]                                                                                                             
Failed    <<< morph_hw                                    [ 3.0 seconds ]

catkin build --verbose output:

/usr/bin/cmake -E cmake_link_script CMakeFiles/robot.dir/link.txt --verbose=1
/usr/bin/c++    -rdynamic CMakeFiles/robot.dir/src/robot.cpp.o CMakeFiles/robot.dir/src/morph_hw.cpp.o CMakeFiles/robot.dir/src/wheel_driver.cpp.o  -o /home/xavier/ros_ws/myrobot_ws/devel/.private/morph_hw/lib/morph_hw/robot -Wl,-rpath,/opt/ros/melodic/lib:/home/xavier/ros_ws/myrobot_ws/devel/.private/serial/lib /opt/ros/melodic/lib/libnodeletlib.so /opt/ros/melodic/lib/libbondcpp.so -luuid /home/xavier/ros_ws/myrobot_ws/devel/.private/serial/lib/libserial.so /opt/ros/melodic/lib/libcontroller_manager.so /opt/ros/melodic/lib/libclass_loader.so -lPocoFoundation -ldl /opt/ros/melodic/lib/libroslib.so /opt/ros/melodic/lib/librospack.so -lpython2.7 -lboost_program_options -ltinyxml2 /opt/ros/melodic/lib/libroscpp.so -lboost_filesystem /opt/ros/melodic/lib/librosconsole.so /opt/ros/melodic/lib/librosconsole_log4cxx.so /opt/ros/melodic/lib/librosconsole_backend_interface.so -llog4cxx -lboost_regex /opt/ros/melodic/lib/libroscpp_serialization.so /opt/ros/melodic/lib/libxmlrpcpp.so /opt/ros/melodic/lib/librostime.so /opt/ros/melodic/lib/libcpp_common.so -lboost_system -lboost_thread -lboost_chrono -lboost_date_time -lboost_atomic -lpthread /usr/lib/aarch64-linux-gnu/libconsole_bridge.so.0.4 -lvesc_driver_nodelet 
/usr/bin/ld: cannot find -lvesc_driver_nodelet
collect2: error: ld returned 1 exit status
CMakeFiles/robot.dir/build.make:177: recipe for target '/home/xavier/ros_ws/myrobot_ws/devel/.private/morph_hw/lib/morph_hw/robot' failed
make[2]: Leaving directory '/home/xavier/ros_ws/myrobot_ws/build/morph_hw'
CMakeFiles/Makefile2:1029: recipe for target 'CMakeFiles/robot.dir/all' failed
make[2]: *** [/home/xavier/ros_ws/myrobot_ws/devel/.private/morph_hw/lib/morph_hw/robot] Error 1
make[1]: *** [CMakeFiles/robot.dir/all] Error 2
make[1]: Leaving directory '/home/xavier/ros_ws/myrobot_ws/build/morph_hw'
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
cd /home/xavier/ros_ws/myrobot_ws/build/morph_hw; catkin build --get-env morph_hw | catkin env -si  /usr/bin/make --jobserver-fds=3,4 -j; cd -

..........................................................................
Failed     << ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by gvdhoorn
close date 2021-05-03 01:56:34.639976

Comments

1

Please don't cross-post.

You already posted roaldlemmens/morph#6, so no need to post the same issue here on ROS Answers just yet.

Let's give roaldlemmens some time to respond.

gvdhoorn gravatar image gvdhoorn  ( 2021-05-03 01:57:44 -0500 )edit