indygreg / indygreg/python-zstandard

No support for MUSL when statically compiled

Open
#224 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
642
Forks
116
Avg merge
1d 14h
Merged PRs (30d)
5

Description

This affects the standalone distributions https://github.com/indygreg/python-build-standalone

```
#10 152.8 Collecting zstandard<1 (from hatch)
#10 152.8 Downloading zstandard-0.22.0.tar.gz (660 kB)
#10 152.8 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 660.7/660.7 kB 23.1 MB/s eta 0:00:00
#10 152.9 Installing build dependencies: started
#10 162.2 Installing build dependencies: finished with status 'done'
#10 162.2 Getting requirements to build wheel: started
#10 162.3 Getting requirements to build wheel: finished with status 'error'
#10 162.3 error: subprocess-exited-with-error
#10 162.3
#10 162.3 × Getting requirements to build wheel did not run successfully.
#10 162.3 │ exit code: 1
#10 162.3 ╰─> [27 lines of output]
#10 162.3 :37: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
#10 162.3 :38: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
#10 162.3 Traceback (most recent call last):
#10 162.3 File "/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
#10 162.3 main()
#10 162.3 File "/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
#10 162.3 json_out['return_val'] = hook(**hook_input['kwargs'])
#10 162.3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#10 162.3 File "/python/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
#10 162.3 return hook(config_settings)
#10 162.3 ^^^^^^^^^^^^^^^^^^^^^
#10 162.3 File "/tmp/pip-build-env-dgf3jcqn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
#10 162.3 return self._get_build_requires(config_settings, requirements=['wheel'])
#10 162.3 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#10 162.3 File "/tmp/pip-build-env-dgf3jcqn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
#10 162.3 self.run_setup()
#10 162.3 File "/tmp/pip-build-env-dgf3jcqn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 507, in run_setup
#10 162.3 super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
#10 162.3 File "/tmp/pip-build-env-dgf3jcqn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 341, in run_setup
#10 162.3 exec(code, locals())
#10 162.3 File "", line 106, in
#10 162.3 File "/tmp/pip-install-bgq5xkbu/zstandard_5e86081b75824feb9ec94c6ef4e53eb3/make_cffi.py", line 161, in
#10 162.3 ffi = cffi.FFI()
#10 162.3 ^^^^^^^^^^
#10 162.3 File "/tmp/pip-build-env-dgf3jcqn/overlay/lib/python3.12/site-packages/cffi/api.py", line 48, in __init__
#10 162.3 import _cffi_backend as backend
#10 162.3 ImportError: Dynamic loading not supported
#10 162.3 [end of output]
#10 162.3
#10 162.3 note: This error originates from a subprocess, and is likely not a problem with pip.
#10 162.3 error: subprocess-exited-with-error
#10 162.3
#10 162.3 × Getting requirements to build wheel did not run successfully.
#10 162.3 │ exit code: 1
#10 162.3 ╰─> See above for output.
#10 162.3
#10 162.3 note: This error originates from a subprocess, and is likely not a problem with pip.
#10 ERROR: process "/bin/sh -c /python/bin/python -m pip install hatch" did not complete successfully: exit code: 1
```

Contributor guide

Open the contributing guide

Research direction

Start with the standalone-distribution context linked in the issue and reproduce the failing `pip install hatch` command under a statically compiled MUSL build. Read `make_cffi.py` alongside the traceback's CFFI initialization path; done means the zstandard dependency can build and the installation completes without the dynamic-loading error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.