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

release CI fails to build for aarhc64 targets #97

Closed
2bndy5 opened this issue Jan 25, 2025 · 5 comments · Fixed by #98
Closed

release CI fails to build for aarhc64 targets #97

2bndy5 opened this issue Jan 25, 2025 · 5 comments · Fixed by #98

Comments

@2bndy5
Copy link
Member

2bndy5 commented Jan 25, 2025

In the release CI, it fails to build for Python v3.9.x on aarch64 (using qemu and a docker image).

(unhelpful) CI build/release logs

CPython 3.9 manylinux aarch64

Setting up build environment...
  
      + /opt/python/cp39-cp39/bin/python -c 'import sys, json, os; json.dump(os.environ.copy(), sys.stdout)'
      + which python
      + which pip
                                                              ✓ 0.57s
Building wheel...
  
      + rm -rf /tmp/cibuildwheel/built_wheel
      + mkdir -p /tmp/cibuildwheel/built_wheel
      + python -m pip wheel /project --wheel-dir=/tmp/cibuildwheel/built_wheel --no-deps
  Processing /project
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
    Preparing metadata (pyproject.toml): started
    Preparing metadata (pyproject.toml): finished with status 'done'
  Building wheels for collected packages: pyrf24
    Building wheel for pyrf24 (pyproject.toml): started
    Building wheel for pyrf24 (pyproject.toml): finished with status 'error'
    error: subprocess-exited-with-error
    
    × Building wheel for pyrf24 (pyproject.toml) did not run successfully.
    │ exit code: -11
    ╰─> [0 lines of output]
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for pyrf24

Still investigating, but it will be difficult.

FYI, Python v3.8 and v3.9 have hit End-of-Life. They aren't receiving any new updates (security or otherwise). It would be simple to bump the minimum required python version for this pkg:

requires-python = ">=3.7"

But piwheels still distributes v3.9 builds (for bullseye installs).

@2bndy5
Copy link
Member Author

2bndy5 commented Jan 25, 2025

pybind11 will drop support for Python v3.7 in next release. Currently, we are pinned to pybind11 v2.13.6 (#96) which allegedly still supports Python v3.7+.

@2bndy5
Copy link
Member Author

2bndy5 commented Jan 26, 2025

Well I had to build python v3.9.21 from tarball source. I didn't run into any problems though.

I did have to add the Python-v3.9.21/Include directory so pybind11 could find the right Python.h to #include. But doubt that is the same problem observed in CI because the aarch64 build uses a docker image.

Still investigating...

@2bndy5 2bndy5 changed the title python v3.9 fails to build release CI fails to build for aarhc64 targets Jan 27, 2025
@2bndy5
Copy link
Member Author

2bndy5 commented Jan 27, 2025

Some progress here

I successfully built the package for the aarch64 platform locally (in Ubuntu) using QEMU, Docker, and the cibuildwheel package. So, there must be something wrong with the env used in the CI workflow.

After running the CI maunually, I found 2 different errors:

  • the compiler seg faults. As usual in this situation, there is no indication as to why it seg faults. Compiler version reported as GNU 10.2.1. Locally, the build completes as expected using GNU 13.3.0.
  • The docker image used in QEMU may not have git installed. Although, this problem didn't occur after I disabled the automatic caching of the qemu docker image.

@2bndy5
Copy link
Member Author

2bndy5 commented Jan 27, 2025

I think I found the problem: tonistiigi/binfmt#215. Its a problem with the actual emulator with respect to aarch64 containers on amd64 hosts.

I think the solution is to use a newer qemu release. Currently the latest tag resolves to a 2-year old release.

@2bndy5
Copy link
Member Author

2bndy5 commented Jan 28, 2025

Yep. Bumping the QEMU version to v8.5.1 resolved the seg fault issues. I suspect this was recently brought on by GitHub's upgrades to the ubuntu-latest runner (which will now use Ubuntu 24.04).

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

Successfully merging a pull request may close this issue.

1 participant