OpenCV and TBB error x64 - c++

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...

Related

fatal error: google/protobuf/port_def.inc: No such file or directory

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

Building gRPC from source using CMake in WSL (Ubuntu 18.04) yields missing `winsock2.h`

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 ?

Openpose failed on AWS Deep learning instance. Then which instance can 100% run it?

I have tried to build Openpose C++ source on AWS p3.2xlarge instance with AWS Deep Learning AMI https://aws.amazon.com/marketplace/pp/B077GCH38C?qid=1530671113739&sr=0-2&ref_=srh_res_product_title
The OS was Ubuntu 16.04 with almost all the prerequisites preinstalled (CUDA, cuDNN, OpenCV, Caffe).
I followed the official instruction in order to get it work.
https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md#operating-systems
This is the main error message I got when I tried to build it with cmake.
Does it mean that the GPU architecture is too new for openpose so that it can't compile? Anyone can explain the error I got?
nvcc fatal : Unsupported gpu architecture 'compute_70'
Is that any possibility of something wrong in the step before the build?
Finally I want to know what kind of environment really can run openpose, especially for AWS. Any report is appreciated.
The whole error message is here btw.
src/openpose/CMakeFiles/openpose.dir/build.make:63: recipe for target
'src/openpose/CMakeFiles/openpose.dir/hand/openpose_generated_renderHand.cu.o'
failed make[2]: *
[src/openpose/CMakeFiles/openpose.dir/hand/openpose_generated_renderHand.cu.o]
Error 1 make[2]: * Waiting for unfinished jobs.... nvcc fatal :
Unsupported gpu architecture 'compute_70' CMake Error at
openpose_generated_bodyPartConnectorBase.cu.o.cmake:207 (message):
Error generating
/home/ubuntu/openpose/build/src/openpose/CMakeFiles/openpose.dir/pose/./openpose_generated_bodyPartConnectorBase.cu.o
nvcc fatal : Unsupported gpu architecture 'compute_70'
src/openpose/CMakeFiles/openpose.dir/build.make:77: recipe for target
'src/openpose/CMakeFiles/openpose.dir/pose/openpose_generated_bodyPartConnectorBase.cu.o'
failed make[2]: ***
[src/openpose/CMakeFiles/openpose.dir/pose/openpose_generated_bodyPartConnectorBase.cu.o]
Error 1 CMake Error at openpose_generated_maximumBase.cu.o.cmake:207
(message): Error generating
/home/ubuntu/openpose/build/src/openpose/CMakeFiles/openpose.dir/net/./openpose_generated_maximumBase.cu.o
src/openpose/CMakeFiles/openpose.dir/build.make:98: recipe for target
'src/openpose/CMakeFiles/openpose.dir/net/openpose_generated_maximumBase.cu.o'
failed make[2]: ***
[src/openpose/CMakeFiles/openpose.dir/net/openpose_generated_maximumBase.cu.o]
Error 1 nvcc fatal : Unsupported gpu architecture 'compute_70' CMake
Error at openpose_generated_renderPose.cu.o.cmake:207 (message): Error
generating
/home/ubuntu/openpose/build/src/openpose/CMakeFiles/openpose.dir/pose/./openpose_generated_renderPose.cu.o
nvcc fatal : Unsupported gpu architecture 'compute_70' CMake Error at
openpose_generated_renderFace.cu.o.cmake:207 (message): Error
generating
/home/ubuntu/openpose/build/src/openpose/CMakeFiles/openpose.dir/face/./openpose_generated_renderFace.cu.o
src/openpose/CMakeFiles/openpose.dir/build.make:84: recipe for target
'src/openpose/CMakeFiles/openpose.dir/pose/openpose_generated_renderPose.cu.o'
failed make[2]: ***
[src/openpose/CMakeFiles/openpose.dir/pose/openpose_generated_renderPose.cu.o]
Error 1 nvcc fatal : Unsupported gpu architecture 'compute_70' CMake
Error at openpose_generated_resizeAndMergeBase.cu.o.cmake:207
(message): Error generating
/home/ubuntu/openpose/build/src/openpose/CMakeFiles/openpose.dir/net/./openpose_generated_resizeAndMergeBase.cu.o
src/openpose/CMakeFiles/openpose.dir/build.make:70: recipe for target
'src/openpose/CMakeFiles/openpose.dir/face/openpose_generated_renderFace.cu.o'
failed make[2]: *
[src/openpose/CMakeFiles/openpose.dir/face/openpose_generated_renderFace.cu.o]
Error 1 src/openpose/CMakeFiles/openpose.dir/build.make:112: recipe
for target
'src/openpose/CMakeFiles/openpose.dir/net/openpose_generated_resizeAndMergeBase.cu.o'
failed make[2]: *
[src/openpose/CMakeFiles/openpose.dir/net/openpose_generated_resizeAndMergeBase.cu.o]
Error 1 nvcc fatal : Unsupported gpu architecture 'compute_70' CMake
Error at openpose_generated_pyramidalLK.cu.o.cmake:207 (message):
Error generating
/home/ubuntu/openpose/build/src/openpose/CMakeFiles/openpose.dir/tracking/./openpose_generated_pyramidalLK.cu.o
src/openpose/CMakeFiles/openpose.dir/build.make:91: recipe for target
'src/openpose/CMakeFiles/openpose.dir/tracking/openpose_generated_pyramidalLK.cu.o'
failed make[2]: *
[src/openpose/CMakeFiles/openpose.dir/tracking/openpose_generated_pyramidalLK.cu.o]
Error 1 CMakeFiles/Makefile2:179: recipe for target
'src/openpose/CMakeFiles/openpose.dir/all' failed make[1]: *
[src/openpose/CMakeFiles/openpose.dir/all] Error 2 make[1]: ***
Waiting for unfinished jobs.... [ 8%] Building CXX object
src/openpose/filestream/CMakeFiles/openpose_filestream.dir/bvhSaver.cpp.o
Scanning dependencies of target openpose_gpu Scanning dependencies of
target openpose_thread [ 8%] Building NVCC (Device) object
src/openpose/hand/CMakeFiles/openpose_hand.dir/openpose_hand_generated_renderHand.cu.o
[ 9%] Building NVCC (Device) object
src/openpose/face/CMakeFiles/openpose_face.dir/openpose_face_generated_renderFace.cu.o
Scanning dependencies of target openpose_calibration [ 9%] Building
CXX object
src/openpose/filestream/CMakeFiles/openpose_filestream.dir/cocoJsonSaver.cpp.o
[ 9%] Building CXX object
src/openpose/filestream/CMakeFiles/openpose_filestream.dir/defineTemplates.cpp.o
[ 10%] Building CXX object
src/openpose/thread/CMakeFiles/openpose_thread.dir/defineTemplates.cpp.o
[ 11%] Building CXX object
src/openpose/calibration/CMakeFiles/openpose_calibration.dir/cameraParameterEstimation.cpp.o
[ 11%] Building CXX object
src/openpose/calibration/CMakeFiles/openpose_calibration.dir/gridPatternFunctions.cpp.o
nvcc fatal : Unsupported gpu architecture 'compute_70' CMake Error at
openpose_hand_generated_renderHand.cu.o.cmake:207 (message): Error
generating
/home/ubuntu/openpose/build/src/openpose/hand/CMakeFiles/openpose_hand.dir//./openpose_hand_generated_renderHand.cu.o
nvcc fatal : Unsupported gpu architecture 'compute_70' CMake Error at
openpose_face_generated_renderFace.cu.o.cmake:207 (message): Error
generating
/home/ubuntu/openpose/build/src/openpose/face/CMakeFiles/openpose_face.dir//./openpose_face_generated_renderFace.cu.o
src/openpose/hand/CMakeFiles/openpose_hand.dir/build.make:63: recipe
for target
'src/openpose/hand/CMakeFiles/openpose_hand.dir/openpose_hand_generated_renderHand.cu.o'
failed make[2]: *
[src/openpose/hand/CMakeFiles/openpose_hand.dir/openpose_hand_generated_renderHand.cu.o]
Error 1 CMakeFiles/Makefile2:344: recipe for target
'src/openpose/hand/CMakeFiles/openpose_hand.dir/all' failed make[1]: *
[src/openpose/hand/CMakeFiles/openpose_hand.dir/all] Error 2
src/openpose/face/CMakeFiles/openpose_face.dir/build.make:63: recipe
for target
'src/openpose/face/CMakeFiles/openpose_face.dir/openpose_face_generated_renderFace.cu.o'
failed make[2]: *
[src/openpose/face/CMakeFiles/openpose_face.dir/openpose_face_generated_renderFace.cu.o]
Error 1 CMakeFiles/Makefile2:456: recipe for target
'src/openpose/face/CMakeFiles/openpose_face.dir/all' failed make[1]:
[src/openpose/face/CMakeFiles/openpose_face.dir/all] Error 2 [ 12%]
Building CXX object
src/openpose/filestream/CMakeFiles/openpose_filestream.dir/fileSaver.cpp.o
[ 12%] Building CXX object
src/openpose/filestream/CMakeFiles/openpose_filestream.dir/fileStream.cpp.o
[ 12%] Building CXX object
src/openpose/gpu/CMakeFiles/openpose_gpu.dir/cuda.cpp.o In file
included from
/home/ubuntu/openpose/include/openpose/filestream/headers.hpp:9:0,
from
/home/ubuntu/openpose/src/openpose/filestream/defineTemplates.cpp:1:
/home/ubuntu/openpose/include/openpose/filestream/fileStream.hpp:54:32:
error: ‘CV_IMWRITE_JPEG_QUALITY’ was not declared in this scope =
{CV_IMWRITE_JPEG_QUALITY, 100, CV_IMWRITE_PNG_COMPRESSION, 9}); ^
compilation terminated due to -Wfatal-errors.
src/openpose/filestream/CMakeFiles/openpose_filestream.dir/build.make:110:
recipe for target
'src/openpose/filestream/CMakeFiles/openpose_filestream.dir/defineTemplates.cpp.o'
failed make[2]:
[src/openpose/filestream/CMakeFiles/openpose_filestream.dir/defineTemplates.cpp.o]
Error 1 make[2]: Waiting for unfinished jobs.... [ 13%] Building CXX
object src/openpose/gpu/CMakeFiles/openpose_gpu.dir/gpu.cpp.o In file
included from
/home/ubuntu/openpose/src/openpose/filestream/fileStream.cpp:7:0:
/home/ubuntu/openpose/include/openpose/filestream/fileStream.hpp:54:32:
error: ‘CV_IMWRITE_JPEG_QUALITY’ was not declared in this scope =
{CV_IMWRITE_JPEG_QUALITY, 100, CV_IMWRITE_PNG_COMPRESSION, 9}); ^
compilation terminated due to -Wfatal-errors.
src/openpose/filestream/CMakeFiles/openpose_filestream.dir/build.make:158:
recipe for target
'src/openpose/filestream/CMakeFiles/openpose_filestream.dir/fileStream.cpp.o'
failed make[2]:
[src/openpose/filestream/CMakeFiles/openpose_filestream.dir/fileStream.cpp.o]
Error 1 [ 13%] Building CXX object
src/openpose/gpu/CMakeFiles/openpose_gpu.dir/opencl.cpp.o
CMakeFiles/Makefile2:234: recipe for target
'src/openpose/filestream/CMakeFiles/openpose_filestream.dir/all'
failed make[1]:
[src/openpose/filestream/CMakeFiles/openpose_filestream.dir/all] Error
2 In file included from
/home/ubuntu/openpose/src/openpose/calibration/cameraParameterEstimation.cpp:11:0:
/home/ubuntu/openpose/include/openpose/filestream/fileStream.hpp:54:32:
error: ‘CV_IMWRITE_JPEG_QUALITY’ was not declared in this scope =
{CV_IMWRITE_JPEG_QUALITY, 100, CV_IMWRITE_PNG_COMPRESSION, 9}); ^
compilation terminated due to -Wfatal-errors.
src/openpose/calibration/CMakeFiles/openpose_calibration.dir/build.make:62:
recipe for target
'src/openpose/calibration/CMakeFiles/openpose_calibration.dir/cameraParameterEstimation.cpp.o'
failed make[2]:
[src/openpose/calibration/CMakeFiles/openpose_calibration.dir/cameraParameterEstimation.cpp.o]
Error 1 make[2]: Waiting for unfinished jobs....
/home/ubuntu/openpose/src/openpose/calibration/gridPatternFunctions.cpp:
In function ‘void
op::improveCornersPositionsAtSubPixelLevel(std::vector >&, const
cv::Mat&)’:
/home/ubuntu/openpose/src/openpose/calibration/gridPatternFunctions.cpp:22:52:
error: ‘CV_TERMCRIT_EPS’ was not declared in this scope
cv::TermCriteria{ CV_TERMCRIT_EPS+CV_TERMCRIT_ITER, 1000, 1e-9 }); ^
compilation terminated due to -Wfatal-errors.
src/openpose/calibration/CMakeFiles/openpose_calibration.dir/build.make:86:
recipe for target
'src/openpose/calibration/CMakeFiles/openpose_calibration.dir/gridPatternFunctions.cpp.o'
failed make[2]:
[src/openpose/calibration/CMakeFiles/openpose_calibration.dir/gridPatternFunctions.cpp.o]
Error 1 CMakeFiles/Makefile2:511: recipe for target
'src/openpose/calibration/CMakeFiles/openpose_calibration.dir/all'
failed make[1]: *
[src/openpose/calibration/CMakeFiles/openpose_calibration.dir/all]
Error 2 [ 13%] Linking CXX shared library libopenpose_gpu.so [ 13%]
Built target openpose_gpu [ 13%] Linking CXX shared library
libopenpose_thread.so [ 13%] Built target openpose_thread
Makefile:127: recipe for target 'all' failed make: *** [all] Error 2
AWS p3 instance has Tesla V100 that require CUDA 9 and later.
But OpenPose require CUDA 8.
If you want to use OpenPose on AWS, you have to use p2 instance.

