Building OpenCV with OpenGL support ?

Hi,

I apologize if this question has already been asked and answered. For some reason, the forum search is not working for me today.

My problem is that I can’t build OpenCV on Jetson TX2 with OpenGL support enabled.

I installed libgtkglext1 and libgtkglext1-dev, then ran cmake like this:

cmake -DWITH_CUDA=ON -DCUDA_ARCH_BIN=“6.0” -DCUDA_ARCH_PTX=“” -DCMAKE_BUILD_TYPE=RELEASE -DWITH_CUBLAS=ON -DENABLE_FAST_MATH=ON -DCUDA_FAST_MATH=ON -DWITH_OPENGL=ON -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF …

However, we I make -j8, I got the following error and the build failed.

[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/opengl_interop.cpp.o
[ 34%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/matop.cpp.o
In file included from /home/nvidia/opencv-2.4.13/modules/core/src/opengl_interop.cpp:52:0:
/usr/local/cuda-8.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
^

Why is this happening? Am I missing something, or is OpenGL support for OpenCV not ready yet for Jetson TX2?

Thanks,
Robby

Hi,

Thanks for your question.

We are working on this issue.
We first try to compile a cuda sample that also includes ‘cuda_gl_interop.h’ but found it built without error.
So need to dig into opencv source for more information.

Will update information to you later
Sorry for any inconvenience.

Hi,

Please apply this patch.
In ‘/usr/local/cuda-8.0/include/cuda_gl_interop.h’

diff --git a/cuda_gl_interop.h b/cuda_gl_interop.h
index 0f4aa17..e8c538c 100644
--- a/cuda_gl_interop.h
+++ b/cuda_gl_interop.h
@@ -59,13 +59,13 @@
 
 #else /* __APPLE__ */
 
-#if defined(__arm__) || defined(__aarch64__)
-#ifndef GL_VERSION
-#error Please include the appropriate gl headers before including cuda_gl_interop.h
-#endif
-#else
+//#if defined(__arm__) || defined(__aarch64__)
+//#ifndef GL_VERSION
+//#error Please include the appropriate gl headers before including cuda_gl_interop.h
+//#endif
+//#else
 #include <GL/gl.h>
-#endif
+//#endif
 
 #endif /* __APPLE__ */

If you meet following error:

/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmMap'
/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmCloseOnce'
/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmUnmap'
/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmOpenOnce'

Please try this command:

cd /usr/lib/aarch64-linux-gnu/
sudo ln -sf tegra/libGL.so libGL.so

Thanks and please let us know the results.

Thanks for the timely patch.

I applied the changes to the header; I did not encounter the linker errors related to libGL.so, so I didn’t apply the 2nd suggested change. Now my code “namedWindow(“image”, WINDOW_AUTOSIZE | WINDOW_OPENgl);” works.

-Robby

FYI - This is still broken on CUDA 9.0 that installs with Jetpack 3.2 that was released today…

:(

Are you sure you’ve configured and build from scratch ?
I haven’t used today’s release but R28.2-DP2 from March, 2nd, and built opencv-3.4.1 with OpenGL support without having to patch any file (not used openGL backend from opencv yet, though).

[EDIT: Let me check… Seems OpenGL support has silently been disabled. I have configured with cmake-gui…]

I am not able to configure in a way it enables openGL support. Tried a new build without cmake-gui:

nvidia@tegra-ubuntu:/media/nvidia/Data/opencv/opencv-3.4.1/build/TX2-R28.2-DP2-cmake-no-gui$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv-3.4.1 -D WITH_CUDA=ON -D CUDA_ARCH_BIN="6.2" -D CUDA_ARCH_PTX="" -D WITH_CUBLAS=ON -D ENABLE_FAST_MATH=ON -D CUDA_FAST_MATH=ON -D ENABLE_NEON=ON -D WITH_LIBV4L=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D WITH_OPENGL=ON ../../opencv-3.4.1
-- Looking for ccache - found (/usr/bin/ccache)
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found suitable version "1.2.8", minimum required is "1.2.3") 
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found version "1.2.8") 
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for module 'libgphoto2'
--   No package 'libgphoto2' found
-- CUDA detected: 9.0
-- CUDA NVCC target flags: -gencode;arch=compute_62,code=sm_62;-D_FORCE_INLINES
-- Found OpenBLAS libraries: /usr/lib/libopenblas.so
-- Found OpenBLAS include: /usr/include
-- LAPACK(OpenBLAS): LAPACK_LIBRARIES: /usr/lib/libopenblas.so
CMake Warning at cmake/OpenCVFindLAPACK.cmake:29 (message):
  LAPACK(OpenBLAS): CBLAS/LAPACK headers are not found in '/usr/include'
Call Stack (most recent call first):
  cmake/OpenCVFindLAPACK.cmake:97 (ocv_lapack_check)
  CMakeLists.txt:638 (include)


-- Could NOT find Atlas (missing:  Atlas_CLAPACK_INCLUDE_DIR) 
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- Could NOT find JNI (missing:  JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
-- Could NOT find Matlab (missing:  MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Excluding from source files list: modules/core/src/convert.avx2.cpp
-- Excluding from source files list: modules/core/src/convert.sse4_1.cpp
-- Excluding from source files list: modules/imgproc/src/undistort.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/filter.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/corner.avx.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.sse4_1.cpp
-- Excluding from source files list: modules/imgproc/src/resize.sse4_1.cpp
-- Excluding from source files list: modules/imgproc/src/resize.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.avx2.cpp
-- Excluding from source files list: modules/objdetect/src/haar.avx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx2.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.avx512_skx.cpp
-- Excluding from source files list: modules/features2d/src/fast.avx2.cpp
-- 
-- General configuration for OpenCV 3.4.1 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Timestamp:                   2018-03-14T22:27:40Z
--     Host:                        Linux 4.4.38-tegra aarch64
--     CMake:                       3.5.1
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
-- 
--   CPU/HW features:
--     Baseline:                    NEON FP16
--       required:                  NEON
--       disabled:                  VFPV3
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 5.4.0)
--     C++ flags (Release):         -fsigned-char -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 -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -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 -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -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 -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -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 -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     ccache:                      YES
--     Precompiled headers:         NO
--     Extra dependencies:          dl m pthread rt cudart nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda-9.0/lib64
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 calib3d core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev dnn features2d flann highgui imgcodecs imgproc java_bindings_generator ml objdetect photo python2 python_bindings_generator shape stitching superres video videoio videostab
--     Disabled:                    js world
--     Disabled by dependency:      -
--     Unavailable:                 java python3 ts viz
--     Applications:                apps
--     Documentation:               NO
--     Non-free algorithms:         NO
-- 
--   GUI: 
--     GTK+:                        YES (ver 3.18.9)
--       GThread :                  YES (ver 2.48.2)
--       GtkGlExt:                  NO
<b>--     OpenGL support:              NO</b>
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/aarch64-linux-gnu/libz.so (ver 1.2.8)
--     JPEG:                        /usr/lib/aarch64-linux-gnu/libjpeg.so (ver )
--     WEBP:                        build (ver encoder: 0x020e)
--     PNG:                         /usr/lib/aarch64-linux-gnu/libpng.so (ver 1.2.54)
--     TIFF:                        /usr/lib/aarch64-linux-gnu/libtiff.so (ver 42 / 4.0.6)
--     JPEG 2000:                   /usr/lib/aarch64-linux-gnu/libjasper.so (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
-- 
--   Video I/O:
--     DC1394:                      YES (ver 2.2.4)
--     FFMPEG:                      YES
--       avcodec:                   YES (ver 56.60.100)
--       avformat:                  YES (ver 56.40.101)
--       avutil:                    YES (ver 54.31.100)
--       swscale:                   YES (ver 3.1.101)
--       avresample:                YES (ver 2.1.0)
--     GStreamer:                   
--       base:                      YES (ver 1.8.3)
--       video:                     YES (ver 1.8.3)
--       app:                       YES (ver 1.8.3)
--       riff:                      YES (ver 1.8.3)
--       pbutils:                   YES (ver 1.8.3)
--     libv4l/libv4l2:              1.10.0 / 1.10.0
--     v4l/v4l2:                    linux/videodev2.h
--     gPhoto2:                     NO
-- 
--   Parallel framework:            pthreads
-- 
--   Trace:                         YES (built-in)
-- 
--   Other third-party libraries:
--     Lapack:                      NO
--     Eigen:                       YES (ver 3.2.92)
--     Custom HAL:                  YES (carotene (ver 0.0.1))
--     Protobuf:                    build (3.5.1)
-- 
--   NVIDIA CUDA:                   YES (ver 9.0, CUFFT CUBLAS FAST_MATH)
--     NVIDIA GPU arch:             62
--     NVIDIA PTX archs:
-- 
--   OpenCL:                        YES (no extra features)
--     Include path:                /media/nvidia/Data/opencv/opencv-3.4.1/opencv-3.4.1/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.12)
--     Libraries:                   /usr/lib/aarch64-linux-gnu/libpython2.7.so (ver 2.7.12)
--     numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.11.0)
--     packages path:               lib/python2.7/dist-packages
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:                          
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Matlab:                        NO
-- 
--   Install to:                    /usr/local/opencv-3.4.1
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /media/nvidia/Data/opencv/opencv-3.4.1/build/TX2-R28.2-DP2-cmake-no-gui

Yes - I downloaded the brand new released 3.2 JetPack and tried to build OpenCV from scratch…

Does NOT work… I’ll copy/paste the errors in here when I get to work this morning.

Appologies for the time spent.

I have been confused because I had not enabled QT backend support and this leads to silently disable OpenGL support.

I confirm your findings, patching cuda_gl_interop.h is still required.

I wonder too why NVIDIA keeps the original file while this problem is known. Would that patch make any other software fail to build ?

It also failed to build on my TX2 with the “samples” ON… I had to also disable samples.

Seems like some samples are using that same include file, but they break with that patch.

It seems to work with samples off and the patch and completed compiling and installing, I will do some tests to see what else (if any) breaks while using it…

I have the same question as to why continue to ship it broken.

my guess is NVidia doesnt really want you to use OpenCV (Hence not shipping CUDA and CuDNN compiled OpenCV with JetPack 3.2) and would rather you use VisionWorks, so there is really not much incentive for them to fix it.

With CUDA 9.0, which lines in thee file need editing?

Thanks in advance.

EDIT: Solved

For anyone else facing this problem on latest JetPack 3.2,

Edit the file: “/usr/local/cuda-8.0/include/cuda_gl_interop.h”

Find the code:

#else /* __APPLE__ */

It should be around line 7… then replace all the If Def’s with the following to force include of GL/gl.h

#else /* __APPLE__ */
 
 #include <GL/gl.h>
 
 #endif /* __APPLE__ */

And then when building OpenCV, make sure you build with BUILD_EXAMPLE OFF

This worked perfect for me.

I am a bit confused with all this:

  1. JetPack 3.2 comes with CUDA 9.0 prebuild right? Then why is here still the talk of "/usr/local/cuda-8.0/..."
  2. It also comes with OpenCV 3.3.1, but you are talking about porblems you face when you delete it and rebuild it from source right?
  3. I face these errors when i want to build librealsense from source to use a intel realsense d435 camera:
    [ 62%] Linking CXX executable rs-pointcloud
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmCloseOnce'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmMap'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmUnmap'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmGetDevices2'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmFreeDevice'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmOpenOnce'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmGetDevice2'
    /usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmFreeDevices'
    collect2: error: ld returned 1 exit status
    examples/pointcloud/CMakeFiles/rs-pointcloud.dir/build.make:98: recipe for target 'examples/pointcloud/rs-pointcloud' failed
    make[2]: *** [examples/pointcloud/rs-pointcloud] Error 1
    CMakeFiles/Makefile2:480: recipe for target 'examples/pointcloud/CMakeFiles/rs-pointcloud.dir/all' failed
    make[1]: *** [examples/pointcloud/CMakeFiles/rs-pointcloud.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    
  4. So when and what needs to be done? Is deleting and rebuilding openCV not trivial possible or what? Do i need to make these changes in order to be able to rebuild openCV?
  1. JetPack 3.2 should only install cuda-9.0. If you get cuda8, there is a problem. I’d advise to download again JetPack3.2 and redo the install in a new folder (reusing an old JetPack folder may lead to problems).

  2. The opencv-3.3.1 included in JetPack-3.2 has no gstreamer support and no CUDA support (and no OpenGL support).

  3. You may have installed another version of libGL. Try this:

cd /usr/lib/aarch64-linux-gnu/
sudo ln -sf tegra/libGL.so libGL.so
  1. It is possible to build and install your own opencv version. I’m currently using 3.4.1. You may find some instructions from https://jkjung-avt.github.io/opencv3-on-tx2/.

I just installed JetPack 3.2.1 on my Jetson TX2 and the patch is still required for install of OpenCV 3.4.x

See comment #3 above for solution

OpenCV install…follow instructions from How to Install OpenCV (3.4.0) on Jetson TX2 (as others have pointed out).

this error still persists in jetpack 3.3, the patch suggested enables opencv compilation with opengl support.

does it work at Xavier?

Build configuration: 
 NVIDIA Jetson 
 Operating System:  [Jetpack ]
 Current OpenCV Installation: 
 OpenCV binaries will be installed in: /usr/local
 OpenCV Source will be installed in: /home/nvidia
'universe' distribution component is already enabled for all sources.
Get:1 file:/var/cuda-repo-10-0-local-10.0.166  InRelease
Ign:1 file:/var/cuda-repo-10-0-local-10.0.166  InRelease
Get:2 file:/var/visionworks-repo  InRelease
Ign:2 file:/var/visionworks-repo  InRelease
Get:3 file:/var/visionworks-sfm-repo  InRelease
Ign:3 file:/var/visionworks-sfm-repo  InRelease
Get:4 file:/var/visionworks-tracking-repo  InRelease
Ign:4 file:/var/visionworks-tracking-repo  InRelease
Get:5 file:/var/cuda-repo-10-0-local-10.0.166  Release [574 B]
Get:6 file:/var/visionworks-repo  Release [1,999 B]
Get:7 file:/var/visionworks-sfm-repo  Release [2,003 B]                       
Get:5 file:/var/cuda-repo-10-0-local-10.0.166  Release [574 B]                
Get:8 file:/var/visionworks-tracking-repo  Release [2,008 B]                
Get:6 file:/var/visionworks-repo  Release [1,999 B]                         
Get:7 file:/var/visionworks-sfm-repo  Release [2,003 B]                       
Get:8 file:/var/visionworks-tracking-repo  Release [2,008 B]                   
Hit:9 http://ports.ubuntu.com/ubuntu-ports bionic InRelease                    
Hit:11 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease           
Hit:12 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease         
Hit:14 http://packages.cloud.google.com/apt cloud-sdk-bionic InRelease   
Hit:15 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease    
Reading package lists... Done                      
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cmake is already the newest version (3.10.2-1ubuntu2).
libgtk2.0-dev is already the newest version (2.24.32-1ubuntu1).
libjpeg-dev is already the newest version (8c-2ubuntu8).
libv4l-dev is already the newest version (1.14.2-1).
pkg-config is already the newest version (0.29.1-0ubuntu2).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).
libeigen3-dev is already the newest version (3.3.4-4).
libglew-dev is already the newest version (2.0.0-5).
libtbb-dev is already the newest version (2017~U7-8).
libx264-dev is already the newest version (2:0.152.2854+gite9a5903-2).
libxvidcore-dev is already the newest version (2:1.3.5-1).
libgl1 is already the newest version (1.0.0-2ubuntu2.3).
libglvnd-dev is already the newest version (1.0.0-2ubuntu2.3).
libgtk-3-dev is already the newest version (3.22.30-1ubuntu3).
libpng-dev is already the newest version (1.6.34-1ubuntu0.18.04.2).
libtiff5-dev is already the newest version (4.0.9-5ubuntu0.2).
libavcodec-dev is already the newest version (7:3.4.6-0ubuntu0.18.04.1).
libavformat-dev is already the newest version (7:3.4.6-0ubuntu0.18.04.1).
libavutil-dev is already the newest version (7:3.4.6-0ubuntu0.18.04.1).
libpostproc-dev is already the newest version (7:3.4.6-0ubuntu0.18.04.1).
libswscale-dev is already the newest version (7:3.4.6-0ubuntu0.18.04.1).
qt5-default is already the newest version (5.9.5+dfsg-0ubuntu2.1).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
patching file cuda_gl_interop.h
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file cuda_gl_interop.h.rej
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-dev is already the newest version (2.7.15~rc1-1).
python-numpy is already the newest version (1:1.13.3-2ubuntu1).
python-py is already the newest version (1.5.2-1).
python-pytest is already the newest version (3.3.2-2).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-numpy is already the newest version (1:1.13.3-2ubuntu1).
python3-py is already the newest version (1.5.2-1).
python3-pytest is already the newest version (3.3.2-2).
python3-dev is already the newest version (3.6.7-1~18.04).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libgstreamer-plugins-base1.0-dev is already the newest version (1.14.1-1ubuntu1~ubuntu18.04.2).
libgstreamer1.0-dev is already the newest version (1.14.1-1~ubuntu18.04.2).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
fatal: destination path 'opencv' already exists and is not an empty directory.
fatal: A branch named 'v3.4.2' already exists.
mkdir: cannot create directory ‘build’: File exists
-- Looking for ccache - not found
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found suitable version "1.2.11", minimum required is "1.2.3") 
-- Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR) 
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found version "1.2.11") 
CMake Warning (dev) at /usr/local/share/cmake-3.15/Modules/FindOpenGL.cmake:275 (message):
  Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when
  available.  Run "cmake --help-policy CMP0072" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  FindOpenGL found both a legacy GL library:

    OPENGL_gl_LIBRARY: /usr/lib/aarch64-linux-gnu/libGL.so

  and GLVND libraries for OpenGL and GLX:

    OPENGL_opengl_LIBRARY: /usr/lib/aarch64-linux-gnu/libOpenGL.so
    OPENGL_glx_LIBRARY: /usr/lib/aarch64-linux-gnu/libGLX.so

  OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for
  compatibility with CMake 3.10 and below the legacy GL library will be used.
Call Stack (most recent call first):
  cmake/OpenCVFindLibsGUI.cmake:70 (find_package)
  CMakeLists.txt:632 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Checking for module 'libdc1394-2'
--   No package 'libdc1394-2' found
-- Checking for module 'libdc1394'
--   No package 'libdc1394' found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Checking for module 'libavresample'
--   No package 'libavresample' found
-- Checking for module 'libgphoto2'
--   No package 'libgphoto2' found
-- Found TBB (env): /usr/lib/aarch64-linux-gnu/libtbb.so
-- CUDA detected: 10.0
-- CUDA NVCC target flags: --expt-relaxed-constexpr;-gencode;arch=compute_72,code=sm_72;-D_FORCE_INLINES
-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Could NOT find Atlas (missing: Atlas_CLAPACK_INCLUDE_DIR Atlas_CBLAS_LIBRARY Atlas_BLAS_LIBRARY) 
-- A library with LAPACK API found.
-- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
-- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Using whitelist: opencv_aruco;opencv_calib3d;opencv_core;opencv_cudaarithm;opencv_cudabgsegm;opencv_cudacodec;opencv_cudafeatures2d;opencv_cudafilters;opencv_cudaimgproc;opencv_cudalegacy;opencv_cudaobjdetect;opencv_cudaoptflow;opencv_cudastereo;opencv_cudawarping;opencv_cudev;opencv_features2d;opencv_flann;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_java_bindings_generator;opencv_ml;opencv_objdetect;opencv_photo;opencv_python2;opencv_python3;opencv_python_bindings_generator;opencv_shape;opencv_stitching;opencv_superres;opencv_ts;opencv_video;opencv_videoio;opencv_videostab
-- Module opencv_dnn disabled by whitelist
-- Excluding from source files list: modules/core/src/convert.avx2.cpp
-- Excluding from source files list: modules/core/src/convert.sse4_1.cpp
-- Excluding from source files list: modules/imgproc/src/corner.avx.cpp
-- Excluding from source files list: modules/imgproc/src/filter.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/imgwarp.sse4_1.cpp
-- Excluding from source files list: modules/imgproc/src/resize.avx2.cpp
-- Excluding from source files list: modules/imgproc/src/resize.sse4_1.cpp
-- Excluding from source files list: modules/imgproc/src/undistort.avx2.cpp
-- Excluding from source files list: modules/objdetect/src/haar.avx.cpp
-- Excluding from source files list: modules/features2d/src/fast.avx2.cpp
-- 
-- General configuration for OpenCV 3.4.2 =====================================
--   Version control:               3.4.2
-- 
--   Extra modules:
--     Location (extra):            /home/nvidia/opencv_contrib/modules
--     Version control (extra):     unknown
-- 
--   Platform:
--     Timestamp:                   2019-06-19T06:22:44Z
--     Host:                        Linux 4.9.140-tegra aarch64
--     CMake:                       3.15.20190608-g0e96fd
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
-- 
--   CPU/HW features:
--     Baseline:                    NEON FP16
--       required:                  NEON
--       disabled:                  VFPV3
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++11:                       YES
--     C++ Compiler:                /usr/bin/c++  (ver 7.4.0)
--     C++ flags (Release):         -fsigned-char -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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -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 -Wimplicit-fallthrough=3 -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections    -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     ccache:                      NO
--     Precompiled headers:         YES
--     Extra dependencies:          dl m pthread rt /usr/lib/aarch64-linux-gnu/libGL.so /usr/lib/aarch64-linux-gnu/libGLU.so cudart nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda-10.0/lib64
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 aruco calib3d core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev features2d flann highgui imgcodecs imgproc java_bindings_generator ml objdetect photo python2 python3 python_bindings_generator shape stitching superres ts video videoio videostab
--     Disabled:                    js world
--     Disabled by dependency:      dnn
--     Unavailable:                 java viz
--     Applications:                tests perf_tests apps
--     Documentation:               NO
--     Non-free algorithms:         NO
-- 
--   GUI: 
--     QT:                          YES (ver 5.9.5)
--       QT OpenGL support:         YES (Qt5::OpenGL 5.9.5)
--     GTK+:                        NO
--     OpenGL support:              YES (/usr/lib/aarch64-linux-gnu/libGL.so /usr/lib/aarch64-linux-gnu/libGLU.so)
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/aarch64-linux-gnu/libz.so (ver 1.2.11)
--     JPEG:                        /usr/lib/aarch64-linux-gnu/libjpeg.so (ver 80)
--     WEBP:                        /usr/lib/aarch64-linux-gnu/libwebp.so (ver encoder: 0x020e)
--     PNG:                         /usr/lib/aarch64-linux-gnu/libpng.so (ver 1.6.34)
--     TIFF:                        /usr/lib/aarch64-linux-gnu/libtiff.so (ver 42 / 4.0.9)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
-- 
--   Video I/O:
--     DC1394:                      NO
--     FFMPEG:                      YES
--       avcodec:                   YES (ver 57.107.100)
--       avformat:                  YES (ver 57.83.100)
--       avutil:                    YES (ver 55.78.100)
--       swscale:                   YES (ver 4.8.100)
--       avresample:                NO
--     GStreamer:                   
--       base:                      YES (ver 1.14.1)
--       video:                     YES (ver 1.14.1)
--       app:                       YES (ver 1.14.1)
--       riff:                      YES (ver 1.14.1)
--       pbutils:                   YES (ver 1.14.1)
--     libv4l/libv4l2:              1.14.2 / 1.14.2
--     v4l/v4l2:                    linux/videodev2.h
--     gPhoto2:                     NO
-- 
--   Parallel framework:            TBB (ver 2017.0 interface 9107)
-- 
--   Trace:                         YES (built-in)
-- 
--   Other third-party libraries:
--     Lapack:                      NO
--     Eigen:                       YES (ver 3.3.4)
--     Custom HAL:                  YES (carotene (ver 0.0.1))
--     Protobuf:                    build (3.5.1)
-- 
--   NVIDIA CUDA:                   YES (ver 10.0, CUFFT CUBLAS FAST_MATH)
--     NVIDIA GPU arch:             72
--     NVIDIA PTX archs:
-- 
--   OpenCL:                        YES (no extra features)
--     Include path:                /home/nvidia/opencv/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.15)
--     Libraries:                   /usr/lib/aarch64-linux-gnu/libpython2.7.so (ver 2.7.15+)
--     numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.13.3)
--     packages path:               lib/python2.7/dist-packages
-- 
--   Python 3:
--     Interpreter:                 /usr/bin/python3 (ver 3.6.8)
--     Libraries:                   /usr/lib/aarch64-linux-gnu/libpython3.6m.so (ver 3.6.8)
--     numpy:                       /usr/lib/python3/dist-packages/numpy/core/include (ver 1.13.3)
--     packages path:               lib/python3.6/dist-packages
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:                          
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Matlab:                        NO
-- 
--   Install to:                    /usr/local
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nvidia/opencv/build

real	0m30.922s
user	0m27.628s
sys	0m2.776s
CMake configuration make successful
[ 16%] Built target opencv_ts_pch_dephelp
[ 16%] Built target gen-pkgconfig
[ 16%] Built target opencv_core_pch_dephelp
[ 16%] Built target libjasper
[ 16%] Built target libprotobuf
[ 16%] Built target IlmImf
[ 16%] Built target carotene_objs
[ 16%] Built target opencv_imgcodecs_pch_dephelp
[ 16%] Built target opencv_imgproc_pch_dephelp
[ 16%] Built target opencv_videoio_pch_dephelp
[ 16%] Built target opencv_test_core_pch_dephelp
[ 16%] Built target opencv_highgui_pch_dephelp
[ 16%] Built target opencv_perf_core_pch_dephelp
[ 16%] Built target opencv_test_cudaarithm_pch_dephelp
[ 16%] Built target opencv_perf_cudaarithm_pch_dephelp
[ 16%] Built target opencv_cudaarithm_pch_dephelp
[ 16%] Built target opencv_test_imgproc_pch_dephelp
[ 16%] Built target opencv_test_flann_pch_dephelp
[ 16%] Built target opencv_flann_pch_dephelp
[ 16%] Built target opencv_perf_imgproc_pch_dephelp
[ 16%] Built target opencv_test_ml_pch_dephelp
[ 16%] Built target opencv_ml_pch_dephelp
[ 16%] Built target opencv_test_objdetect_pch_dephelp
[ 16%] Built target opencv_test_video_pch_dephelp
[ 16%] Built target opencv_objdetect_pch_dephelp
[ 16%] Built target opencv_perf_objdetect_pch_dephelp
[ 16%] Built target opencv_video_pch_dephelp
[ 16%] Built target opencv_perf_video_pch_dephelp
[ 16%] Built target opencv_cudabgsegm_pch_dephelp
[ 16%] Built target opencv_test_cudabgsegm_pch_dephelp
[ 16%] Built target opencv_perf_cudafilters_pch_dephelp
[ 16%] Built target opencv_perf_cudabgsegm_pch_dephelp
[ 16%] Built target opencv_test_cudafilters_pch_dephelp
[ 16%] Built target opencv_cudafilters_pch_dephelp
[ 16%] Built target opencv_test_cudaimgproc_pch_dephelp
[ 16%] Built target opencv_cudaimgproc_pch_dephelp
[ 16%] Built target opencv_perf_cudaimgproc_pch_dephelp
[ 16%] Built target opencv_test_cudawarping_pch_dephelp
[ 16%] Built target opencv_perf_cudawarping_pch_dephelp
[ 16%] Built target opencv_cudawarping_pch_dephelp
[ 16%] Built target opencv_test_imgcodecs_pch_dephelp
[ 16%] Built target opencv_perf_imgcodecs_pch_dephelp
[ 16%] Built target opencv_test_photo_pch_dephelp
[ 16%] Built target opencv_photo_pch_dephelp
[ 16%] Built target opencv_perf_photo_pch_dephelp
[ 16%] Built target opencv_test_shape_pch_dephelp
[ 16%] Built target opencv_test_videoio_pch_dephelp
[ 16%] Built target opencv_shape_pch_dephelp
[ 16%] Built target opencv_perf_videoio_pch_dephelp
[ 16%] Built target opencv_cudacodec_pch_dephelp
[ 16%] Built target opencv_test_cudacodec_pch_dephelp
[ 16%] Built target opencv_perf_cudacodec_pch_dephelp
[ 16%] Built target opencv_test_highgui_pch_dephelp
[ 16%] Built target opencv_features2d_pch_dephelp
[ 16%] Built target opencv_perf_features2d_pch_dephelp
[ 16%] Built target opencv_test_features2d_pch_dephelp
[ 16%] Built target opencv_test_calib3d_pch_dephelp
[ 16%] Built target opencv_perf_calib3d_pch_dephelp
[ 16%] Built target opencv_calib3d_pch_dephelp
[ 16%] Built target opencv_test_cudafeatures2d_pch_dephelp
[ 16%] Built target opencv_perf_cudafeatures2d_pch_dephelp
[ 16%] Built target opencv_cudafeatures2d_pch_dephelp
[ 16%] Built target opencv_test_cudalegacy_pch_dephelp
[ 16%] Built target opencv_cudalegacy_pch_dephelp
[ 16%] Built target opencv_test_cudaobjdetect_pch_dephelp
[ 16%] Built target opencv_perf_cudalegacy_pch_dephelp
[ 16%] Built target opencv_perf_cudaobjdetect_pch_dephelp
[ 16%] Built target opencv_cudaobjdetect_pch_dephelp
[ 16%] Built target opencv_test_cudaoptflow_pch_dephelp
[ 16%] Built target opencv_cudaoptflow_pch_dephelp
[ 16%] Built target opencv_perf_cudaoptflow_pch_dephelp
[ 16%] Built target opencv_test_cudastereo_pch_dephelp
[ 16%] Built target opencv_cudastereo_pch_dephelp
[ 16%] Built target opencv_perf_cudastereo_pch_dephelp
[ 16%] Built target opencv_stitching_pch_dephelp
[ 16%] Built target opencv_test_stitching_pch_dephelp
[ 16%] Built target opencv_perf_stitching_pch_dephelp
[ 16%] Built target opencv_perf_superres_pch_dephelp
[ 16%] Built target opencv_superres_pch_dephelp
[ 16%] Built target opencv_test_superres_pch_dephelp
[ 16%] Built target opencv_videostab_pch_dephelp
[ 16%] Built target opencv_test_videostab_pch_dephelp
[ 16%] Built target opencv_aruco_pch_dephelp
[ 16%] Built target opencv_test_aruco_pch_dephelp
[ 16%] Built target pch_Generate_opencv_ts
[ 16%] Built target gen_opencv_python_source
[ 16%] Built target tegra_hal
[ 16%] Built target pch_Generate_opencv_imgproc
[ 16%] Built target pch_Generate_opencv_core
[ 16%] Built target pch_Generate_opencv_imgcodecs
[ 16%] Built target pch_Generate_opencv_videoio
[ 16%] Built target pch_Generate_opencv_highgui
[ 16%] Built target pch_Generate_opencv_perf_core
[ 16%] Built target pch_Generate_opencv_test_core
[ 16%] Built target pch_Generate_opencv_test_cudaarithm
[ 16%] Built target pch_Generate_opencv_cudaarithm
[ 16%] Built target pch_Generate_opencv_perf_cudaarithm
[ 16%] Built target pch_Generate_opencv_flann
[ 16%] Built target pch_Generate_opencv_perf_imgproc
[ 16%] Built target pch_Generate_opencv_test_flann
[ 16%] Built target pch_Generate_opencv_test_imgproc
[ 16%] Built target pch_Generate_opencv_test_ml
[ 16%] Built target pch_Generate_opencv_test_objdetect
[ 16%] Built target pch_Generate_opencv_ml
[ 16%] Built target pch_Generate_opencv_objdetect
[ 16%] Built target pch_Generate_opencv_test_video
[ 16%] Built target pch_Generate_opencv_perf_objdetect
[ 16%] Built target pch_Generate_opencv_video
[ 16%] Built target pch_Generate_opencv_cudabgsegm
[ 16%] Built target pch_Generate_opencv_perf_video
[ 16%] Built target pch_Generate_opencv_test_cudabgsegm
[ 16%] Built target pch_Generate_opencv_perf_cudabgsegm
[ 16%] Built target pch_Generate_opencv_cudafilters
[ 16%] Built target pch_Generate_opencv_perf_cudafilters
[ 16%] Built target pch_Generate_opencv_test_cudafilters
[ 16%] Built target pch_Generate_opencv_perf_cudaimgproc
[ 16%] Built target pch_Generate_opencv_cudaimgproc
[ 16%] Built target pch_Generate_opencv_test_cudaimgproc
[ 16%] Built target pch_Generate_opencv_cudawarping
[ 16%] Built target pch_Generate_opencv_test_cudawarping
[ 16%] Built target pch_Generate_opencv_test_imgcodecs
[ 16%] Built target pch_Generate_opencv_perf_cudawarping
[ 16%] Built target pch_Generate_opencv_test_photo
[ 16%] Built target pch_Generate_opencv_perf_imgcodecs
[ 16%] Built target pch_Generate_opencv_photo
[ 16%] Built target pch_Generate_opencv_perf_photo
[ 16%] Built target pch_Generate_opencv_test_shape
[ 16%] Built target pch_Generate_opencv_shape
[ 16%] Built target pch_Generate_opencv_test_videoio
[ 16%] Built target pch_Generate_opencv_cudacodec
[ 16%] Built target pch_Generate_opencv_test_cudacodec
[ 16%] Built target pch_Generate_opencv_perf_videoio
[ 16%] Built target pch_Generate_opencv_perf_cudacodec
[ 16%] Built target pch_Generate_opencv_test_highgui
[ 16%] Built target pch_Generate_opencv_features2d
[ 16%] Built target pch_Generate_opencv_test_calib3d
[ 16%] Built target pch_Generate_opencv_perf_features2d
[ 16%] Built target pch_Generate_opencv_test_features2d
[ 16%] Built target pch_Generate_opencv_calib3d
[ 16%] Built target pch_Generate_opencv_perf_calib3d
[ 16%] Built target pch_Generate_opencv_cudafeatures2d
[ 16%] Built target pch_Generate_opencv_test_cudafeatures2d
[ 16%] Built target pch_Generate_opencv_perf_cudafeatures2d
[ 16%] Built target pch_Generate_opencv_test_cudalegacy
[ 16%] Built target pch_Generate_opencv_cudalegacy
[ 16%] Built target pch_Generate_opencv_perf_cudalegacy
[ 16%] Built target pch_Generate_opencv_perf_cudaobjdetect
[ 16%] Built target pch_Generate_opencv_test_cudaobjdetect
[ 16%] Built target pch_Generate_opencv_cudaobjdetect
[ 16%] Built target pch_Generate_opencv_test_cudaoptflow
[ 16%] Built target pch_Generate_opencv_perf_cudaoptflow
[ 16%] Built target pch_Generate_opencv_cudaoptflow
[ 16%] Built target pch_Generate_opencv_cudastereo
[ 16%] Built target pch_Generate_opencv_test_cudastereo
[ 16%] Built target pch_Generate_opencv_perf_cudastereo
[ 16%] Built target pch_Generate_opencv_test_stitching
[ 16%] Built target pch_Generate_opencv_perf_stitching
[ 16%] Built target pch_Generate_opencv_perf_superres
[ 16%] Built target pch_Generate_opencv_stitching
[ 16%] Built target pch_Generate_opencv_superres
[ 16%] Built target pch_Generate_opencv_test_superres
[ 16%] Built target pch_Generate_opencv_videostab
[ 16%] Built target pch_Generate_opencv_test_videostab
[ 16%] Built target pch_Generate_opencv_test_aruco
[ 16%] Built target pch_Generate_opencv_aruco
make[2]: *** No rule to make target '/usr/lib/aarch64-linux-gnu/libGL.so', needed by 'lib/libopencv_cudev.so.3.4.2'.  Stop.
CMakeFiles/Makefile2:1590: recipe for target 'modules/cudev/CMakeFiles/opencv_cudev.dir/all' failed
make[1]: *** [modules/cudev/CMakeFiles/opencv_cudev.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

real	0m0.778s
user	0m1.412s
sys	0m0.608s
Make did not build 
Retrying ... 
[ 16%] Built target gen-pkgconfig
[ 16%] Built target libjasper
[ 16%] Built target IlmImf
[ 16%] Built target libprotobuf
[ 16%] Built target carotene_objs
[ 16%] Built target tegra_hal
make[2]: *** No rule to make target '/usr/lib/aarch64-linux-gnu/libGL.so', needed by 'lib/libopencv_cudev.so.3.4.2'.  Stop.
CMakeFiles/Makefile2:1590: recipe for target 'modules/cudev/CMakeFiles/opencv_cudev.dir/all' failed
make[1]: *** [modules/cudev/CMakeFiles/opencv_cudev.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
Make did not successfully build
Please fix issues and retry build

checked -it works at xavier but the symlink sequence has different paths than at TX2:

ln -sf /usr/lib/aarch64-linux-gnu/libGL.so.1.0.0 libGL.so

Reference thread at Xavier section https://devtalk.nvidia.com/default/topic/1055949/jetson-agx-xavier/opencv-with-gl-support-at-xavier/

1 Like