Ask Your Question
2

fatal error: Eigen/Core: No such file or directory

asked 2012-09-19 02:53:50 -0500

Benoit Larochelle gravatar image

updated 2012-09-19 03:04:28 -0500

I use Ubuntu 12.04 and Fuerte and for some reason, I cannot include laser_geometry.h from my code. When I do so, laser_geometry.h includes <Eigen/Core>, which makes rosmake fail when compiling my package:

  In file included from /home/robot/nifti_systems/bleeding-edge/stacks/nifti_ui/foo/src/foo.cpp:5:0:
  /opt/ros/fuerte/stacks/laser_pipeline/laser_geometry/include/laser_geometry/laser_geometry.h:46:22: fatal error: Eigen/Core: No such file or directory
  compilation terminated.
  make[3]: *** [CMakeFiles/foo.dir/src/foo.o] Error 1

Package foo has these dependencies in its manifest:

<depend package="roscpp"/>
<depend package="laser_geometry"/>

And I also tried with this (which should be unnecessary since it is already in the manifest of package laser_geometry):

<rosdep name="eigen"/>

I called rosdep install before rosmake, and it says that all dependencies are installed. I tried removing ROS_NOBUILD from laser_geometry, and I can build that package without a problem.

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
4

answered 2012-09-19 22:55:13 -0500

Benoit Larochelle gravatar image

This is a different solution than the one from tlinder, although it is related.

The migration web page mentions that if your package exports headers that use Eigen, you must export the Eigen flag. This is currently not done by package laser_geometry. I tried it on my set-up, i.e. I changed

<export>
<cpp cflags="-I${prefix}/include" 
     lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -llaser_geometry"/>
</export>

to

<export>
<cpp cflags="`pkg-config --cflags eigen3` -I${prefix}/include" 
     lflags="-Wl,-rpath,${prefix}/lib -L${prefix}/lib -llaser_geometry"/>
</export>

and it solved the problem. If I'm not mistaken, it was just forgotten in laser_geometry. I filed a ticket for it: https://code.ros.org/trac/ros-pkg/ticket/5566.

edit flag offensive delete link more
6

answered 2012-09-19 22:11:07 -0500

updated 2012-09-19 22:11:48 -0500

Take a look in the migration web page here.

Eigen is in fuerte differently used then in prior versions:

Starting with Fuerte, the new pattern to find Eigen in a CMakeLists.txt file is:

find_package(Eigen REQUIRED)

include_directories(${EIGEN_INCLUDE_DIRS})

add_definitions(${EIGEN_DEFINITIONS})

edit flag offensive delete link more
4

answered 2016-01-13 10:07:21 -0500

On Ubuntu 14.04 and Indigo use Eigen3 instead of Eigen

find_package(Eigen3 REQUIRED) include_directories(${EIGEN3_INCLUDE_DIR})

edit flag offensive delete link more
2

answered 2012-10-16 13:24:32 -0500

dgossow gravatar image

Thank you very much for bringing up and resolving this issue. We have incorporated the bugfix into the Fuerte release 1.4.5.

We've also addressed this for the Groovy release, where the stack has moved to the new catkin build system.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2012-09-19 02:53:50 -0500

Seen: 15,733 times

Last updated: Jan 13 '16