Skip to content

aarch64 wheel depends on, but does not include libGL.so.1 #461

@AWSjswinney

Description

@AWSjswinney

Expected behaviour

When installing opencv, via pip, the downloaded wheel should contain all binary dependencies.

Actual behaviour

python3 -m pip install --no-cache-dir opencv-python
  shell: sh -e {0}
Collecting opencv-python
  Downloading opencv_python-4.5.1.48-cp38-cp38-manylinux2014_aarch64.whl (34.5 MB)
Collecting numpy>=1.19.3
  Downloading numpy-1.20.2-cp38-cp38-manylinux2014_aarch64.whl (12.7 MB)
Installing collected packages: numpy, opencv-python
Successfully installed numpy-1.20.2 opencv-python-4.5.1.48
 echo "import cv2" | python3
  shell: sh -e {0}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/dist-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Error: Process completed with exit code 1.

Steps to reproduce

  1. Start an aarch64 system with Ubuntu 20.04, Centos 8, or Amazon Linux 2. Install python3 and pip.
  2. python3 -m pip install opencv-python
  3. echo "import cv2" | python3

This can be fixed by adding running auditwheel on the binary wheel after build completion to make in compliant with the spec. This will bundle any dependencies in the wheel and verify that it links against the max versions of system libraries like glibc in order to be broadly compatible.

Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • I'm using the latest version of opencv-python

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions