llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.71k stars 10.94k forks source link

[Windows] lldb fails to start (missing python36.dll) #43432

Open MarkIngramUK opened 4 years ago

MarkIngramUK commented 4 years ago
Bugzilla Link 44087
Version 9.0
OS Windows NT
Attachments Screenshot of error message
CC @JDevlieghere

Extended Description

Attempting to run lldb (9.0) on Windows results in an error dialog with the following message:

lldb.exe - System Error The code execution cannot proceed because python36.dll was not found. Reinstalling the program may fix this problem.

Running via Git Bash rather than cmd or Explorer results in a similar error message:

C:/Program Files/LLVM/bin/lldb.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

MarkIngramUK commented 4 years ago

(It's worth noting that adding the Python install directory to %PATH% is not the default option in the Python installer)

MarkIngramUK commented 4 years ago

I've just installed Python 3.6.8, and added Python to the PATH environment variable, and now lldb correctly starts.

Is this the expected behaviour? The only reference I could find was to running LLVM tests which requires >= Python 2.7.

MarkIngramUK commented 4 years ago

Sure, I’ll install it on my machine with no Python installation and see if it makes a difference.

JDevlieghere commented 4 years ago

Thanks Mark! I'm no expert on the Windows side of things, but given that the error explicitly mentions Python 3.6, could you install that and see if that changes anything?

MarkIngramUK commented 4 years ago

I downloaded LLVM from http://releases.llvm.org/download.html. On one machine I have Python 3.7 installed, on another machine I don't have any Python installations (both give the same errors).

Let me know if you need any other information.

JDevlieghere commented 4 years ago

How did you install LLDB or where did you get it from. Did you build it yourself? Do you have Pythno 3.6 installed?

JDevlieghere commented 4 years ago

We'll need some more information to make this bug report actionable.

FuXiii commented 2 years ago

I got the same issue I download llvm from https://releases.llvm.org/download.html If I run lldb --version in cmd it output: python36.dll was not found. If I run lldb --version in gitbush it output: F:/LLVM/bin/lldb.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

and my llvm version is 13.0.1:

C:\Users\g1018>clang++ --version
clang version 13.0.1
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: F:\LLVM\bin

and I use Everything application to find python36.dll file, but this file not the python default install file. I must copy it from other where. And when I develop in vscode with CodeLLDB extension the lldb will show wrong info when you debugging code. Such like you have 100 capacity vector but the lldb will show vector::size = 0