BUG: Can't install 1.9.1 on arm32v7 Ubuntu Focal (py3.8) from source
See original GitHub issueDescribe your issue.
We maintain a wheel repo for use with our docker images and we currently build scipy on arm32v7 for Ubuntu Focal and Jammy. Unfortunately 1.9.1 does not build on Ubuntu Focal (python 3.8). It builds fine on Ubuntu Jammy (python 3.10)
Here’s the dockerfile we use: https://github.com/linuxserver/wheelie/blob/main/Dockerfile.sci You can ignore the bits about qpdf, which is only needed when building pikepdf and gets skipped when only building scipy (same dockerfile is used for scipy, scikit-learn and pikepdf). distro, arch and packages to build get injected as build args in a jenkins pipeline
Here’s the arm32v7 build log on Ubuntu Focal (native hardware, rpi4): https://ci.linuxserver.io/blue/rest/organizations/jenkins/pipelines/Tools/pipelines/wheelieSCI/runs/64/nodes/24/steps/196/log/?start=0
Here’s the full build log that also lists the Jammy build: https://ci.linuxserver.io/blue/organizations/jenkins/Tools%2FwheelieSCI/detail/wheelieSCI/64/pipeline
Reproducing Code Example
python3 -m venv /build-env && \
. /build-env/bin/activate && \
pip3 install -U pip setuptools wheel cython && \
pip wheel --wheel-dir=/build -v ninja patchelf && \
pip install /build/ninja-* /build/patchelf-* && \
pip wheel --wheel-dir=/build -v scipy
Error message
[0m[91m Copying files to wheel...
[0m[91m [0/1224] scipy/__config__.py
[0m[91m [1/1224] scipy/version.py
[0m[91m [2/1224] scipy/_lib/_ccallback_c.cpython-38-arm-linux-gnueabihf.so
[0m[91m Traceback (most recent call last):
[0m[91m File "/build-env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel
[0m[91m hook = backend.prepare_metadata_for_build_wheel
[0m[91m AttributeError: module 'mesonpy' has no attribute 'prepare_metadata_for_build_wheel'
[0m[91m
[0m[91m During handling of the above exception, another exception occurred:
[0m[91m
[0m[91m Traceback (most recent call last):
[0m[91m File "/build-env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/build-env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/build-env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 160, in prepare_metadata_for_build_wheel
[0m[91m whl_basename = backend.build_wheel(metadata_directory, config_settings)
[0m[91m File "/tmp/pip-build-env-_kuqgyjz/overlay/lib/python3.8/site-packages/mesonpy/__init__.py", line 941, in build_wheel
[0m[91m return project.wheel(out).name
[0m[91m File "/tmp/pip-build-env-_kuqgyjz/overlay/lib/python3.8/site-packages/mesonpy/__init__.py", line 889, in wheel
[0m[91m wheel = _WheelBuilder(self).build(self._install_plan, self._copy_files, self._build_dir)
[0m[91m File "/tmp/pip-build-env-_kuqgyjz/overlay/lib/python3.8/site-packages/mesonpy/__init__.py", line 380, in build
[0m[91m self._install_file(whl, counter, origin, destination)
[0m[91m File "/tmp/pip-build-env-_kuqgyjz/overlay/lib/python3.8/site-packages/mesonpy/__init__.py", line 341, in _install_file
[0m[91m if libdir_path not in elf.rpath:
[0m[91m File "/tmp/pip-build-env-_kuqgyjz/overlay/lib/python3.8/site-packages/mesonpy/_elf.py", line 25, in rpath
[0m[91m self._rpath = self._patchelf('--print-rpath').strip().split(';')
[0m[91m File "/tmp/pip-build-env-_kuqgyjz/overlay/lib/python3.8/site-packages/mesonpy/_elf.py", line 20, in _patchelf
[0m[91m return subprocess.check_output(['patchelf', *args, self._path]).decode()
[0m[91m File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
[0m[91m return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
[0m[91m File "/usr/lib/python3.8/subprocess.py", line 516, in run
[0m[91m raise CalledProcessError(retcode, process.args,
[0m[91m subprocess.CalledProcessError: Command '['patchelf', '--print-rpath', '/tmp/pip-wheel-vxwycymm/scipy_404354316b954b23970a8fe4d3f56ab8/.mesonpy-6rz_hsfb/build/mesonpy-wheel-libs/scipy/_lib/_ccallback_c.cpython-38-arm-linux-gnueabihf.so']' returned non-zero exit status 1.
[0m[91m error: subprocess-exited-with-error
× Preparing metadata (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.
[0m[91m full command: /build-env/bin/python3 /build-env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpsq2fne4h
[0m[91m cwd: /tmp/pip-wheel-vxwycymm/scipy_404354316b954b23970a8fe4d3f56ab8
[0m Preparing metadata (pyproject.toml): finished with status 'error'
[91merror: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
SciPy/NumPy/Python version information
1.9.1
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Thanks @aptalca, that is helpful. The log shows two issues:
The
patchelf
warning is new, but we’re getting rid of the use ofpatchelf
for SciPy completely in the newmeson-python
release that’s coming over the next few days.The other one I’ve seen before. It should also be fixed in the new
meson-python
release. Once that is out, we should also get a SciPy1.9.2
with accumulated fixes I think. Let me circle back to this once themeson-python
release is available.Great, thanks for confirming @aptalca