jetsonhacks/buildOpenCVTX2

#error Please include the appropriate gl headers before including cuda_gl_interop.h

elpimous opened this issue · 4 comments

[ 37%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
In file included from /home/nvidia/opencv/modules/core/src/opengl.cpp:48:0:
/usr/local/cuda-9.0/include/cuda_gl_interop.h:64:2: error: #error Please include the appropriate gl headers before including cuda_gl_interop.h
 #error Please include the appropriate gl headers before including cuda_gl_interop.h
  ^
modules/core/CMakeFiles/opencv_core.dir/build.make:1289: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o' failed
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:1803: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

real	0m12.178s
user	0m20.228s
sys	0m3.204s
Make did not build 
Retrying ... 
[  0%] Built target gen-pkgconfig
[  7%] Built target libwebp
[ 11%] Built target IlmImf
[ 15%] Built target libprotobuf
[ 18%] Built target carotene_objs
[ 19%] Built target tegra_hal
[ 19%] Built target opencv_cudev
[ 19%] Built target opencv_ts_pch_dephelp
[ 19%] Built target pch_Generate_opencv_ts
[ 19%] Built target opencv_core_pch_dephelp
[ 20%] Built target pch_Generate_opencv_core
[ 20%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
In file included from /home/nvidia/opencv/modules/core/src/opengl.cpp:48:0:
/usr/local/cuda-9.0/include/cuda_gl_interop.h:64:2: error: #error Please include the appropriate gl headers before including cuda_gl_interop.h
 #error Please include the appropriate gl headers before including cuda_gl_interop.h
  ^
modules/core/CMakeFiles/opencv_core.dir/build.make:1289: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o' failed
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o] Error 1
CMakeFiles/Makefile2:1803: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
Make did not successfully build
Please fix issues and retry build

Hello,
Any idea ??
Thanks,
Vincent

There is not enough information about your build environment to provide help. For example, when filing an issue, you should state which machine you are compiling on and what version of L4T you are using.

Hi, Yes you're right ! I posted too fast !
board : TX2
L4T : L4T 28.2.1
command : sudo ./buildOpenCVTX2-master/buildOpenCV.sh

[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/parallel.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/lapack.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/arithm.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/split.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/mathfuncs.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/opencl/runtime/opencl_clamdfft.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/opencl/runtime/opencl_core.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/opencl/runtime/opencl_clamdblas.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/matrix_expressions.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/matrix_iterator.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/norm.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/lut.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stl.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/dxt.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 33%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/persistence_cpp.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/matrix_operations.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/matmul.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/channels.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/alloc.cpp.o
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/batch_distance.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/persistence_base64.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/mathfuncs_core.dispatch.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/softfloat.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/trace.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/stat.dispatch.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/count_non_zero.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
In file included from /home/nvidia/opencv/modules/core/src/opengl.cpp:48:0:
/usr/local/cuda-9.0/include/cuda_gl_interop.h:64:2: error: #error Please include the appropriate gl headers before including cuda_gl_interop.h
 #error Please include the appropriate gl headers before including cuda_gl_int
  ^
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/persistence_xml.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
modules/core/CMakeFiles/opencv_core.dir/build.make:1289: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o' failed
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:1753: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

real	7m54.680s
user	17m34.700s
sys	1m10.380s
Make did not build 
Retrying ... 
[  0%] Built target gen-pkgconfig
[  4%] Built target IlmImf
[  9%] Built target libprotobuf
[ 12%] Built target carotene_objs
[ 13%] Built target tegra_hal
[ 13%] Built target opencv_cudev
[ 13%] Built target opencv_ts_pch_dephelp
[ 13%] Built target pch_Generate_opencv_ts
[ 13%] Built target opencv_core_pch_dephelp
[ 13%] Built target pch_Generate_opencv_core
[ 13%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o
cc1plus: warning: /home/nvidia/opencv/build/modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
In file included from /home/nvidia/opencv/modules/core/src/opengl.cpp:48:0:
/usr/local/cuda-9.0/include/cuda_gl_interop.h:64:2: error: #error Please include the appropriate gl headers before including cuda_gl_interop.h
 #error Please include the appropriate gl headers before including cuda_gl_int
  ^
modules/core/CMakeFiles/opencv_core.dir/build.make:1289: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o' failed
make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/opengl.cpp.o] Error 1
CMakeFiles/Makefile2:1753: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
Make did not successfully build
Please fix issues and retry build

It does not appear as if you are in the correct directory when you start the build. Typically people are in the BuildOpenCVTX2 directory to start. Here's a video: https://youtu.be/n4MS72hnHAs

Yes, you are right.
Wrong directory name (.master)
Thanks a lot Jim.
Vincent