(original) (raw)
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.
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.
From: llvm-dev on behalf of Neil Nelson via llvm-dev
Sent: 16 February 2020 02:42
To: llvm-dev@lists.llvm.org
Subject: \[llvm-dev\] cmake finishes OK for all the projects except debuginfo-tests.
Sent: 16 February 2020 02:42
To: llvm-dev@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
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