Stubgen does not respect RPath for transitive dependencies
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 20.6k
- Fork
- 3.3k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Bug Report
I have a library built with pybind11 that transitively links to libssl. Libssl in turn goes to load libcrypto, but gets the wrong version because it loads the system version, rather than using the $ORIGIN rpath in libssl. I ran stubgen under the debugger instead and found more strange behavior. The debugger stops on with ModuleInspect() as inspect: inside find_module_paths_using_imports but gives me a stack trace into the forkserver code. If I just put a breakpoint on that line in stubgen, and import my module, everything imports fine. However, stubgen gives me "Failed to import, skipping with error: /usr/lib/x86_64-linux-gnu/libcrypto.so.3: version `OPENSSL_3.6.0' not found (required by vcpkg/installed/x64-linux-dynamic/lib/libssl.so.3)"
To Reproduce
TODO: this might take some time for me to create a minimal example to reproduce it.
Actual Behavior
Failed to import, skipping with error: /usr/lib/x86_64-linux-gnu/libcrypto.so.3: version `OPENSSL_3.6.0' not found (required by vcpkg/installed/x64-linux-dynamic/lib/libssl.so.3)
Your Environment
- Mypy version used: 2.1.0
- Mypy command-line flags: stubgen.py -o ./stubs -m my_module
- Mypy configuration options from
mypy.ini(and other config files): - Python version used: 3.14.4
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 da find_module_paths_using_imports e dalla riga with ModuleInspect() as inspect:, usando il comando indicato stubgen.py -o ./stubs -m my_module. Per prima cosa crea la riproduzione minima promessa attorno alla configurazione pybind11/libssl/libcrypto; il lavoro è completato quando il fallimento dell’import dovuto a una mancata corrispondenza di versione viene riprodotto e poi impedito, senza modificare gli import normali.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- cli, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100