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

"import _lldb" doesn't work on Windows with Python 3.8+ #46235

Open
tkrasnukha opened this issue Jul 29, 2020 · 0 comments
Open

"import _lldb" doesn't work on Windows with Python 3.8+ #46235

tkrasnukha opened this issue Jul 29, 2020 · 0 comments
Labels
bugzilla Issues migrated from bugzilla lldb

Comments

@tkrasnukha
Copy link
Member

Bugzilla Link 46891
Version unspecified
OS Windows NT
CC @JDevlieghere

Extended Description

This happens when liblldb.dll depends on non-system libraries (e.g. libxml2.dll).

To reproduce this issue, build LLDB with LibXML2 and run python_d -c "import _lldb".
The error will be "ImportError: DLL load failed while importing _lldb: The specified module could not be found". Neither PATH nor PYTHONPATH makes a difference.

Since version 3.8, Python stopped searching dlls in directories specified by PATH.
Now such paths should be specified by calling add_dll_directory() (https://docs.python.org/3.8/whatsnew/3.8.html#bpo-36085-whatsnew).

Seems like the function call should be placed in bindings/python.swig right before importing _lldb, however, I don't see a way to determine paths to dependencies there.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla lldb
Projects
None yet
Development

No branches or pull requests

1 participant