[英]CMake Cross compile Arm64 error “unrecognised command line option ‘-msse’”
I am trying to cross-compile openCV for an Arm64 linux platform and am getting the following errors我正在尝试为 Arm64 linux 平台交叉编译 openCV 并收到以下错误
aarch64-linux-gnu-gcc: error: unrecognised command line option ‘-msse’; did you mean ‘-fdse’?
aarch64-linux-gnu-gcc: error: unrecognised command line option ‘-msse2’
aarch64-linux-gnu-gcc: error: unrecognised command line option ‘-msse3’
I understand that the -msse flags are not compatible with arm64, yet when I generate my makefile from CMake, these flags are include.我知道 -msse 标志与 arm64 不兼容,但是当我从 CMake 生成 makefile 时,这些标志包括在内。 My CMake command is我的 CMake 命令是
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-10/bin/nvcc \
-DCUDA_HOST_COMPILER=/opt/l4t-gcc-toolchain-64-bit-32-7.1/bin/aarch64-linux-gnu-gcc \
-DCUDA_INCLUDE_DIRS=/usr/local/cuda-10/targets/aarch64-linux/include \
-DCUDA_CUDART_LIBRARY=/usr/local/cuda-10/targets/aarch64-linux/lib/libcudart.so \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D BUILD_EXAMPLES=OFF \
-D WITH_CUDA=ON \
-D CUDA_ARCH_BIN="6.2" \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.4.0/modules/ \
-D ENABLE_CXX11=ON ..
I am building on linux ubuntu 18.4.我正在构建 linux ubuntu 18.4。 How to do I tell CMake that the platform is Arm64?如何告诉 CMake 平台是 Arm64? Thanks谢谢
I resolved the issue, the missing flag I was looking for was我解决了这个问题,我正在寻找的缺失标志是
-D CMAKE_TOOLCHAIN_FILE=../platforms/linux/aarch64-gnu.toolchain.cmake
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.