CogRob / omnimapper

A Modular Multimodal Mapping Framework
Other
94 stars 28 forks source link

error with cmake (using eigen from gtsam) #17

Open baishibona opened 8 years ago

baishibona commented 8 years ago

Hi, I run into error when doing cmake in pcl with eigen from gtsam(Ubuntu 14.04 & Indigo):

CMake Error at cmake/Modules/FindEigen.cmake:29 (file): file Internal CMake error when trying to open file: /home/bona/software/gtsam-3.1.0/gtsam/3rdparty/Eigen/Eigen/src/Core/util/Macros.h

and "cmake -DEIGEN_INCLUDE_DIR="~/software/gtsam-3.1.0/gtsam/3rdparty/Eigen" .." failed.

Any suggestion? Thanks.

ruffsl commented 8 years ago

What stage of the installation process as described by the wiki page was this? https://github.com/CognitiveRobotics/omnimapper/wiki/Installation-&-Dependencies

Are you specifying omni mapper to build using the same 3rdparty/Eigen folder gtsam ships with?

baishibona commented 8 years ago

It was "Build OmniMapper Base", however same error also when compiling pcl. I did pcl with PPA though.

ruffsl commented 8 years ago

I remember gtsam and package installed pcl having issues with each other, as gtsam ships with a patched version of Eigen that has not been ported upstream in Eigen (last I checked, but that was a year ago). Take a look at the last revision of the Dockerfiles (the COPY lines), and see how I patched the original headers in Eigen to avoid compiling PCL from scratch: https://github.com/CognitiveRobotics/omnimapper/blob/6d9b6d7404affc3ac07ac4281a3957085305fdc9/docker/demo/Dockerfile

I'm not sure if this still works, but I plan on revisiting the Dockerfiles in a week or so to update them to use the official ros images. Let me know how it goes.

baishibona commented 8 years ago

COPY HouseholderQR.h /usr/include/eigen3/Eigen/src/QR/HouseholderQR.h COPY CommaInitializer.h /usr/include/eigen3/Eigen/src/CommaInitializer.h

Did you mean these lines? Where do I get the packed headers from?

2016-04-29 13:11 GMT-04:00 Ruffin notifications@github.com:

I remember gtsam and package installed pcl having issues with each other, as gtsam ships with a patched version of Eigen that has not been ported upstream in Eigen (last I checked, but that was a year ago). Take a look at the last revision of the Dockerfiles (the COPY lines), and see how I patched the original headers in PCL to avoid compiling it from scratch:

https://github.com/CognitiveRobotics/omnimapper/blob/6d9b6d7404affc3ac07ac4281a3957085305fdc9/docker/demo/Dockerfile

I'm not sure if this still works, but I plan on revisiting the Dockerfiles in a week or so to update them to use the official ros images. Let me know how it goes.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/CognitiveRobotics/omnimapper/issues/17#issuecomment-215817412

baishibona commented 8 years ago

Actually, I think the error might be these lines in FindEigen.cmake:

if(EIGEN_INCLUDE_DIR) file(READ "${EIGEN_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen_version_header)

string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen_world_version_match "${_eigen_version_header}") set(EIGEN_WORLD_VERSION "${CMAKE_MATCH_1}") string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen_major_version_match "${_eigen_version_header}") set(EIGEN_MAJOR_VERSION "${CMAKE_MATCH_1}") string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen_minor_version_match "${_eigen_version_header}") set(EIGEN_MINOR_VERSION "${CMAKE_MATCH_1}") set(EIGEN_VERSION ${EIGEN_WORLD_VERSION}.${EIGEN_MAJOR_VERSION}.${EIGEN_MINOR_VERSION}) endif(EIGEN_INCLUDE_DIR)

If I simply comment these lines, cmake .. will work, however compile failed as missing eigen dependency. Could you confirm that the lines above is correct while configuring make files? Thanks!

2016-04-29 13:28 GMT-04:00 shi bai baishi.bona@gmail.com:

COPY HouseholderQR.h /usr/include/eigen3/Eigen/src/QR/HouseholderQR.h COPY CommaInitializer.h /usr/include/eigen3/Eigen/src/CommaInitializer.h

Did you mean these lines? Where do I get the packed headers from?

2016-04-29 13:11 GMT-04:00 Ruffin notifications@github.com:

I remember gtsam and package installed pcl having issues with each other, as gtsam ships with a patched version of Eigen that has not been ported upstream in Eigen (last I checked, but that was a year ago). Take a look at the last revision of the Dockerfiles (the COPY lines), and see how I patched the original headers in PCL to avoid compiling it from scratch:

https://github.com/CognitiveRobotics/omnimapper/blob/6d9b6d7404affc3ac07ac4281a3957085305fdc9/docker/demo/Dockerfile

I'm not sure if this still works, but I plan on revisiting the Dockerfiles in a week or so to update them to use the official ros images. Let me know how it goes.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/CognitiveRobotics/omnimapper/issues/17#issuecomment-215817412

ruffsl commented 8 years ago

The patched headers are in the same folder for the docker build context: https://github.com/CognitiveRobotics/omnimapper/tree/6d9b6d7404affc3ac07ac4281a3957085305fdc9/docker/demo

If you use say cmake-qt-gui or cmake-gui to configure cmake, do you see the eigen path properly pointed to that of gtsam's in it 3rdparty folder?

baishibona commented 8 years ago

yes, I think I have the correct path for eigen, please find the details in attachment:

​ As I just skipped pcl and jumped to omnimapper, it can pass cmake ..(with the 3rd party eigen), however failed when make. Error was :

In file included from /usr/include/pcl-1.7/pcl/common/common.h:41:0, from /home/bona/software/omnimapper/base/src/transform_tools.cpp:2: /usr/include/pcl-1.7/pcl/pcl_base.h:49:27: fatal error: Eigen/StdVector: No such file or directory

include <Eigen/StdVector>

Not sure whether it is something wrong with Eigen path.

2016-04-29 16:25 GMT-04:00 Ruffin notifications@github.com:

The patched headers are in the same folder for the docker build context:

https://github.com/CognitiveRobotics/omnimapper/tree/6d9b6d7404affc3ac07ac4281a3957085305fdc9/docker/demo

If you use say cmake-qt-gui or cmake-gui to configure cmake, do you see the eigen path properly pointed to that of gtsam's in it 3rdparty folder?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/CognitiveRobotics/omnimapper/issues/17#issuecomment-215871491

ruffsl commented 8 years ago

I think you're using email reply to this issue, although github issue threads do use attachment, perhaps use something like pastebin?

I'll have to check if i can reproduce this with the current debian packages for trusty when I refactor the dockerfiles.

baishibona commented 8 years ago

Oops, sorry for missing the attachment, yes I did reply to email. Please find it here, I hope this time it will work. Sorry I am not familiar with pastebin, so I put it onto google drive.

Thanks!

akshaybapat04 commented 6 years ago

Any workaround to this issue? I can't run any PCL code due to this error