I want to know this cause and solution

[ 6%] Built target ChainedLib
[ 12%] Built target ChainedApp
[ 15%] Linking CXX executable ColorConsole
/usr/bin/ld: cannot open output file ColorConsole: Is a directory
collect2: error: ld returned 1 exit status
make[2]: *** [ColorConsole] 오류 1
make[1]: *** [CMakeFiles/ColorConsole.dir/all] 오류 2
make: *** [all] 오류 2
I install plog library.
cmake CMakeList.txt complete. but, makefile is fail
I don't know cause
You have a directory called ColorConsole. The makefile tries to produce a file with that name. The solution is most likely to remove (or rename) the directory.

How to run googletest in CLion?

I want to use Googletest in my CLion Project.
So here is what I did:
I copied my googletest folder into the lib folder of my project.
I changed my CMakeLists.txt files like described in that Video: https://youtu.be/8Up5eNZ0FLw
and created that simple test:
#include "gtest/gtest.h"
TEST(basic_check, test_eq){
EXPECT_EQ(1,0);
}
I tried to run the test by pressing Shift + Ctrl + F10 and I got the following error:
"F:\Programs\CLion 2016.3\bin\cmake\bin\cmake.exe" --build C:\Users\Christian\ClionProjects\Geldautomat\cmake-build-debug --target runBasicTests -- -j 4
[ 16%] Building CXX object Tests/lib/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.obj
In file included from C:/Users/Christian/ClionProjects/Geldautomat/Tests/lib/googletest/include/gtest/internal/gtest-internal.h:40:0,
from C:/Users/Christian/ClionProjects/Geldautomat/Tests/lib/googletest/include/gtest/gtest.h:58,
from C:\Users\Christian\ClionProjects\Geldautomat\Tests\lib\googletest\src\gtest-all.cc:39:
C:/Users/Christian/ClionProjects/Geldautomat/Tests/lib/googletest/include/gtest/internal/gtest-port.h: In function 'int testing::internal::posix::StrCaseCmp(const char*, const char*)':
C:/Users/Christian/ClionProjects/Geldautomat/Tests/lib/googletest/include/gtest/internal/gtest-port.h:2328:25: error: '_stricmp' was not declared in this scope
return _stricmp(s1, s2);
^
mingw32-make.exe[3]: *** [Tests/lib/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.obj] Error 1
mingw32-make.exe[2]: *** [Tests/lib/googletest/CMakeFiles/gtest.dir/all] Error 2
mingw32-make.exe[1]: *** [Tests/basic_tests/CMakeFiles/runBasicTests.dir/rule] Error 2
mingw32-make.exe: *** [runBasicTests] Error 2
Tests\lib\googletest\CMakeFiles\gtest.dir\build.make:62: recipe for target 'Tests/lib/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.obj' failed
CMakeFiles\Makefile2:162: recipe for target 'Tests/lib/googletest/CMakeFiles/gtest.dir/all' failed
CMakeFiles\Makefile2:267: recipe for target 'Tests/basic_tests/CMakeFiles/runBasicTests.dir/rule' failed
Makefile:200: recipe for target 'runBasicTests' failed
My CMakeLists.txt in this directory is:
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
add_executable(runBasicTests
basic_check.cpp)
target_link_libraries(runBasicTests gtest gtest_main)
target_link_libraries(runBasicTests src)
Where my Source Code can be found in directory src.
My main.cpp is in the root directory and my Basic Test is in Tests/basic_tests
Tried the same on my Linux Notebook with CLion. Got the Error:
/home/christian/Downloads/clion-2016.3/bin/cmake/bin/cmake --build /home/christian/ClionProjects/Geldautomat/cmake-build-debug --target runBasicTests -- -j 4
Scanning dependencies of target gtest
[ 16%] Building CXX object Tests/lib/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 33%] Linking CXX static library libgtest.a
[ 33%] Built target gtest
Scanning dependencies of target gtest_main
[ 50%] Building CXX object Tests/lib/googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[ 66%] Linking CXX static library libgtest_main.a
[ 66%] Built target gtest_main
Scanning dependencies of target runBasicTests
[ 83%] Building CXX object Tests/basic_tests/CMakeFiles/runBasicTests.dir/basic_check.cpp.o
[100%] Linking CXX executable runBasicTests
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lsrc
collect2: error: ld returned 1 exit status
Tests/basic_tests/CMakeFiles/runBasicTests.dir/build.make:97: recipe for target 'Tests/basic_tests/runBasicTests' failed
gmake[3]: *** [Tests/basic_tests/runBasicTests] Error 1
CMakeFiles/Makefile2:256: recipe for target 'Tests/basic_tests/CMakeFiles/runBasicTests.dir/all' failed
gmake[2]: *** [Tests/basic_tests/CMakeFiles/runBasicTests.dir/all] Error 2
CMakeFiles/Makefile2:268: recipe for target 'Tests/basic_tests/CMakeFiles/runBasicTests.dir/rule' failed
gmake[1]: *** [Tests/basic_tests/CMakeFiles/runBasicTests.dir/rule] Error 2
Makefile:201: recipe for target 'runBasicTests' failed
gmake: *** [runBasicTests] Error 2
It would be fine if my Project runs on Linux..
Any suggestions?
-ChrizZ
You can follow this link ->
https://www.youtube.com/channel/UCvHU1FkIE-ogFTtXnKZsqWA
There are 2 videos. Both are helpful. I set up googleTest in my CLion yesterday following the 8:19 long video.