Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-compiling for aarch64 #1027

Open
Akshayz-123 opened this issue Sep 4, 2024 · 0 comments
Open

Cross-compiling for aarch64 #1027

Akshayz-123 opened this issue Sep 4, 2024 · 0 comments

Comments

@Akshayz-123
Copy link

Akshayz-123 commented Sep 4, 2024

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

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant