-DBUILD_SHARED_LIBS=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_PERF_TESTS=OFF
-DBUILD_TESTS=OFF
-DBUILD_DOCS=OFF
-DENABLE_NEON=OFF
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=/nvidia-orin/build_tools/cmake/aarch64-toolchain-jetson.cmake
-DCMAKE_INSTALL_PREFIX=“/usr/local/opencv”
-DFFMPEG_DIR=“/usr/local/ffmpeg” -DWITH_FFMPEG=ON -DFFMPEG_INCLUDE_DIRS=“/usr/local/ffmpeg/include” -DOPENCV_FFMPEG_SKIP_BUILD_CHECK=ON -DWITH_CAROTENE=OFF -DCUDA_ROOT=“/usr/local/cuda/targets/aarch64-linux” -DWITH_CUDA=ON -D OPENCV_DNN_CUDA=ON -D OPENCV_EXTRA_MODULES_PATH=/tmp/opencv_contrib-4.8.0/modules/ --fresh
i get the below error:
CMake Error at CMakeLists.txt:160 (message):
CMake fails to determine the bitness of the target platform.
Please check your CMake and compiler installation. If you are cross-compiling then ensure that your CMake toolchain file correctly sets the compiler details.
How can i fix it?
It also happens with opencv 4.2.0
It works, but it will not compile to aarch64.
I am not building on the board, but i want to cross-compile to aarach16, that’s why i am using the docker and -DCMAKE_TOOLCHAIN_FILE
$ cd release
$ sudo make install && sudo ldconfig
$ opencv_version -v
General configuration for OpenCV 4.8.0 =====================================
Version control: 58f22c2-dirty
Extra modules:
Location (extra): /l4t/workspace/opencv_contrib-4.8.0/modules
Version control (extra): 58f22c2-dirty
Platform:
Timestamp: 2023-10-23T06:42:37Z
Host: Linux 5.4.0-150-generic x86_64
Target: Linux 1 aarch64
...