opencv-python
opencv-python copied to clipboard
Cross-compiling for aarch64
I am trying to cross-compile and create a wheel file for the aarch64 board.
`
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
export CMAKE_ARGS="-DWITH_GSTREAMER=ON -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX}"
pip wheel . --verbose
`
These are the steps I followed.
I am facing the below error.
` [633/1779] Building CXX object modules/flann/CMakeFiles/opencv_flann.dir/src/miniflann.cpp.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/tmp/pip-build-env-6betf83d/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 668, in setup
cmkr.make(make_args, install_target=cmake_install_target, env=env)
File "/tmp/pip-build-env-6betf83d/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 696, in make
self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
File "/tmp/pip-build-env-6betf83d/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 741, in make_impl
raise SKBuildError(msg)
An error occurred while building with CMake.
Command:
/tmp/pip-build-env-6betf83d/overlay/lib/python3.8/site-packages/cmake/data/bin/cmake --build . --target install --config Release --
Install target:
install
Source directory:
work/learn/OCV_BUILD/opencv-python
Working directory:
work/learn/OCV_BUILD/opencv-python/_skbuild/linux-x86_64-3.8/cmake-build
Please check the install target is valid and see CMake's output for more information.
error: subprocess-exited-with-error
× Building wheel for opencv-python (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command:miniconda3/envs/dms/bin/python miniconda3/envs/dms/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /tmp/tmpa3qkfach
cwd: work/learn/OCV_BUILD/opencv-python
Building wheel for opencv-python (pyproject.toml) ... error
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Failed to build one or more wheels
`
I have encountered the same problem. How should I resolve it? I am compiling on Windows to support GStreamer.
The log is incomplete. There is some build error above. Please publish full output.