Cannot link with opencv built on nvidia docker

HI,

I have created a docker with OpenCV 4.8.0.
However. when I try to link with the openCV I get the below error:
– Configuring done (0.1s)
CMake Error in CMakeLists.txt:
No known features for CXX compiler

“GNU”

version 9.4.0.

I have uploaded a file that contains:
my toolchain file: aarch64-toolchain-jetson.cmake
project cmake file: CMakeLists.txt
opencv build scripts install_opencv4.8.0_Jetson.sh
docker file for image: jetson-cross.dockerfile
simple test code: testOpenCV.cpp

Thanks,
Oren
build_opencv.tar.gz (5.5 KB)

Hi,

Do you follow the steps shared below?

Thanks.

Hi,

i still get the same errors:
Those are are steps i have done with your docker image:

  1. Donload install install_opencv4.8.0_Jetson.sh
  2. run docker:
    sudo docker run -it --privileged --net=host -v /dev/bus/usb:/dev/bus/usb -v $PWD:/workspace nvcr.io/nvidia/jetpack-linux-aarch64-crosscompile-x86:5.1.2
  3. cd /workspace/
  4. run:
    chmod +x install_opencv4.8.0_Jetson.sh;./install_opencv4.8.0_Jetson.sh
    cd workspace/opencv-4.8.0/release/
    make install
    cd /workspace
  5. run cmake
    cmake ./ -DCMAKE_TOOLCHAIN_FILE=./aarch64-toolchain-jetson.cmake -DOpenCV_DIR=/usr/local/lib/cmake/

error:
– Found OpenCV: /usr/local (found version “4.8.0”)
– Configuring done
CMake Error in CMakeLists.txt:
No known features for CXX compiler

“GNU”

version 9.4.0.

Hi,

Do you get the library built when running ./install_opencv4.8.0_Jetson.sh?
If yes, you don’t need to run the cmake again.

The script uses a toolchain file from the OpenCV repository:

cmake -D CMAKE_TOOLCHAIN_FILE=../platforms/linux/aarch64-gnu.toolchain.cmake ...

But based on your description, it seems you are using a custom file.

Thanks.

HI

yes the opencv is being built.
If you managed to comile my code for arm, which TOOLCHANIN_FILE are you using? and why my toolchain file is not working?

Thanks
Oren

Hi,

The toolchain used above is from the same OpenCV source.
Would you mind giving it a try? This might be a compatibility issue.

Thanks.

HI,

I have already tried it and it works.
Thanks
Oren

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.