Skip to content

PyPI package does not work on Alpine #237

@whitequark

Description

@whitequark

To reproduce:

$ docker run --network=host -it alpine:latest
/ # apk add py3-pip
/ # cd /root
~ # python -m venv venv
~ # . venv/bin/activate
(venv) ~ # pip install wasmtime
Collecting wasmtime
  Downloading wasmtime-21.0.0-py3-none-any.whl.metadata (7.4 kB)
Collecting importlib-resources>=5.10 (from wasmtime)
  Downloading importlib_resources-6.4.0-py3-none-any.whl.metadata (3.9 kB)
Downloading wasmtime-21.0.0-py3-none-any.whl (4.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 8.8 MB/s eta 0:00:00
Downloading importlib_resources-6.4.0-py3-none-any.whl (38 kB)
Installing collected packages: importlib-resources, wasmtime
Successfully installed importlib-resources-6.4.0 wasmtime-21.0.0
(venv) ~ # python
Python 3.11.9 (main, Apr 14 2024, 13:40:00) [GCC 13.2.1 20231014] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wasmtime
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/venv/lib/python3.11/site-packages/wasmtime/__init__.py", line 17, in <module>
    from ._error import WasmtimeError, ExitTrap
  File "/root/venv/lib/python3.11/site-packages/wasmtime/_error.py", line 2, in <module>
    from . import _ffi as ffi
  File "/root/venv/lib/python3.11/site-packages/wasmtime/_ffi.py", line 30, in <module>
    raise RuntimeError("precompiled wasmtime binary not found at `{}`".format(filename))
RuntimeError: precompiled wasmtime binary not found at `/root/venv/lib/python3.11/site-packages/wasmtime/linux-x86_64/_libwasmtime.so`

The root cause is that the manylinux wheels that are currently published are based on glibc, but Alpine is based on musl libc. There is a separate musllinux platform tag that can be used in that case.

Do you think musl-compatible builds could be added? This would improve compatibility with certain distributions like Alphine Linux, Void Linux, and others focusing on size and speed.

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