Skip to content

Error in compiling OpenCV that supports CUDA on Jetson Orin Nano #27473

@xgy-qrs

Description

@xgy-qrs

7 errors detected in the compilation of "/home/coi/Desktop/opencv_contrib/modules/cudaarithm/src/cuda/minmax.cu".
CMake Error at cuda_compile_1_generated_minmax.cu.o.Release.cmake:280 (message):
Error generating file
/home/coi/Desktop/opencv/build/modules/cudaarithm/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_minmax.cu.o

The above are the mistakes I have encountered. Here are my steps(jetpack6.2 opencv4.8.0 cuda12.6):

sudo apt purge libopencv* python3-opencv
sudo pip uninstall opencv-python -y
sudo apt autoremove

sudo apt update
sudo apt install -y build-essential cmake git libgtk-3-dev libavcodec-dev libavformat-dev
libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libjpeg-dev libpng-dev libtiff-dev
libtbb-dev libatlas-base-dev gfortran python3-dev python3-numpy

git clone --branch 4.8.0 https://github.com/opencv/opencv.git
git clone --branch 4.8.0 https://github.com/opencv/opencv_contrib.git

mkdir opencv/build && cd opencv/build
cmake
-D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local/opencv_4.8.0
-D OPENCV_ENABLE_NONFREE=ON
-D WITH_CUDA=ON
-D CUDA_ARCH_BIN=8.7
-D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.6
-D CUDA_FAST_MATH=ON
-D WITH_CUDNN=ON
-D OPENCV_DNN_CUDA=ON
-D WITH_CUBLAS=ON
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules
-D PYTHON3_EXECUTABLE=$(which python)
-D PYTHON3_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())")
-D PYTHON3_NUMPY_INCLUDE_DIRS=$(python -c "import numpy; print(numpy.get_include())")
-D PYTHON3_PACKAGES_PATH=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
..

make -j$(nproc) # The above error occurred when I started compiling at this step
sudo make install

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy