oren.s
January 22, 2024, 9:30am
1
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?
Hi,
Thanks for your patience.
We can build OpenCV 4.8 within the cross-compile container.
Please give it a try:
Host install_opencv4.8.0_Jetson.sh (2.5 KB)
$ sudo docker run -it --privileged --net=host -v /dev/bus/usb:/dev/bus/usb -v ${WORKSPACE}:/workspace nvcr.io/nvidia/jetpack-linux-aarch64-crosscompile-x86:5.1.2
$ chmod +x install_opencv4.8.0_Jetson.sh
$ ./install_opencv4.8.0_Jetson.sh
Copy workspace/opencv-4.8.0/release to device
Device
$ cd release
$ sudo make install && sudo ldco…
Thanks.
oren.s
January 28, 2024, 9:58am
4
Hi,
i still get the same errors:
Those are are steps i have done with your docker image:
Donload install install_opencv4.8.0_Jetson.sh
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
cd /workspace/
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
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.
oren.s
February 5, 2024, 8:24am
6
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.
oren.s
February 21, 2024, 3:27am
8
HI,
I have already tried it and it works.
Thanks
Oren
system
Closed
March 14, 2024, 7:57am
11
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.