pganssle / zoneinfo

Reference implementation for the proposed standard library module zoneinfo
Other
51 stars 20 forks source link

ERROR: Could not build wheels for backports.zoneinfo, [ on ARM64] #121

Closed gauss345 closed 2 years ago

gauss345 commented 2 years ago

Good day,

we are currently trying to install apscheduler, which as a dependency has backports.zoneinfo.

We are trying to install this , on a arm64 device:

FROM arm64v8/python:3.8.13-slim

OUTPUT from wheel being build:

#0 201.0 Building wheels for collected packages: backports.zoneinfo, python-multipart, ratelimit
#0 201.0   Building wheel for backports.zoneinfo (pyproject.toml): started
#0 205.9   Building wheel for backports.zoneinfo (pyproject.toml): finished with status 'error'
#0 206.1   error: subprocess-exited-with-error
#0 206.1   
#0 206.1   × Building wheel for backports.zoneinfo (pyproject.toml) did not run successfully.
#0 206.1   │ exit code: 1
#0 206.1   ╰─> [37 lines of output]
#0 206.1       /tmp/pip-build-env-67jv2a5r/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
#0 206.1         warnings.warn(msg, warning_class)
#0 206.1       running bdist_wheel
#0 206.1       running build
#0 206.1       running build_py
#0 206.1       creating build
#0 206.1       creating build/lib.linux-aarch64-cpython-38
#0 206.1       creating build/lib.linux-aarch64-cpython-38/backports
#0 206.1       copying src/backports/__init__.py -> build/lib.linux-aarch64-cpython-38/backports
#0 206.1       creating build/lib.linux-aarch64-cpython-38/backports/zoneinfo
#0 206.1       copying src/backports/zoneinfo/_zoneinfo.py -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
#0 206.1       copying src/backports/zoneinfo/__init__.py -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
#0 206.1       copying src/backports/zoneinfo/_common.py -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
#0 206.1       copying src/backports/zoneinfo/_version.py -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
#0 206.1       copying src/backports/zoneinfo/_tzpath.py -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
#0 206.1       running egg_info
#0 206.1       writing src/backports.zoneinfo.egg-info/PKG-INFO
#0 206.1       writing dependency_links to src/backports.zoneinfo.egg-info/dependency_links.txt
#0 206.1       writing requirements to src/backports.zoneinfo.egg-info/requires.txt
#0 206.1       writing top-level names to src/backports.zoneinfo.egg-info/top_level.txt
#0 206.1       reading manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
#0 206.1       reading manifest template 'MANIFEST.in'
#0 206.1       warning: no files found matching '*.png' under directory 'docs'
#0 206.1       warning: no files found matching '*.svg' under directory 'docs'
#0 206.1       no previously-included directories found matching 'docs/_build'
#0 206.1       no previously-included directories found matching 'docs/_output'
#0 206.1       adding license file 'LICENSE'
#0 206.1       adding license file 'licenses/LICENSE_APACHE'
#0 206.1       writing manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
#0 206.1       copying src/backports/zoneinfo/__init__.pyi -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
#0 206.1       copying src/backports/zoneinfo/py.typed -> build/lib.linux-aarch64-cpython-38/backports/zoneinfo
#0 206.1       running build_ext
#0 206.1       building 'backports.zoneinfo._czoneinfo' extension
#0 206.1       creating build/temp.linux-aarch64-cpython-38
#0 206.1       creating build/temp.linux-aarch64-cpython-38/lib
#0 206.1       gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.8 -c lib/zoneinfo_module.c -o build/temp.linux-aarch64-cpython-38/lib/zoneinfo_module.o -std=c99
#0 206.1       error: command 'gcc' failed: No such file or directory
#0 206.1       [end of output]
#0 206.1   
#0 206.1   note: This error originates from a subprocess, and is likely not a problem with pip.
#0 206.1   ERROR: Failed building wheel for backports.zoneinfo
#0 206.1   Building wheel for python-multipart (setup.py): started
#0 211.5   Building wheel for python-multipart (setup.py): finished with status 'done'
#0 211.5   Created wheel for python-multipart: filename=python_multipart-0.0.5-py3-none-any.whl size=31678 sha256=693b759bce2ae034a286fda9c3ebf44343b6de855994264ea7abad80bda2f938
#0 211.5   Stored in directory: /root/.cache/pip/wheels/9e/fc/1c/cf980e6413d3ee8e70cd8f39e2366b0f487e3e221aeb452eb0
#0 211.6   Building wheel for ratelimit (setup.py): started
#0 216.1   Building wheel for ratelimit (setup.py): finished with status 'done'
#0 216.1   Created wheel for ratelimit: filename=ratelimit-2.2.1-py3-none-any.whl size=5908 sha256=f51baf44b2b8846fbcf0c54ba47592f5fadfca6add3770c7a91433cc3ba21557
#0 216.1   Stored in directory: /root/.cache/pip/wheels/8e/34/5e/1dd3d652594bdf5df01109a683a455121d0b726978051bf720
#0 216.1 Successfully built python-multipart ratelimit
#0 216.1 Failed to build backports.zoneinfo
#0 216.1 ERROR: Could not build wheels for backports.zoneinfo, which is required to install pyproject.toml-based projects

I've tried various version[s] of an ARM64 python image. unfortunately we are locked into using python 3.8 for our projects.

Is there any advice here ?

pganssle commented 2 years ago

I'm guessing you need to install gcc.

gauss345 commented 2 years ago

After some effort, and realising that no ARM wheel exists, I found the solution by changing to a different image: arm64v8/python:3.8.13-bullseye ...

gcc was installed, but certain required files were not to do the wheel build, I guess... anyway, seems resolved now... thanks

leeaina commented 11 months ago

Hello, how did you solve it? Can you elaborate on that? I need your help