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

error while compiling camera1394

asked 2013-03-10 14:44:25 -0600

AdrianPeng gravatar image

updated 2013-03-11 16:17:11 -0600

Hi there,

I am trying to compile camera1394 (master branch)from source. However, I got many error like these:

dev_camera1394.cpp:(.text+0xe28): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::console::levels::Level)'
dev_camera1394.cpp:(.text+0xe62): undefined reference to `ros::console::setLogLocationLevel(ros::console::LogLocation*, ros::console::levels::Level)'
dev_camera1394.cpp:(.text+0xe6e): undefined reference to `ros::console::checkLogLocationEnabled(ros::console::LogLocation*)'

I am using Gumstix Overo and its OS is Linaro.

Then I try to build camera1394 (groovy branch) with rosmake, but I got following error:

[ rosmake ] Last 40 linesmera1394: 721.5 sec ]         [ 1 Active 8/9 Complete ]
{-------------------------------------------------------------------------------
  Scanning dependencies of target rospack_gencfg_real
  make[3]: Leaving directory `/root/rosbuild_ws/camera1394/build'
  [  7%] Built target rospack_gencfg_real
  make[3]: Entering directory `/root/rosbuild_ws/camera1394/build'
  Scanning dependencies of target rospack_genmsg_libexe
  make[3]: Leaving directory `/root/rosbuild_ws/camera1394/build'
  [  7%] Built target rospack_genmsg_libexe
  make[3]: Entering directory `/root/rosbuild_ws/camera1394/build'
  Scanning dependencies of target rosbuild_precompile
  make[3]: Leaving directory `/root/rosbuild_ws/camera1394/build'
  [  7%] Built target rosbuild_precompile
  make[3]: Entering directory `/root/rosbuild_ws/camera1394/build'
  Scanning dependencies of target camera1394_node
  make[3]: Leaving directory `/root/rosbuild_ws/camera1394/build'
  make[3]: Entering directory `/root/rosbuild_ws/camera1394/build'
  [ 15%] Building CXX object src/nodes/CMakeFiles/camera1394_node.dir/camera1394_node.cpp.o
  In file included from /root/rosbuild_ws/camera1394/src/nodes/driver1394.h:44:0,
               from /root/rosbuild_ws/camera1394/src/nodes/camera1394_node.cpp:38:
  /root/catkin_ws/install/include/driver_base/driver.h: In static member function ‘static const string& driver_base::Driver::getStateName(driver_base::Driver::state_t)’:
  /root/catkin_ws/install/include/driver_base/driver.h:238:14: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  [ 23%] Building CXX object src/nodes/CMakeFiles/camera1394_node.dir/modes.cpp.o
  [ 30%] Building CXX object src/nodes/CMakeFiles/camera1394_node.dir/format7.cpp.o
  [ 38%] Building CXX object src/nodes/CMakeFiles/camera1394_node.dir/features.cpp.o
  [ 46%] Building CXX object src/nodes/CMakeFiles/camera1394_node.dir/dev_camera1394.cpp.o
  [ 53%] Building CXX object src/nodes/CMakeFiles/camera1394_node.dir/driver1394.cpp.o
  In file included from /root/rosbuild_ws/camera1394/src/nodes/driver1394.h:44:0,
               from /root/rosbuild_ws/camera1394/src/nodes/driver1394.cpp:42:
  /root/catkin_ws/install/include/driver_base/driver.h: In static member function ‘static const string& driver_base::Driver::getStateName(driver_base::Driver::state_t)’:
  /root/catkin_ws/install/include/driver_base/driver.h:238:14: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  c++: internal compiler error: Killed (program cc1plus)
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
  make[3]: *** [src/nodes/CMakeFiles/camera1394_node.dir/driver1394.cpp.o] Error 4
  make[3]: Leaving directory `/root/rosbuild_ws/camera1394/build'
  make[2]: *** [src/nodes/CMakeFiles/camera1394_node.dir/all] Error 2
  make[2]: Leaving directory `/root/rosbuild_ws/camera1394/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/root/rosbuild_ws/camera1394/build'

I have successfully compiled all the dependencies of camera1394.

Can anyone ... (more)

edit retag flag offensive close merge delete

Comments

Now you are getting an internal compiler error. What compiler version are you using?

joq gravatar image joq  ( 2013-03-11 16:32:55 -0600 )edit

Do you mean gcc? I have gcc with version 4.6.3

AdrianPeng gravatar image AdrianPeng  ( 2013-03-11 16:35:56 -0600 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2013-03-11 09:05:46 -0600

William gravatar image

The first linking error:

dev_camera1394.cpp:(.text+0xe28): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ros::console::levels::Level)'
dev_camera1394.cpp:(.text+0xe62): undefined reference to `ros::console::setLogLocationLevel(ros::console::LogLocation*, ros::console::levels::Level)'
dev_camera1394.cpp:(.text+0xe6e): undefined reference to `ros::console::checkLogLocationEnabled(ros::console::LogLocation*)'

Occurs because the package camera1394 is not linking against rosconsole, I think that this unlikely to be a complete error log, but instead occurred when rosconsole could not be found by rosmake.

The second error is because a rosbuild package's name is based on its folder name. In this case a dynamic reconfigure file is declaring its package to be camera1394:

PACKAGE='camera1394'
import roslib; roslib.load_manifest(PACKAGE)

But cannot find it at build time:

rospkg.common.ResourceNotFound: camera1394

This is because you have the package in the folder /root/catkin_ws/src/camera1394-groovy-devel/, making the package name camera1394-groovy-devel rather than just camera1394.

To resolve this, rename that folder to camera1394 and rebuild it.

Additionally, you should not be mixing catkin and rosbuild workspaces, their workspaces are orthogonal, instead you should have a folder structure like this:

catkin_ws/
     src/
         catkin_pkg1/
         catkin_pkg2/
         ...
     install/
         setup.bash
         ...
rosbuild_ws/
    setup.bash
    ...
    rosbuild_stack1
    rosbuild_stack2

Where you build the catkin_ws with catkin_make install, then source catkin_ws/install/setup.bash before creating and building the rosbuild_ws workspace.

edit flag offensive delete link more

Comments

Hi William, I made a new directory rosbuild_ws and add it to ROS_PACKAGE_PATH. Then I move the camera1394-groovy-devel to rosbuild_ws and rename it to camera1394. But I got a new error while compiling. I update that in my question.

AdrianPeng gravatar image AdrianPeng  ( 2013-03-11 16:21:35 -0600 )edit
1

answered 2013-03-11 15:44:52 -0600

joq gravatar image

updated 2013-03-11 16:46:33 -0600

The camera1394 master branch is still being ported to catkin, but not working yet.

The groovy-devel branch is the current 1.8.1 release, which should work with rosbuild. See the README file.

EDIT: Your compiler is reporting a fatal internal error. GCC 4.6.3 works fine for me on x86_64 with Precise.

Maybe there is a problem with the ARM back-end.

edit flag offensive delete link more

Comments

Hi joq, I got error while compiling groovy-devel. But I noticed that there is a branch called groovy, what's the difference between groovy-devel and groovy? Should I try groovy branch?

AdrianPeng gravatar image AdrianPeng  ( 2013-03-11 16:24:26 -0600 )edit

The groovy branch was created by rosrelease for the 1.8.1 update. It is identical to groovy-devel.

joq gravatar image joq  ( 2013-03-11 16:28:55 -0600 )edit

I am wondering why I can compile camera1394(electric version) but not camera1394(groovy-devel version).

AdrianPeng gravatar image AdrianPeng  ( 2013-03-11 16:53:14 -0600 )edit

Monitor your memory, gcc will crash sometimes if you run out of memory. If so, try make -j1 to ensure only one gcc process at a time.

William gravatar image William  ( 2013-03-11 17:41:34 -0600 )edit

What source URL are you using for Electric? I have no idea why that might work but the Groovy version does not. What ROS distro are you running?

joq gravatar image joq  ( 2013-03-11 18:20:17 -0600 )edit

Question Tools

Stats

Asked: 2013-03-10 14:44:25 -0600

Seen: 883 times

Last updated: Mar 11 '13