asdf-community / asdf-python

Python plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
661 stars 56 forks source link

Cannot install python 3.12 #185

Open rbutera opened 5 months ago

rbutera commented 5 months ago

Provide environment information

OS:
Linux Lancelot 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 GNU/Linux

SHELL:
zsh 5.9 (x86_64-debian-linux-gnu)

BASH VERSION:
5.2.26(1)-release

ASDF VERSION:
v0.14.0-ccdd47d

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/home/rai/.asdf
ASDF_DIR=/home/rai/.asdf
ASDF_CONFIG_FILE=/home/rai/.asdfrc

ASDF INSTALLED PLUGINS:
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master c5b7c40
python                       https://github.com/danhper/asdf-python.git master 5e277e2

To Reproduce

try to install python 3.12.x

Describe the Bug

Cannot install python 3.12.3, but installing 3.9.18 works

The output of the install command:

asdf install python 3.12.3
python-build 3.12.3 /home/rai/.asdf/installs/python/3.12.3
Downloading Python-3.12.3.tar.xz...
-> https://www.python.org/ftp/python/3.12.3/Python-3.12.3.tar.xz
Installing Python-3.12.3...

BUILD FAILED (Debian 12 using python-build 2.4.0-2-ge1f07da7)

Inspect or clean up the working tree at /tmp/python-build.20240419160626.65667
Results logged to /tmp/python-build.20240419160626.65667.log

Last 10 log lines:
/usr/bin/install -c -m 755 Modules/_lzma.cpython-312-x86_64-linux-gnu.so /home/rai/.asdf/installs/python/3.12.3/lib/python3.12/lib-dynload/_lzma.cpython-312-x86_64-linux-gnu.so
/usr/bin/install -c -m 755 Modules/zlib.cpython-312-x86_64-linux-gnu.so /home/rai/.asdf/installs/python/3.12.3/lib/python3.12/lib-dynload/zlib.cpython-312-x86_64-linux-gnu.so
/usr/bin/install -c -m 755 Modules/readline.cpython-312-x86_64-linux-gnu.so /home/rai/.asdf/installs/python/3.12.3/lib/python3.12/lib-dynload/readline.cpython-312-x86_64-linux-gnu.so
/usr/bin/install -c -m 755 Modules/_md5.cpython-312-x86_64-linux-gnu.so /home/rai/.asdf/installs/python/3.12.3/lib/python3.12/lib-dynload/_md5.cpython-312-x86_64-linux-gnu.so
/usr/bin/install -c -m 755 Modules/_sha1.cpython-312-x86_64-linux-gnu.so /home/rai/.asdf/installs/python/3.12.3/lib/python3.12/lib-dynload/_sha1.cpython-312-x86_64-linux-gnu.so
/usr/bin/install -c -m 755 Modules/_sha2.cpython-312-x86_64-linux-gnu.so /home/rai/.asdf/installs/python/3.12.3/lib/python3.12/lib-dynload/_sha2.cpython-312-x86_64-linux-gnu.so
/usr/bin/install -c -m 755 Modules/_sha3.cpython-312-x86_64-linux-gnu.so /home/rai/.asdf/installs/python/3.12.3/lib/python3.12/lib-dynload/_sha3.cpython-312-x86_64-linux-gnu.so
/usr/bin/install -c -m 755 Modules/_blake2.cpython-312-x86_64-linux-gnu.so /home/rai/.asdf/installs/python/3.12.3/lib/python3.12/lib-dynload/_blake2.cpython-312-x86_64-linux-gnu.so
/usr/bin/install: cannot stat 'Modules/_blake2.cpython-312-x86_64-linux-gnu.so': No such file or directory
make: *** [Makefile:2083: sharedinstall] Error 1

Expected Behaviour

I expect to be able to install python 3.12

meop commented 5 months ago

To summarize, it looks like you are trying to use asdf to install Python 3.12.3 on Debian 12 that is running under WSL2 on Windows.

I have tried on default Ubuntu, Debian, Kali under WSL2 myself and asdf installs Python 3.12.3 fine on them. I first install the required packages using apt as listed on the README for this project.

It seems like in your case, Python 3.12.3 configure script, as part of build, is finding a version of a shared library that contains BLAKE2 cryto hash support, and then is unable to find the expected C library at link time.

You can try first doing apt install libb2-dev first, and then asdf should be able to install Python 3.12.3 for you.

To find out more details about why your experience is different than most, you would have to dig more though the configure/install logs.

You could also run apt list --installed | grep -E 'ssl|crypto' to see if your system is not using the expected libraries:

libk5crypto3/stable,now 1.20.1-2+deb12u1 amd64 [installed]
libssl-dev/stable,stable-security,now 3.0.11-1~deb12u2 amd64 [installed]
libssl3/stable,stable-security,now 3.0.11-1~deb12u2 amd64 [installed]
openssl/stable,stable-security,now 3.0.11-1~deb12u2 amd64 [installed,automatic]