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

Can't create virtual environment on ARMv7 Linux Musl #7529

Closed
patrick-5546 opened this issue Sep 19, 2024 · 6 comments
Closed

Can't create virtual environment on ARMv7 Linux Musl #7529

patrick-5546 opened this issue Sep 19, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@patrick-5546
Copy link

This is what I get trying to create a virtual environment:

$ uv venv
  × Could not detect either glibc version nor musl libc version, at least one of which is required

Someone else also observed this issue here: #1438, but it was not fixed by #1427

I used the installation script to install version 0.4.12

@charliermarsh charliermarsh added the bug Something isn't working label Sep 19, 2024
@zanieb
Copy link
Member

zanieb commented Sep 19, 2024

I wonder if we didn't port the fix when we added the code again?

cc @konstin

@patrick-5546
Copy link
Author

My situation may be a bit of a unique case, as I am running Linux on an ARM processor on the DE1-SoC FPGA. Here is some more information about my system

$ cat /proc/version
Linux version 3.18.0 (altera@altera-Inspiron-5558) (gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1) ) #9 SMP Mon Aug 8 17:11:41 EDT 2016

$ lscpu
Architecture:          armv7l
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             1

$ ldd --version
ldd (Ubuntu EGLIBC 2.15-0ubuntu10.23) 2.15
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

$ file .local/bin/uv
.local/bin/uv: ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped

$ musl
zsh: command not found: musl

@patrick-5546
Copy link
Author

patrick-5546 commented Sep 19, 2024

Looks like there isn't a pre-built python binary that can run on my system, as the gnu versions require glibc >= 2.17, and there is no musl version

$ wget https://github.com/indygreg/python-build-standalone/releases/download/20240909/cpython-3.11.10+20240909-armv7-unknown-linux-gnueabihf-install_only_stripped.tar.gz
...

$ tar -xzf cpython-3.11.10+20240909-armv7-unknown-linux-gnueabihf-install_only_stripped.tar.gz

$ ./python --version
./python: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.17' not found (required by /home/root/Downloads/python/bin/../lib/libpython3.11.so.1.0)
./python: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.16' not found (required by /home/root/Downloads/python/bin/../lib/libpython3.11.so.1.0)

Resources

Update

As a workaround, I was able to compile Python 3.8.20 from source (albeit with some failing and skipped tests) and use that to create a virtual environment

uv venv --python /usr/local/bin/python3.8

@zanieb
Copy link
Member

zanieb commented Jan 6, 2025

I think we can merge this with the musl issue then? ref #6890

@zanieb zanieb closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2025
@patrick-5546
Copy link
Author

The issue you linked is for apple silicon which is armv8, this issue is for armv7. Is support not planned for this?

@zanieb
Copy link
Member

zanieb commented Jan 6, 2025

The issue I linked discusses static musl builds in general, but yeah it's for aarch64 (though not apple silicon specifically? I don't know where you got that from). You can track armv7 musl support in astral-sh/python-build-standalone#229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants