python3-config folder dependent result
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 36k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Bug report
Python is build into a manylinux_2_28 docker image with following commands (image is py3.11-latest from my dockerhub repo, created with this Dockerfile):
./configure --enable-shared --enable-optimizations --disable-test-modules --prefix=/opt/build_python/installed
make altinstall
the process ends correctly, at the end I found the content into expected folder
/opt/build_python/installed/lib
├── [lrwxrwxrwx root root ] libpython3.11.so -> libpython3.11.so.1.0
├── [-rwxr-xr-x root root ] libpython3.11.so.1.0
├── [-rwxr-xr-x root root ] libpython3.so
/opt/build_python/installed/bin
├── [-rwxr-xr-x root root ] 2to3-3.11
├── [-rwxr-xr-x root root ] idle3.11
├── [-rwxr-xr-x root root ] pip3.11
├── [-rwxr-xr-x root root ] pydoc3.11
├── [-rwxr-xr-x root root ] python3.11
└── [-rwxr-xr-x root root ] python3.11-config
and if I run python3.11-config FROM INSIDE that folder I obtain the expected result (look at the -L part)
[root@919ee1a66e62 opt]# /opt/build_python/installed/bin/python3.11-config --embed --ldflags
-L/opt/build_python/installed/lib -lpython3.11 -lpthread -ldl -lutil -lm
If I do link that executable into /usr/local/bin and then run the same command, the output at -L flag part is different:
[root@919ee1a66e62 opt]# ln -s /opt/build_python/installed/bin/python3.11-config /usr/local/bin/python3-config
[root@919ee1a66e62 opt]# file /usr/local/bin/python3-config
/usr/local/bin/python3-config: symbolic link to /opt/build_python/installed/bin/python3.11-config
[root@919ee1a66e62 opt]# ls -l /usr/local/bin/python3-config
lrwxrwxrwx 1 root root 49 Feb 9 10:05 /usr/local/bin/python3-config -> /opt/build_python/installed/bin/python3.11-config
[root@919ee1a66e62 opt]# /usr/local/bin/python3-config --embed --ldflags
-L/usr/local/lib -lpython3.11 -lpthread -ldl -lutil -lm
this difference, when building C extension, led to have an error on dl phase cannot find -lpython3.11: No such file or directory because of wrong lib folder used.
I expected that python3-config's output, even if executed via symlink, should be the same.
Please let me know if my expectation is not correct, thanks.
Your environment
A manylinux_2_28_86_x64 docker image used to build python 3.11.1 into.
Then doing the steps above into the docker container.
- CPython versions tested on: 3.11.1
- Operating system and architecture: manylinux (CentOS) , x64
Thanks for this awesome programming language.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con i comandi configure e make altinstall riportati, quindi esamina i file generati /opt/build_python/installed/bin/python3.11-config e Dockerfile_2_28_x64_py311. Esegui direttamente la sua forma --embed --ldflags e tramite il link simbolico /usr/local/bin/python3-config, quindi determina se entrambe le invocazioni dovrebbero produrre lo stesso percorso della libreria.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, shell
- Ambito
- build-system
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100