shimat / opencvsharp

OpenCV wrapper for .NET
Apache License 2.0
5.41k stars 1.15k forks source link

Ubuntu make errors fail to find OpenCV #372

Closed jasonsturges closed 4 years ago

jasonsturges commented 7 years ago

Summary of your issue

Following the instructions from the Tutorial For Ubuntu Wiki, I have successfully built OpenCV 2.4.10 per the instructions; however, build of OpenCvSharp fails on the make step.

Either OpenCV libraries are not found from the CMake; or, I'm confused by the git submodules here.

Make files are unable to locate OpenCV headers.

Environment

Ubuntu 16.04.2 LTS

Output

$ git clone https://github.com/shimat/opencvsharp.git
Cloning into 'opencvsharp'...
remote: Counting objects: 10790, done.
remote: Total 10790 (delta 0), reused 0 (delta 0), pack-reused 10790
Receiving objects: 100% (10790/10790), 34.90 MiB | 5.18 MiB/s, done.
Resolving deltas: 100% (7737/7737), done.
Checking connectivity... done.

$ cd opencvsharp/src

$ cmake .
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jason/opencvsharp/src

$ make -j 4
Scanning dependencies of target OpenCvSharpExtern
[  7%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/cuda.cpp.o
[  7%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/highgui.cpp.o
[ 11%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/stitching.cpp.o
[ 15%] Building CXX object OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/aruco.cpp.o
In file included from /home/jason/opencvsharp/src/OpenCvSharpExtern/stitching.h:4:0,
                 from /home/jason/opencvsharp/src/OpenCvSharpExtern/stitching.cpp:1:
/home/jason/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:13:39: fatal error: opencv2/calib3d/calib3d_c.h: No such file or directory
compilation terminated.
OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/build.make:62: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/stitching.cpp.o' failed
make[2]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/stitching.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/jason/opencvsharp/src/OpenCvSharpExtern/highgui.h:4:0,
                 from /home/jason/opencvsharp/src/OpenCvSharpExtern/highgui.cpp:1:
/home/jason/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:13:39: fatal error: opencv2/calib3d/calib3d_c.h: No such file or directory
compilation terminated.
OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/build.make:86: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/highgui.cpp.o' failed
make[2]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/highgui.cpp.o] Error 1
In file included from /home/jason/opencvsharp/src/OpenCvSharpExtern/cuda.h:4:0,
                 from /home/jason/opencvsharp/src/OpenCvSharpExtern/cuda.cpp:1:
/home/jason/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:13:39: fatal error: opencv2/calib3d/calib3d_c.h: No such file or directory
compilation terminated.
OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/build.make:110: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/cuda.cpp.o' failed
make[2]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/cuda.cpp.o] Error 1
In file included from /home/jason/opencvsharp/src/OpenCvSharpExtern/aruco.h:4:0,
                 from /home/jason/opencvsharp/src/OpenCvSharpExtern/aruco.cpp:1:
/home/jason/opencvsharp/src/OpenCvSharpExtern/include_opencv.h:13:39: fatal error: opencv2/calib3d/calib3d_c.h: No such file or directory
compilation terminated.
OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/build.make:134: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/aruco.cpp.o' failed
make[2]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/aruco.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/all' failed
make[1]: *** [OpenCvSharpExtern/CMakeFiles/OpenCvSharpExtern.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.