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

Undefined reference when compiling camera_info_manager

asked 2014-03-12 10:28:50 -0500

evk02 gravatar image

updated 2014-03-12 11:02:59 -0500

I'm compiling camera_info_manager on Ubuntu 13.10 (armhf) and receiving undefined reference to camera_calibration_parsers::readCalibration.

See details below:

$ catkin_make_isolated --pkg camera_info_manager --install
....
==> Processing catkin package: 'camera_info_manager'
==> Building with env: '/home/ilagi/ros_catkin_ws/install_isolated/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/home/ilagi/ros_catkin_ws/build_isolated/camera_info_manager'
==> make -j4 -l4 in '/home/ilagi/ros_catkin_ws/build_isolated/camera_info_manager'
[ 33%] Built target gtest
[ 66%] Built target camera_info_manager
Linking CXX executable /home/ilagi/ros_catkin_ws/devel_isolated/camera_info_manager/lib/camera_info_manager/unit_test
/home/ilagi/ros_catkin_ws/devel_isolated/camera_info_manager/lib/libcamera_info_manager.so: undefined reference to `camera_calibration_parsers::readCalibration(std::string const&, std::string&, sensor_msgs::CameraInfo_<std::allocator<void> >&)'
/home/ilagi/ros_catkin_ws/devel_isolated/camera_info_manager/lib/libcamera_info_manager.so: undefined reference to `camera_calibration_parsers::writeCalibration(std::string const&, std::string const&, sensor_msgs::CameraInfo_<std::allocator<void> > const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/ilagi/ros_catkin_ws/devel_isolated/camera_info_manager/lib/camera_info_manager/unit_test] Error 1
make[1]: *** [CMakeFiles/unit_test.dir/all] Error 2
make: *** [all] Error 2
<== Failed to process package 'camera_info_manager': 
  Command '/home/ilagi/ros_catkin_ws/install_isolated/env.sh make -j4 -l4' returned non-zero exit status 2

What is funny that I remember that I had the same issue when I was compiling for Raspberry Pi and resolved it somehow, but it seems I can't remember how.

Any idea is appreciated.

Edit: camera_calibration_parses package is installed, that was the first thing I checked Edit2: just realized that last time I raised a ticket in github against camera_info_manager, but then the issue got resolved on its own, so I just reopen the ticket. See make verbose output on the link: https://github.com/ros-perception/ima...

edit retag flag offensive close merge delete

Comments

2

It looks like camera_info_manager tries to link against camera_calibration parsers: https://github.com/ros-perception/image_common/blob/hydro-devel/camera_info_manager/CMakeLists.txt#L23 Can you add a "message()" to the cmake lists to check the value of ${camera_calibration_parsers_LIBRARIES}?

jbinney gravatar image jbinney  ( 2014-03-12 11:19:50 -0500 )edit

Thanks, that helped - see my own answer below.

evk02 gravatar image evk02  ( 2014-03-12 11:37:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-03-12 11:34:59 -0500

evk02 gravatar image

Just managed to solve the issue after @jbinney asking me to add message() to the cmakelists file. As soon as I have added that the compile did run through fine. It looks the issue was that the first time when I tried to compile camera_info_manager then some of the prerequisites were missing, so I went and installed them including camera_calibration_parsers and came back to re-try

catkin_make_isolated --pkg camera_info_manager --install

but the error was still there like camera_calibration_parsers wouldn't be installed. As soon as I modified the cmakelists file the compile did find it. So the issue simply was that the dependencies are not listing camera_calibration_parsers, so when it gets added you need to trigger the recreation of the make file. Blah.

edit flag offensive delete link more

Comments

What message()means? How am I supposed to add it on the CMakeLists?

Andreluizfc gravatar image Andreluizfc  ( 2018-01-04 12:01:00 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-03-12 10:28:50 -0500

Seen: 1,191 times

Last updated: Mar 12 '14