Bug #2430

Eigen3 CMake module fails for Eigen 3.2.0

Added by T. Korthals almost 6 years ago. Updated almost 6 years ago.

Status:ResolvedStart date:11/09/2015
Priority:NormalDue date:11/16/2015
Assignee:J. Wienke% Done:


Category:cmakeEstimated time:0.10 hour
Target version:Robotics Service Bus - rsb-0.12


I was just including Eigen3 in some of my projects via

find_package(Eigen3 3.0.0)

when I noticed the following cmake configuration error:

CMake Error at /usr/share/rsc0.12/cmake/Modules/FindEigen3.cmake:51 (message):
Eigen3 version .. found in /usr/include/eigen3, but at least 3.0.0
is required

I have Eigen3 3.2.0 installed on my system and it seems that they have changed/shortened the header file "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h", so that the version numbers cannot by found anymore.

In your "/usr/share/rsc0.12/cmake/Modules/FindEigen3.cmake:33" your are reading the file with a given offset:

file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header LIMIT 5000 OFFSET 1000)

After removing the offset, my Eigen3 can be found and my project configures.

file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header LIMIT 5000)

Maybe you should remove the offset and the limit?

Associated revisions

Revision fb00cb42
Added by J. Wienke almost 6 years ago

Remove offset in FindEigen3 for Eigen 3.2.0

fixes #2430


#1 Updated by J. Moringen almost 6 years ago

  • Subject changed from Eigen3 module failes to get correct version to Eigen3 CMake module fails for Eigen 3.2.0
  • Assignee changed from J. Moringen to J. Wienke
  • Estimated time changed from 0.10 to 0.10

#2 Updated by J. Wienke almost 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF