[lldb-dev] LLDB build searching for the wrong Python, again.

Adrian McCarthy via lldb-dev lldb-dev at lists.llvm.org
Thu Sep 3 13:42:28 PDT 2020


After rebasing, my local LLDB builds have again broken because it goes
looking for the wrong Python DLL.  I'm searching through git logs, but I'm
not seeing a related change.

Does anyone know what causes CMake to get confused about which Python
versions are installed?

LINK : fatal error LNK1104: *cannot open file 'python37_d.lib'*

Why is it looking for 3.7?  My CMake command uses every hint I know about
to ensure that it finds Python 3.8:

cmake -GNinja -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON
-DCMAKE_BUILD_TYPE=Debug -DLLDB_TEST_DEBUG_TEST_CRASHES=1
-DPYTHON_HOME="C:\Program Files\Python*38*" -DLLDB_PYTHON_HOME="C:\Program
Files\Python*38*" -DPython3_ROOT_DIR="C:\Program Files\Python*38*"
-DPython3_FIND_REGISTRY=LAST
-DLLDB_TEST_COMPILER=D:\src\llvm\build\ninja_dbg\bin\clang.exe
..\..\llvm-project\llvm -DLLVM_ENABLE_ZLIB=OFF
-DLLVM_ENABLE_PROJECTS="clang;lld;lldb;clang-tools-extra;compiler-rt"

My environment doesn't reference any other version of Python:

D:\src\llvm\llvm-project>set | find /I "python"
Path=C:\Program Files (x86)\Microsoft Visual
Studio\2019\Professional\VC\Tools\MSVC\14.24.28314\bin\HostX64\x64;C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Professional\Common7\IDE\VC\VCPackages;C:\Program Files
(x86)\Microsoft Visual
Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team
Explorer;C:\Program Files (x86)\Microsoft Visual
Studio\2019\Professional\MSBuild\Current\bin\Roslyn;C:\Program Files
(x86)\Microsoft Visual Studio\2019\Professional\Team Tools\Performance
Tools\x64;C:\Program Files (x86)\Microsoft Visual
Studio\2019\Professional\Team Tools\Performance Tools;C:\Program Files
(x86)\Microsoft Visual
Studio\Shared\Common\VSPerfCollectionTools\vs2019\\x64;C:\Program Files
(x86)\Microsoft Visual
Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files
(x86)\Windows Kits\10\bin\10.0.18362.0\x64;C:\Program Files (x86)\Windows
Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual
Studio\2019\Professional\\MSBuild\Current\Bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Professional\Common7\IDE\;C:\Program Files (x86)\Microsoft
Visual
Studio\2019\Professional\Common7\Tools\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\corpam;C:\Windows\ccmsetup;C:\Program
Files\Git\cmd;C:\Program
Files\Git\usr\bin;D:\src\util\GnuWin32\bin;C:\Program
Files\doxygen\bin;C:\Program
Files\Notepad++;D:\src\llvm\build\ninja_dbg\bin;D:\src\llvm\llvm-project\clang\tools\clang-format;C:\Program
Files\Python38;D:\src\llvm\llvm-project\llvm\utils\git-svn\;D:\src\util;D:\src\util\swigwin-3.0.12;C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program
Files (x86)\Microsoft Visual
Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
__VSCMD_PREINIT_PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\corpam;C:\Windows\ccmsetup;C:\Program
Files\Git\cmd;C:\Program
Files\Git\usr\bin;D:\src\util\GnuWin32\bin;C:\Program
Files\doxygen\bin;C:\Program
Files\Notepad++;D:\src\llvm\build\ninja_dbg\bin;D:\src\llvm\llvm-project\clang\tools\clang-format;*C:\Program
Files\Python38*
;D:\src\llvm\llvm-project\llvm\utils\git-svn\;D:\src\util;D:\src\util\swigwin-3.0.12

D:\src\llvm\llvm-project>where python
C:\Program Files\Python38\python.exe

D:\src\llvm\build\ninja_dbg>which python
/c/Program Files/Python38/python

I do not have 3.7 on my machine.  For a long while now, I've had to keep
exactly one version of Python on my machine specifically to prevent LLDB
builds from trying to mix versions.

But I'm stumped once again.

Clues appreciated,
Adrian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20200903/5712a421/attachment.html>


More information about the lldb-dev mailing list