-
-
Notifications
You must be signed in to change notification settings - Fork 56.3k
Closed
Description
Hi there,
I am trying to compile OpenCV for my systems with MinGW 7.2.0., configured as win32 and CMake 3.10. But since half a week I got this error and I tried a lot, googled a lot and now kinda at the wit's end. Most solutions are seem so simple, yet this specify problem got questioned very rarely and there is no real solution to it, which is why I am raising this issue.
Thanks in advance!
Here is the log from the compiling process:
E:\Application\opencv\mingw-build>mingw32-make
[ 0%] Built target gen-pkgconfig
[ 2%] Built target zlib
[ 6%] Built target libtiff
[ 10%] Built target libjpeg
[ 19%] Built target libwebp
[ 22%] Built target libjasper
[ 23%] Built target libpng
[ 29%] Built target IlmImf
[ 35%] Built target libprotobuf
[ 40%] Built target opencv_core
[ 46%] Built target opencv_imgproc
[ 48%] Built target opencv_imgcodecs
[ 49%] Built target opencv_videoio
[ 49%] Built target opencv_highgui
[ 50%] Built target opencv_ts
[ 52%] Built target opencv_test_core
[ 55%] Built target opencv_perf_core
[ 55%] Built target opencv_flann
[ 55%] Built target opencv_test_flann
[ 59%] Built target opencv_test_imgproc
[ 62%] Built target opencv_perf_imgproc
[ 64%] Built target opencv_ml
[ 65%] Built target opencv_test_ml
[ 65%] Building CXX object modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/detection_based_tracker.cpp.obj
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:175:14: error: 'thread' in namespace 'std' does not name a type
std::thread second_workthread;
^~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:176:14: error: 'mutex' in namespace 'std' does not name a type
std::mutex mtx;
^~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:177:14: error: 'condition_variable' in namespace 'std' does not name a type
std::condition_variable objectDetectorRun;
^~~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:178:14: error: 'condition_variable' in namespace 'std' does not name a type
std::condition_variable objectDetectorThreadStartStop;
^~~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp: In member function 'void cv::DetectionBasedTracker::SeparateDetectionWork::setParameters(const cv::DetectionBasedTracker::Parameters&)':
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:143:35: error: 'mutex' is not a member of 'std'
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:143:35: error: 'mutex' is not a member of 'std'
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:143:40: error: template argument 1 is invalid
std::unique_lock<std::mutex> mtx_lock(mtx);
^
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:143:51: error: 'mtx' was not declared in this scope
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:143:42: warning: unused variable 'mtx_lock' [-Wunused-variable]
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp: In member function 'void cv::DetectionBasedTracker::SeparateDetectionWork::init()':
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:156:35: error: 'mutex' is not a member of 'std'
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:156:35: error: 'mutex' is not a member of 'std'
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:156:40: error: template argument 1 is invalid
std::unique_lock<std::mutex> mtx_lock(mtx);
^
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:156:51: error: 'mtx' was not declared in this scope
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:164:13: error: 'objectDetectorThreadStartStop' was not declared in this scope
objectDetectorThreadStartStop.notify_one();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:164:13: note: suggested alternative: 'timeWhenDetectingThreadStartedWork'
objectDetectorThreadStartStop.notify_one();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
timeWhenDetectingThreadStartedWork
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:156:42: warning: unused variable 'mtx_lock' [-Wunused-variable]
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp: In destructor 'virtual cv::DetectionBasedTracker::SeparateDetectionWork::~SeparateDetectionWork()':
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:254:5: error: 'second_workthread' was not declared in this scope
second_workthread.join();
^~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp: In member function 'bool cv::DetectionBasedTracker::SeparateDetectionWork::run()':
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:261:27: error: 'mutex' is not a member of 'std'
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:261:27: error: 'mutex' is not a member of 'std'
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:261:32: error: template argument 1 is invalid
std::unique_lock<std::mutex> mtx_lock(mtx);
^
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:261:43: error: 'mtx' was not declared in this scope
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:275:5: error: 'second_workthread' was not declared in this scope
second_workthread = std::thread(workcycleObjectDetectorFunction, (void*)this); //TODO: add attributes?
^~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:275:30: error: 'thread' is not a member of 'std'
second_workthread = std::thread(workcycleObjectDetectorFunction, (void*)this); //TODO: add attributes?
^~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:275:30: note: suggested alternative: 'tera'
second_workthread = std::thread(workcycleObjectDetectorFunction, (void*)this); //TODO: add attributes?
^~~~~~
tera
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:276:5: error: 'objectDetectorThreadStartStop' was not declared in this scope
objectDetectorThreadStartStop.wait(mtx_lock);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:276:5: note: suggested alternative: 'timeWhenDetectingThreadStartedWork'
objectDetectorThreadStartStop.wait(mtx_lock);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
timeWhenDetectingThreadStartedWork
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp: In member function 'void cv::DetectionBasedTracker::SeparateDetectionWork::workcycleObjectDetector()':
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:317:27: error: 'mutex' is not a member of 'std'
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:317:27: error: 'mutex' is not a member of 'std'
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:317:32: error: template argument 1 is invalid
std::unique_lock<std::mutex> mtx_lock(mtx);
^
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:317:43: error: 'mtx' was not declared in this scope
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:323:9: error: 'objectDetectorThreadStartStop' was not declared in this scope
objectDetectorThreadStartStop.notify_one();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:323:9: note: suggested alternative: 'timeWhenDetectingThreadStartedWork'
objectDetectorThreadStartStop.notify_one();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
timeWhenDetectingThreadStartedWork
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:330:9: error: 'objectDetectorRun' was not declared in this scope
objectDetectorRun.wait(mtx_lock);
^~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:340:14: error: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int'
mtx_lock.unlock();
^~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:357:22: error: request for member 'lock' in 'mtx_lock', which is of non-class type 'int'
mtx_lock.lock();
^~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:364:26: error: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int'
mtx_lock.unlock();
^~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:372:13: error: 'objectDetectorRun' was not declared in this scope
objectDetectorRun.wait(mtx_lock);
^~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:380:22: error: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int'
mtx_lock.unlock();
^~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:431:18: error: request for member 'lock' in 'mtx_lock', which is of non-class type 'int'
mtx_lock.lock();
^~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:447:18: error: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int'
mtx_lock.unlock();
^~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp: In member function 'void cv::DetectionBasedTracker::SeparateDetectionWork::stop()':
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:462:25: error: 'mutex' is not a member of 'std'
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:462:25: error: 'mutex' is not a member of 'std'
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:462:30: error: template argument 1 is invalid
std::unique_lock<std::mutex> mtx_lock(mtx);
^
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:462:41: error: 'mtx' was not declared in this scope
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:468:18: error: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int'
mtx_lock.unlock();
^~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:479:5: error: 'objectDetectorRun' was not declared in this scope
objectDetectorRun.notify_one();
^~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:480:5: error: 'objectDetectorThreadStartStop' was not declared in this scope
objectDetectorThreadStartStop.wait(mtx_lock);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:480:5: note: suggested alternative: 'timeWhenDetectingThreadStartedWork'
objectDetectorThreadStartStop.wait(mtx_lock);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
timeWhenDetectingThreadStartedWork
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:482:14: error: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int'
mtx_lock.unlock();
^~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp: In member function 'void cv::DetectionBasedTracker::SeparateDetectionWork::resetTracking()':
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:495:27: error: 'mutex' is not a member of 'std'
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:495:27: error: 'mutex' is not a member of 'std'
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:495:32: error: template argument 1 is invalid
std::unique_lock<std::mutex> mtx_lock(mtx);
^
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:495:43: error: 'mtx' was not declared in this scope
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:512:14: error: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int'
mtx_lock.unlock();
^~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp: In member function 'bool cv::DetectionBasedTracker::SeparateDetectionWork::communicateWithDetectingThread(const cv::Mat&, std::vector<cv::Rect_<int> >&)':
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:533:27: error: 'mutex' is not a member of 'std'
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:533:27: error: 'mutex' is not a member of 'std'
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:533:32: error: template argument 1 is invalid
std::unique_lock<std::mutex> mtx_lock(mtx);
^
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:533:43: error: 'mtx' was not declared in this scope
std::unique_lock<std::mutex> mtx_lock(mtx);
^~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:566:9: error: 'objectDetectorRun' was not declared in this scope
objectDetectorRun.notify_one();
^~~~~~~~~~~~~~~~~
E:\Application\opencv\opencv_source\modules\objdetect\src\detection_based_tracker.cpp:573:14: error: request for member 'unlock' in 'mtx_lock', which is of non-class type 'int'
mtx_lock.unlock();
^~~~~~
mingw32-make[2]: *** [modules\objdetect\CMakeFiles\opencv_objdetect.dir\build.make:119: modules/objdetect/CMakeFiles/opencv_objdetect.dir/src/detection_based_tracker.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:2118: modules/objdetect/CMakeFiles/opencv_objdetect.dir/all] Error 2
mingw32-make: *** [Makefile:162: all] Error 2
And here is my Cmake File:
General configuration for OpenCV 3.3.1-dev =====================================
Version control: unknown
Platform:
Timestamp: 2017-12-09T13:12:39Z
Host: Windows 10.0.16299 AMD64
CMake: 3.10.0
CMake generator: MinGW Makefiles
CMake build tool: E:/Application/mingw-w64/mingw64/bin/mingw32-make.exe
Configuration: Release
CPU/HW features:
Baseline: SSE SSE2 SSE3
requested: SSE3
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2
requested: SSE4_1 SSE4_2 AVX FP16 AVX2
SSE4_1 (3 files): + SSSE3 SSE4_1
SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (9 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
C/C++:
Built as dynamic libs?: YES
C++11: YES
C++ Compiler: E:/Application/mingw-w64/mingw64/bin/g++.exe (ver 7.2.0)
C++ flags (Release): -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 -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wno-implicit-fallthrough -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG
C++ flags (Debug): -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 -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -Wno-implicit-fallthrough -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG
C Compiler: E:/Application/mingw-w64/mingw64/bin/gcc.exe
C flags (Release): -std=gnu++11 ${CMAKE_CXX_FLAGS} -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wno-implicit-fallthrough -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG
C flags (Debug): -std=gnu++11 ${CMAKE_CXX_FLAGS} -fsigned-char -mstackrealign -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-narrowing -Wno-comment -Wno-implicit-fallthrough -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG
Linker flags (Release): -Wl,--gc-sections
Linker flags (Debug): -Wl,--gc-sections
ccache: NO
Precompiled headers: NO
Extra dependencies:
3rdparty dependencies:
OpenCV modules:
To be built: calib3d core dnn features2d flann highgui imgcodecs imgproc ml objdetect photo shape stitching superres ts video videoio videostab
Disabled: js world
Disabled by dependency: -
Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: NO
Windows RT support: NO
GUI:
Win32 UI: YES
VTK support: NO
Media I/O:
ZLib: build (ver 1.2.8)
JPEG: build (ver 90)
WEBP: build (ver encoder: 0x020e)
PNG: build (ver 1.6.24)
TIFF: build (ver 42 - 4.0.2)
JPEG 2000: build (ver 1.900.1)
OpenEXR: build (ver 1.7.1)
Video I/O:
Video for Windows: YES
DC1394: NO
FFMPEG: YES (prebuilt binaries)
avcodec: YES (ver 57.89.100)
avformat: YES (ver 57.71.100)
avutil: YES (ver 55.58.100)
swscale: YES (ver 4.6.100)
avresample: YES (ver 3.5.0)
GStreamer: NO
DirectShow: YES
Parallel framework: none
Trace: YES (built-in)
Other third-party libraries:
Lapack: NO
Eigen: NO
Custom HAL: NO
NVIDIA CUDA: NO
OpenCL: YES (no extra features)
Include path: E:/Application/opencv/opencv_source/3rdparty/include/opencl/1.2
Link libraries: Dynamic load
Python (for build): NO
Java:
ant: NO
JNI: E:/Application/Java/include E:/Application/Java/include/win32 E:/Application/Java/include
Java wrappers: NO
Java tests: NO
Matlab: NO
Install to: E:/Application/opencv/mingw-build/install
-----------------------------------------------------------------