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

Support for Alpine Linux #140

Closed
1Const1 opened this issue Jul 27, 2024 Discussed in #86 · 5 comments
Closed

Support for Alpine Linux #140

1Const1 opened this issue Jul 27, 2024 Discussed in #86 · 5 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@1Const1
Copy link

1Const1 commented Jul 27, 2024

FROM python:3.12.4-alpine3.20
RUN python3.12 -m pip install --upgrade pip
&& python3.12 -m pip install rocksdict

Successfully installed pip-24.1.2

Same error here - ERROR: No matching distribution found for rocksdict
or - Could not find a version that satisfies the requirement rocksdict (from versions: none)

Connected issue: #86

compiled on x86

How to solve it?

Perfectly works only on Debian image

@Congyuwang
Copy link
Collaborator

Congyuwang commented Nov 1, 2024

Okay. I did some research. Alpine linux does not use glibc but uses musl libc. Currently all our wheels use glibc.

Quote google AI:

The problem:
Alpine Linux uses the musl C library, while most Linux distributions (and the manylinux wheels on PyPI) use glibc. This means that standard wheels often don't work on Alpine.
The solution:
PEP 656 introduced the musllinux wheel tag, specifically for musl-based systems like Alpine.
The cibuildwheel project can build musllinux wheels for your projects.
PyPI now hosts musllinux wheels for many popular packages, including NumPy and SciPy.

Currently we are using manylinux image to build wheels, that's why no wheel works for alpine for now.

@Congyuwang Congyuwang added enhancement New feature or request help wanted Extra attention is needed labels Nov 1, 2024
@Congyuwang Congyuwang self-assigned this Nov 2, 2024
@Congyuwang
Copy link
Collaborator

#155

@Congyuwang
Copy link
Collaborator

Can't build musl wheels for the moment due to dynamic linking of clang-sys.

  thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.69.5/lib.rs:622:31:
  Unable to find libclang: "the `libclang` shared library at /usr/local/lib/libclang.so.19.1.3 could not be opened: Dynamic loading not supported"

LLVM needs to be built as static lib, first of all. Then, bindgen of rust-rocksdb should use static feature instead of runtime. But that's just some guessing.

Related issues:

rust-lang/rust-bindgen#2360
KyleMayes/clang-sys#189
tikv/grpc-rs#477
njaremko/samael#37
apache/skywalking#10439
https://gitlab.alpinelinux.org/alpine/aports/-/issues/12226

@1Const1 Pull requests are welcome.

@Congyuwang
Copy link
Collaborator

@Congyuwang
Copy link
Collaborator

Completed via #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants