building opencv fail on Qiana

1k views Asked by At

I encountered the problem during compiling OpenCV. Error message said that I don't have Eigen. However, I do have one in my /usr/local/include directory. Also, I ran CMake with option below.
CMake:

cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D CUDA_GENERATION=Auto USE_EIGEN=/usr/local/include/Eigen ..

Compiling OpenCV(by make):

[ 75%] Building CXX object modules/contrib/CMakeFiles/opencv_contrib.dir/src/rgbdodometry.cpp.o
/home/gom7745/IR/opencv-2.4.11/modules/contrib/src/rgbdodometry.cpp:65:47: fatal error: unsupported/Eigen/MatrixFunctions: No such file or directory
 #  include <unsupported/Eigen/MatrixFunctions>
                                               ^
compilation terminated.
make[2]: *** [modules/contrib/CMakeFiles/opencv_contrib.dir/src/rgbdodometry.cpp.o] Error 1
make[1]: *** [modules/contrib/CMakeFiles/opencv_contrib.dir/all] Error 2
make: *** [all] Error 2

Does anyone have any idea about this? Thanks!!

2

There are 2 answers

0
Bastien Chatton On

Building it with -DWITH_EIGEN=OFF solved the issue for me.

0
wallE On

here cmake is unable to find unsupported/Eigen/MatrixFunctions. First find where Eigen is installed, in my case it was located at /usr/local/include/eigen3. Now locate your rgbdodometry.cpp file, in my case it was in /opencv_contrib/modules/rgbd/src. Open the cpp file and modify the previous line with something like

"/usr/local/include/eigen3/unsupported/Eigen/MatrixFunctions"