I using cmake and mingw-w64 to make opencv on windows 10,however,i get a error when make it on 97%.
there are error report:
[ 96%] Built target opencv_videostab
[ 97%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.obj
In file included from C:/PROGRA~1/Python36/include/Python.h:8:0,
from D:\Program Files (x86)\OpenCv_3.2.0\opencv\sources\modules\python\src2\cv2.cpp:6:
C:/PROGRA~1/Python36/include/pyconfig.h:379:5: warning: "_MSC_VER" is not defined, evaluates to 0 [-Wundef]
#if _MSC_VER >= 1800
^~~~~~~~
In file included from D:/Program Files (x86)/MinGw_64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/math.h: 36:0,
from C:/PROGRA~1/Python36/include/pyport.h:194,
from C:/PROGRA~1/Python36/include/Python.h:50,
from D:\Program Files (x86)\OpenCv_3.2.0\opencv\sources\modules\python\src2\cv2.cpp:6:
D:/Program Files (x86)/MinGw_64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/cmath:42:10: fatal error: D:/ Program Files (x86)/MinGw_64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/bits/cpp_type_traits.h>: Invalid argument
#include <bits/cpp_type_traits.h>s
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[2]: ***[modules\python3\CMakeFiles\opencv_python3.dir\build.make:180: modules/python3/CMakeFiles/ope ncv_python3.dir/__/src2/cv2.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:6794: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
mingw32-make: *** [Makefile:160: all] Error 2
What can i do to slove it?
update:
i had sloved it,it's a bug fot mingww64,the error erport
:cmath:42:10: fatal error: D:/ Program Files (x86)/MinGw_64/mingw64/lib/gcc/x86_64-w64-mingw32/7.2.0/include/c++/bits/cpp_type_traits.h>: Invalid argument #include <bits/cpp_type_traits.h>s
said having a error to head file,so i just delete the 's' after include statement,that is include <bits/cpp_type_traits.h>
Related
i am on ubuntu and i am using libprotoc version 3.15.8 when i run cmake command it successfully done but when i run make -j it's throwing error:
.
.
.
[ 8%] Building CXX object CMakeFiles/ConfigServiceCore.dir/main.cpp.o
In file included from /home/bugs/workspace/ReactVision/rv_utils/ConfigService/configservicecore.h:3,
from /home/bugs/workspace/ReactVision/rv_utils/ConfigService/main.cpp:3:
/home/bugs/workspace/ReactVision/rv_utils/ConfigService/config_vals.pb.h:10:10: fatal error: google/protobuf/port_def.inc: No such file or directory
10 | #include <google/protobuf/port_def.inc>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/ConfigServiceCore.dir/build.make:63: CMakeFiles/ConfigServiceCore.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:159: CMakeFiles/ConfigServiceCore.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
I was trying to setup OpenCV environment using MingW64 and visual studio code,
Work done so far
Installed and set environment CMake
Installed OpenCV 4.5.2
OpenCV Makefile generation
using CMake Build from source(openCV directory)
specified the generator for the project
configured the compiler type and makefile type
Enabled precompiled header
Confusing part
when I entered the command mingw32-make for compilation in directory where the makefile is generated
It worked until 67% after that:
[ 67%] Built target pch_Generate_opencv_test_dnn
Scanning dependencies of target opencv_test_dnn
[ 67%] Building CXX object modules/dnn/CMakeFiles/opencv_test_dnn.dir/test/npy_blob.cpp.obj
In file included from <command-line>:0:0:
D:/opencv/build/modules/dnn/test_precomp.hpp:50:10: fatal error: test_common.hpp: No such file or directory
#include "test_common.hpp"
^~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[2]: *** [modules\dnn\CMakeFiles\opencv_test_dnn.dir\build.make:82: modules/dnn/CMakeFiles/opencv_test_dnn.dir/test/npy_blob.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:3429: modules/dnn/CMakeFiles/opencv_test_dnn.dir/all] Error 2
mingw32-make: *** [Makefile:181: all] Error 2
thank you
I am following this guide to install gRPC using CMake. First, it is actually not usable from a CMake project without tweaking the CMake command according to this other post. So I did, the configuration part works. When I run make though, it fails like this
In file included from /mnt/c/Program Files/grpc/include/ares.h:22:0,
from /mnt/c/Users/j*****/sources/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc:23:
/mnt/c/Program Files/grpc/include/ares_build.h:26:12: fatal error: winsock2.h: No such file or directory
# include <winsock2.h>
^~~~~~~~~~~~
compilation terminated.
CMakeFiles/grpc.dir/build.make:4768: recipe for target 'CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc.o' failed
make[2]: *** [CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc.o] Error 1
[ 85%] Building CXX object CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc.o
make[2]: *** Waiting for unfinished jobs....
In file included from /mnt/c/Program Files/grpc/include/ares.h:22:0,
from /mnt/c/Users/j*****/sources/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc:23:
/mnt/c/Program Files/grpc/include/ares_build.h:26:12: fatal error: winsock2.h: No such file or directory
# include <winsock2.h>
^~~~~~~~~~~~
compilation terminated.
CMakeFiles/grpc.dir/build.make:4794: recipe for target 'CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc.o' failed
make[2]: *** [CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc.o] Error 1
In file included from /mnt/c/Program Files/grpc/include/ares.h:22:0,
from /mnt/c/Users/j*****/sources/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc:29:
/mnt/c/Program Files/grpc/include/ares_build.h:26:12: fatal error: winsock2.h: No such file or directory
# include <winsock2.h>
^~~~~~~~~~~~
compilation terminated.
CMakeFiles/grpc.dir/build.make:4820: recipe for target 'CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc.o' failed
make[2]: *** [CMakeFiles/grpc.dir/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc.o] Error 1
CMakeFiles/Makefile2:702: recipe for target 'CMakeFiles/grpc.dir/all' failed
make[1]: *** [CMakeFiles/grpc.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Am I supposed to install something that is not documented ?
While compiling C++ SDK I am getting the following error
**
ERROR LOGS
**
fatal error: kaa/gen/EndpointGen.hpp: No such file or directory
[ 1%] Building CXX object kaa/CMakeFiles/kaacpp.dir/impl/event/registration/EndpointRegistrationManager.cpp.o
In file included from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/channel/ITransportConnectionInfo.hpp:25:0,
from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/KaaDefaults.hpp:28,
from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/event/registration/EndpointRegistrationManager.hpp:20,
from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/impl/event/registration/EndpointRegistrationManager.cpp:17:
/home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/channel/TransportProtocolId.hpp:22:35: fatal error: kaa/gen/EndpointGen.hpp: No such file or directory
#include "kaa/gen/EndpointGen.hpp"
^
compilation terminated.
make[2]: * [kaa/CMakeFiles/kaacpp.dir/impl/event/registration/EndpointRegistrationManager.cpp.o] Error 1
make[1]: * [kaa/CMakeFiles/kaacpp.dir/all] Error 2
make: *** [all] Error 2
Manually I place EndpointGen.hpp file but again while compiling it's giving the same error for different file. Later I found files inside kaa/CMakeFiles/kaacpp.dir/impl/ were missing.
Could anyone please help me to resolve this issue?
This issue was resolved in v2.0.0 by adding compile-client-cpp option to the maven goals when compiling Kaa.
See the reference for this.
I have the following configuration:
OpenCV 3.2.0-dev
Windows 10.0.14393 AMD64
CMake: 3.7.1
CMake generator: MinGW Makefiles
GCC MinGW 6.3.0
Intel TBB 2017 Update 4
I'm trying to install OpenCV with TBB. I downloaded the Intel TBB 2017 Update 4 and set every path in the correct way.
I build (of course) the TBB library before to add it in the CMake, in this way:
mingw32-make compiler=gcc arch=ia64
And I add the following path in the system variables:
C:\tbb-2017\include
C:\tbb-2017\build\windows_intel64_gcc_mingw6.3.0_release
But I have this error when I compile with CMake:
C:\opencv3\release>mingw32-make -j8
[ 1%] Built target zlib[ 1%] [ 1%] [ 1%] Building CXX object modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj[ 1%]
Building CXX object modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/opencv_ts_pch_dephelp.cxx.objBuilding CXX object modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/opencv_imgproc_pch_dephelp.cxx.obj
[ 4%] Built target libjpeg
[ 6%] Built target libjasper
Building CXX object modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/opencv_videoio_pch_dephelp.cxx.obj
[ 6%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/opencv_imgcodecs_px.obj
[ 6%] Built target opencv_perf_core_pch_dephelp
[ 6%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/opencv_highgui_pch_dephelp.cxx.obj
[ 7%] Building CXX object modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj
Scanning dependencies of target opencv_flann_pch_dephelp
In file included from C:/opencv3/opencv-master/modules/core/src/precomp.hpp:55:0,
from C:\opencv3\release\modules\core\opencv_core_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
cIn file included from C:/opencv3/opencv-master/modules/imgproc/src/precomp.hpp:50:0,
from C:\opencv3\release\modules\imgproc\opencv_imgproc_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
oIn file included from C:/opencv3/opencv-master/modules/ts/src/precomp.hpp:2:0,
from C:\opencv3\release\modules\ts\opencv_ts_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
cmIn file included from C:/opencv3/opencv-master/modules/videoio/src/precomp.hpp:48:0,
from C:\opencv3\release\modules\videoio\opencv_videoio_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
ocpcmoi[ 7%] lmoBuilding CXX object modules/flann/CMakeFiles/opencv_flann_pch_dephelp.dir/opencv_flann_pch_dephelp.cxx.obj
ppmaiiptlIn file included from C:/opencv3/opencv-master/modules/imgcodecs/src/precomp.hpp:48:0,
from C:\opencv3\release\modules\imgcodecs\opencv_imgcodecs_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
liiacalototanimit opoitninoe l nrtat metetirirenmomrainimtn nieatandteta.eret
mddei..dn
.a
tedmodules\core\CMakeFiles\opencv_core_pch_dephelp.dir\build.make:62: recipe for target 'modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj' failed
.mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/opencv_core_pch_dephelp.cxx.obj] Error 1
modules\imgproc\CMakeFiles\opencv_imgproc_pch_dephelp.dir\build.make:62: recipe for target 'modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/opencv_imgproc_pch_dephelp.cxx.obj' failed
modules\ts\CMakeFiles\opencv_ts_pch_dephelp.dir\build.make:62: recipe for target 'modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/opencv_ts_pch_dephelp.cxx.obj' failed
CMakeFiles\Makefile2:2216: recipe for target 'modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/all' failed
modules\videoio\CMakeFiles\opencv_videoio_pch_dephelp.dir\build.make:62: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/opencv_videoio_pch_dephelp.cxx.obj' failed
mingw32-make[2]: *** [modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/opencv_imgproc_pch_dephelp.cxx.obj] Error 1
mingw32-make[2]: *** [modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/opencv_ts_pch_dephelp.cxx.obj] Error 1
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core_pch_dephelp.dir/all] Error 2
mingw32-make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/opencv_videoio_pch_dephelp.cxx.obj] Error 1
mingw32-make[1]: *** Waiting for unfinished jobs....
CMakeFiles\Makefile2:8292: recipe for target 'modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/all' failed
modules\imgcodecs\CMakeFiles\opencv_imgcodecs_pch_dephelp.dir\build.make:62: recipe for target 'modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/opencv_imgcodecs_pch_dephelp.cxx.obj' failed
mingw32-make[1]: *** [modules/ts/CMakeFiles/opencv_ts_pch_dephelp.dir/all] Error 2
mingw32-make[2]: *** [modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/opencv_imgcodecs_pch_dephelp.cxx.obj] Error 1
CMakeFiles\Makefile2:2867: recipe for target 'modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/all] Error 2
CMakeFiles\Makefile2:7513: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio_pch_dephelp.dir/all] Error 2
CMakeFiles\Makefile2:6906: recipe for target 'modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/imgcodecs/CMakeFiles/opencv_imgcodecs_pch_dephelp.dir/all] Error 2
In file included from C:/opencv3/opencv-master/modules/highgui/src/precomp.hpp:48:0,
from C:\opencv3\release\modules\highgui\opencv_highgui_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
compilation terminated.
modules\highgui\CMakeFiles\opencv_highgui_pch_dephelp.dir\build.make:62: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/opencv_highgui_pch_dephelp.cxx.obj' failed
mingw32-make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/opencv_highgui_pch_dephelp.cxx.obj] Error 1
CMakeFiles\Makefile2:8085: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui_pch_dephelp.dir/all] Error 2
In file included from C:/opencv3/opencv-master/modules/core/test/test_precomp.hpp:17:0,
from C:\opencv3\release\modules\core\opencv_test_core_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
compilation terminated.
modules\core\CMakeFiles\opencv_test_core_pch_dephelp.dir\build.make:62: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj' failed
mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.obj] Error 1
CMakeFiles\Makefile2:2360: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all] Error 2
In file included from C:/opencv3/opencv-master/modules/flann/src/precomp.hpp:23:0,
from C:\opencv3\release\modules\flann\opencv_flann_pch_dephelp.cxx:1:
C:/opencv3/opencv-master/modules/core/include/opencv2/core/private.hpp:63:23: fatal error: tbb/tbb.h: No such file or directory
# include "tbb/tbb.h"
^
compilation terminated.
modules\flann\CMakeFiles\opencv_flann_pch_dephelp.dir\build.make:62: recipe for target 'modules/flann/CMakeFiles/opencv_flann_pch_dephelp.dir/opencv_flann_pch_dephelp.cxx.obj' failed
mingw32-make[2]: *** [modules/flann/CMakeFiles/opencv_flann_pch_dephelp.dir/opencv_flann_pch_dephelp.cxx.obj] Error 1
CMakeFiles\Makefile2:2617: recipe for target 'modules/flann/CMakeFiles/opencv_flann_pch_dephelp.dir/all' failed
mingw32-make[1]: *** [modules/flann/CMakeFiles/opencv_flann_pch_dephelp.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
C:\opencv3\release>
Can you help me?
Solution
I changed from CMake the ENABLE_PRECOMPILED_HEADERS flag from ON to OFF and everythings worked...
I changed from CMake the ENABLE_PRECOMPILED_HEADERS flag from ON to OFF and everythings worked...