[PATCH] D64812: [CMake] Fail when Python interpreter doesn't match Python libraries version

Adrian McCarthy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 15:19:15 PDT 2019


amccarth added a comment.

In D64812#1588061 <https://reviews.llvm.org/D64812#1588061>, @rnk wrote:

> In D64812#1588055 <https://reviews.llvm.org/D64812#1588055>, @rnk wrote:
>
> > You broke my build. =/ I got this output:
> >
> >   CMake Error at C:/src/llvm-project/lldb/cmake/modules/LLDBConfig.cmake:201 (message):
> >     Found incompatible Python interpreter (3.7.3) and Python libraries ()
> >
> >
> > I'll mess with it a bit I guess.
>
>
> Fixed that in r366247. Apparently Windows has totally custom Python version detection logic.


Still busted for me, even with rnk's fix:

- LLDB Found PythonExecutable: C:/Python36/python_d.exe
- LLDB Found PythonLibs: C:/Python36/libs/python36_d.lib
- LLDB Found PythonDLL: C:/Python36/python36_d.dll
- LLDB Found PythonIncludeDirs: C:/Python36/Include CMake Error at D:/src/llvm/mono/llvm-project/lldb/cmake/modules/LLDBConfig.cmake:204 (message): Found incompatible Python interpreter (2.7.15) and Python libraries (3.6.8)

Note that it found all the Python things, but somehow the Python interpreter is still set incorrectly.  I haven't been able to find where PYTHON_VERSION_STRING gets set, but it seems to happen long before the Windows-specific detection logic and it seems to ignore the PYTHON_HOME setting.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64812/new/

https://reviews.llvm.org/D64812





More information about the llvm-commits mailing list