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

[jade] eigen3 not found build error

asked 2016-04-30 19:52:58 -0500

130s gravatar image

updated 2016-05-02 18:49:06 -0500

Even after following jade/Migration for Eigen, I still see that eigen3 is not found.

https://travis-ci.org/swri-robotics/m...

CMake Error at CMakeLists.txt:12 (find_package): 
  By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has 
  asked CMake to find a package configuration file provided by "Eigen3", but 
  CMake did not find one. 

  Could not find a package configuration file provided by "Eigen3" with any 
  of the following names: 

    Eigen3Config.cmake 
    eigen3-config.cmake 

  Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set 
  "Eigen3_DIR" to a directory containing one of the above files.  If "Eigen3" 
  provides a separate development package or SDK, be sure it has been 
  installed.

This may be happening only on Travis CI, using Travis config from industrial_ci but I'm not sure yet.

Also similar/same issue in a PR on moveit_core (error on Travis). Someone reported that the build moves forward by combining pkg_config but I don't know if that's the best idea (and didn't work for moveit_core).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-17 13:25:07 -0500

francisc0garcia gravatar image

updated 2016-05-17 15:42:30 -0500

130s gravatar image

Hi! you can try adding to CMakeList.txt:

pkg_search_module(Eigen3 REQUIRED eigen3)
include_directories(${EIGEN3_INCLUDE_DIR})
add_definitions(${EIGEN3_DEFINITIONS})

if(NOT EIGEN3_FOUND)
    # Fallback to cmake_modules
    find_package(cmake_modules REQUIRED)
    find_package(Eigen REQUIRED)
    set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
    set(EIGEN3_LIBRARIES ${EIGEN_LIBRARIES})  # Not strictly necessary as Eigen is head only
    # Possibly map additional variables to the EIGEN3_ prefix.
else()
    set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
endif()

catkin_package(
    ...
    DEPENDS Eigen
    ...
)

include_directories(
    ...
    ${Eigen_INCLUDE_DIRS}
)

This setup works for me, I also got problems before with Eigen.

I hope it helps you.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-04-30 19:52:58 -0500

Seen: 2,078 times

Last updated: May 17 '16