Ask Your Question

Revision history [back]

Error while building opencv_contrib with Eigen

Hi,

I'm trying to build opencv_contrib with eigen using mingw64 cmake 3.7.0.0 rc2. My cmake output is here Now I try to build opencv and I have got this error :

make
[  1%] Built target zlib
[  4%] Built target libtiff
[  6%] Built target libjpeg
[  9%] Built target libwebp
[ 11%] Built target libjasper
[ 12%] Built target libpng
[ 16%] Built target IlmImf
Scanning dependencies of target opencv_core_pch_dephelp
[ 16%] Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj
[ 16%] Linking CXX static library ../../lib/libopencv_core_pch_dephelp.a
[ 16%] Built target opencv_core_pch_dephelp
[ 16%] Generating precomp.hpp.gch/opencv_core_Release.gch
In file included from F:/lib/opencv/mingw64/modules/core/precomp.hpp:55:0:
F:/lib/opencv/modules/core/include/opencv2/core/private.hpp:58:24: fatal error: Eigen/Core: No such file or directory
 #  include <Eigen/Core>
                        ^
compilation terminated.
make[2]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:64: modules/core/precomp.hpp.gch/opencv_core_Release.gch] Error 1
make[1]: *** [CMakeFiles/Makefile2:2390: modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2
make: *** [Makefile:161: all] Error 2

using make --trace I have got this :

[ 16%] Generating precomp.hpp.gch/opencv_core_Release.gch
cd /F/lib/opencv/mingw64/modules/core && "/C/Program Files (x86)/cmake-3.5.0-win32-x86/bin/cmake.exe" -E make_directory F:/lib/opencv/mingw64/modules/core/precomp.hpp.gch
cd /F/lib/opencv/mingw64/modules/core && /F/mingw-w64/x86_64-6.2.0-posix-sjlj-rt_v5-rev1/mingw64/bin/g++.exe -O2 -DNDEBUG -DNDEBUG "-D__OPENCV_BUILD=1" "-DCVAPI_EXPORTS" -I"F:/lib/opencv/mingw64" -isystem"f:/lib/eigen-eigen" -I"F:/lib/opencv/mingw64" -isystem"f:/lib/eigen-eigen" -I"F:/lib/opencv/modules/core/include" -I"F:/lib/opencv/modules/core/src" -I"F:/lib/opencv/mingw64/modules/core" -I"F:/lib/opencv/modules/core/include" -I"F:/lib/opencv/3rdparty/zlib" -I"F:/lib/opencv/mingw64/3rdparty/zlib" -I"F:/lib/opencv/3rdparty/include/opencl/1.2" -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -msse -msse2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -DCVAPI_EXPORTS -x c++-header -o F:/lib/opencv/mingw64/modules/core/precomp.hpp.gch/opencv_core_Release.gch F:/lib/opencv/mingw64/modules/core/precomp.hpp
In file included from F:/lib/opencv/mingw64/modules/core/precomp.hpp:55:0:
F:/lib/opencv/modules/core/include/opencv2/core/private.hpp:58:24: fatal error: Eigen/Core: No such file or directory
 #  include <Eigen/Core>
                        ^
compilation terminated.
make[2]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:64: modules/core/precomp.hpp.gch/opencv_core_Release.gch] Error 1
make[1]: *** [CMakeFiles/Makefile2:2390: modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2
make: *** [Makefile:161: all] Error 2

Something is weird : -isystem"f:/lib/eigen-eigen" . I am noob with mingw . May be somebody can help me to solve this.

Thanks in advance

PS I can build everything using vs2015 and can build opencv with contrib without eigen using mingw.