I'm trying to build ROS since iai_kinect2 needs it. I'm following instructions given here and at catkin_build
command it's failing with the following error:
[camera_info_manager] ==> '/home/anshulvj/ros_hydro/build/camera_info_manager/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j' in '/home/anshulvj/ros_hydro/build/camera_info_manager'
[ 50%] Built target camera_info_manager
Linking CXX executable /home/anshulvj/ros_hydro/devel/lib/camera_info_manager/unit_test
/usr/local/lib/libgtest.a(gtest-all.cc.o): In function `llvm::raw_ostream::raw_ostream(bool)':
gtest-all.cc:(.text._ZN4llvm11raw_ostreamC2Eb[_ZN4llvm11raw_ostreamC5Eb]+0x14): undefined reference to `vtable for llvm::raw_ostream'
/usr/local/lib/libgtest.a(gtest-all.cc.o): In function `llvm::raw_os_ostream::raw_os_ostream(std::ostream&)':
gtest-all.cc:(.text._ZN4llvm14raw_os_ostreamC2ERSo[_ZN4llvm14raw_os_ostreamC5ERSo]+0x28): undefined reference to `vtable for llvm::raw_os_ostream'
/usr/local/lib/libgtest.a(gtest-all.cc.o): In function `llvm::convertible_fwd_ostream::~convertible_fwd_ostream()':
gtest-all.cc:(.text._ZN4llvm23convertible_fwd_ostreamD1Ev[_ZN4llvm23convertible_fwd_ostreamD1Ev]+0x44): undefined reference to `llvm::raw_os_ostream::~raw_os_ostream()'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/anshulvj/ros_hydro/devel/lib/camera_info_manager/unit_test] Error 1
make[1]: *** [CMakeFiles/unit_test.dir/all] Error 2
make: *** [all] Error 2
[camera_info_manager] <== '/home/anshulvj/ros_hydro/build/camera_info_manager/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j' failed with return code '2'
Starting ==> actionlib
Failed <== camera_info_manager [ 1.4 seconds ]
Finished <== image_view [ 1.4 seconds ]
Starting ==> nodelet_topic_tools
Finished <== polled_camera [ 2.0 seconds ]
Finished <== actionlib [ 3.1 seconds ]
Finished <== nodelet_topic_tools [ 2.9 seconds ]
[build] There were '1' errors:
Failed to build package 'camera_info_manager' because the following command:
# Command to reproduce:
cd /home/anshulvj/ros_hydro/build/camera_info_manager && /home/anshulvj/ros_hydro/build/camera_info_manager/build_env.sh /usr/bin/make --jobserver-fds=3,5 -j; cd -
# Path to log:
cat /home/anshulvj/ros_hydro/build/build_logs/camera_info_manager.log
Exited with return code: 2
[build] Runtime: 2 minutes and 21.2 seconds
I tried googling it but noone's apparently gotten this error. I also tried to see if it can be built without the erroneous package but all I found was how to install one single package, not without. Am I missing something obvious. This is the first time I'm installing ROS. Any suggestions are appreciated. Thanks
Originally posted by anshulvj86 on ROS Answers with karma: 1 on 2015-06-09
Post score: 0
Original comments
Comment by joq on 2015-06-10:
I don't recognize the way you are building it. Does it work in a separate workspace with catkin_make?
Comment by joq on 2015-06-10:
The failure is linking the unit test cases. Do you have the gtest stuff installed? Does it work with -DCATKIN_ENABLE_TESTING=0
set?
Comment by anshulvj86 on 2015-06-10:
@joq, I'm building it with "catkin build" given at http://wiki.ros.org/hydro/Installation/Trusty in section 3.1.3. I'm doing it in a separate workspace (I dint initialize it with catkin_make as is given here http://wiki.ros.org/catkin/Tutorials/create_a_workspace, since the first link dint say so)
Comment by anshulvj86 on 2015-06-10:
@joq. I tried catkin config with DCATKIN_ENABLE_TESTING=0
but it still gave the same error. I also read about gtest at http://answers.ros.org/question/54075/how-does-rostest-work-with-catkin/ and http://wiki.ros.org/gtest but it says it must be already there (rosdep). Those link don't help me much
Comment by joq on 2015-06-10:
It should not be linking unit_test
without testing enabled. There must be something seriously wrong with your workspace.
Comment by joq on 2015-06-10:
Note the the CMake variable is named CATKIN_ENABLE_TESTING
. The -D
prefix is part of the cmake
command line.
Comment by William on 2015-06-10:
If you're trying to add a CMake variable to the build (apparently the tutorial uses catkin build
) here's a quick reference on how to do that: http://catkin-tools.readthedocs.org/en/latest/cheat_sheet.html#configuring-workspaces