Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with cmake (using eigen from gtsam) #17

Open
baishibona opened this issue Apr 28, 2016 · 10 comments
Open

error with cmake (using eigen from gtsam) #17

baishibona opened this issue Apr 28, 2016 · 10 comments

Comments

@baishibona
Copy link

baishibona commented Apr 28, 2016

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
Copy link
Member

ruffsl commented Apr 29, 2016

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
Copy link
Author

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

@ruffsl
Copy link
Member

ruffsl commented Apr 29, 2016

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
Copy link
Author

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 [email protected]:

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
Copy link
Author

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 [email protected]:

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 [email protected]:

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
Copy link
Member

ruffsl commented Apr 29, 2016

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
Copy link
Author

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 [email protected]:

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
Copy link
Member

ruffsl commented Apr 29, 2016

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
Copy link
Author

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants