[llvm-dev] cmake finishes OK for all the projects except debuginfo-tests.

David Spickett via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 17 01:38:58 PST 2020


Hi Neil,

CMake is using whatever "python" is, which is Python2 for me so I get the same error.

You can specify the Python exe directly[0] by adding this:
-DPYTHON_EXECUTABLE=`which python3`

That gets you to:
CMake Error at /work/open_source/llvm-project/llvm/cmake/modules/AddLLVM.cmake:1543 (add_dependencies):
  The dependency target "clang" of target "check-debuginfo" does not exist.

To fix that you can just add "clang" to LLVM_ENABLE_PROJECTS.

There is a specific FindPython3 module [1] that debuginfo-tests could use but I'm not sure if it's available in the minimum CMake version we require.

Thanks,
David Spickett.

[0] https://cmake.org/cmake/help/v3.0/module/FindPythonInterp.html
[1] https://cmake.org/cmake/help/v3.12/module/FindPython3.html

________________________________
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Neil Nelson via llvm-dev <llvm-dev at lists.llvm.org>
Sent: 16 February 2020 02:42
To: llvm-dev at lists.llvm.org <llvm-dev at lists.llvm.org>
Subject: [llvm-dev] cmake finishes OK for all the projects except debuginfo-tests.

cmake -G Ninja -DLLVM_ENABLE_PROJECTS="debuginfo-tests" -DLLVM_USE_LINKER=lld -DCMAKE_BUILD_TYPE="Release" -DLLVM_TARGETS_TO_BUILD=X86 -Wno-dev ../llvm &> ../../cmake.log

in cmake.log
-- Targeting X86
CMake Error at /home/nnelson/Documents/llvm-project/debuginfo-tests/CMakeLists.txt:30 (message):
  Cannot run debuginfo-tests without python 3

installed
python3 --version
Python 3.7.5

python --version
Python 2.7.17

in llvm-project/debuginfo-tests/CMakeLists.txt
elseif(PYTHON_VERSION_MAJOR LESS 3)
  message(FATAL_ERROR "Cannot run debuginfo-tests without python 3")

Neil Nelson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200217/a319e12c/attachment.html>


More information about the llvm-dev mailing list