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

Incorrect glibc version used in x86_64 wheels #1117

Open
jncraton opened this issue Feb 1, 2025 · 5 comments
Open

Incorrect glibc version used in x86_64 wheels #1117

jncraton opened this issue Feb 1, 2025 · 5 comments

Comments

@jncraton
Copy link
Contributor

jncraton commented Feb 1, 2025

I'm attempting to install the most recent version of the mistralrs Python package on an Ubuntu Jammy system. Unfortunately, pip install fails because there is no matching distribution:

~$ pip3 install mistralrs==0.4.0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement mistralrs==0.4.0 (from versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.7, 0.1.8, 0.1.10, 0.1.11, 0.1.12, 0.1.13, 0.1.14, 0.1.15, 0.1.16, 0.1.17, 0.1.18, 0.1.19, 0.1.20, 0.1.21, 0.1.22, 0.1.23, 0.1.24, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.3.0, 0.3.1, 0.3.2)
ERROR: No matching distribution found for mistralrs==0.4.0

There is a built distribution for manylinux x86_64 listed on PyPI:

mistralrs-0.4.0-cp310-cp310-manylinux_2_39_x86_64.whl (16.6 MB)

Uploaded Jan 22, 2025 CPython 3.10 manylinux: glibc 2.39+ x86-64

The required version of gcc (2.39+) is only about a year old. My Jammy system is still on 2.35 from 2022, and that is preventing a matching built distribution from being found.

The ARM64 built distribution only requires glibc 2.17+:

mistralrs-0.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.4 MB)

Uploaded Jan 22, 2025 CPython 3.10 manylinux: glibc 2.17+ ARM64

Linux users are often using older versions of glibc. Would it be possible to provide built distributions for Linux that require only glibc 2.17+ on x86_64 as well as ARM64?

@jncraton
Copy link
Contributor Author

jncraton commented Feb 3, 2025

I've been exploring the CI and build process to try and determine why this is happening. It appears to me that the process to build and upload the Python wheels is manual and the commands in mistralrs-pyo3/generate_wheels.sh are used to run it.

Here are the commands to build the AArch64 manylinux wheels:

# MAC: Aarch64 Manylinux and OSX

docker build -t wheelmaker:latest -f Dockerfile.manylinux .
docker run --rm -v .:/io wheelmaker build --release -o wheels-cpu -m mistralrs-pyo3/Cargo.toml --interpreter python3.10
docker run --rm -v .:/io wheelmaker build --release -o wheels-cpu -m mistralrs-pyo3/Cargo.toml --interpreter python3.11
docker run --rm -v .:/io wheelmaker build --release -o wheels-cpu -m mistralrs-pyo3/Cargo.toml --interpreter python3.12

Here are the commands to build the x64 manylinux wheels:

# WINDOWS: x86_64 Manylinux, Windows

maturin build -o wheels-cpu -m mistralrs-pyo3/Cargo.toml --interpreter python3.10
maturin build -o wheels-cpu -m mistralrs-pyo3/Cargo.toml --interpreter python3.11
maturin build -o wheels-cpu -m mistralrs-pyo3/Cargo.toml --interpreter python3.12

It seems like the x86_64 builds should also use the Docker container in order to avoid compiling using the host system's glibc version for broader Linux compatibility. #1061 may be related to this.

@jncraton jncraton changed the title No compatible wheels on Ubuntu Jammy Incorrect glibc version used in x86_64 wheels Feb 3, 2025
@EricLBuehler
Copy link
Owner

Hi @jncraton! You are correct, I will include this process in the next release.

@jncraton
Copy link
Contributor Author

Sounds great! Thanks for taking the time to look into this and make this adjustment for future packages.

@EricLBuehler
Copy link
Owner

Thanks! Actually, I'll reopen this so we can close it when it is fixed in 0.4.1 - will update you then!

@EricLBuehler EricLBuehler reopened this Feb 12, 2025
@jncraton
Copy link
Contributor Author

That makes sense. Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants