Cannot install from source

Dear folks,

I am trying to build & install LLVM, Clang and LLDB from source. Now the build completes fine, while the target `install’ fails:

– Up-to-date: /opt/llvm/6.0.1/include/lldb/Host/Config.h
CMake Error at tools/lldb/scripts/cmake_install.cmake:41 (file):
file INSTALL cannot find “/opt/llvm/build/lib/python2.7”.
Call Stack (most recent call first):
tools/lldb/cmake_install.cmake:51 (include)
tools/cmake_install.cmake:49 (include)
cmake_install.cmake:65 (include)

make: *** [Makefile:140: install] Error 1

I am on branch `release 6.0’, out of source build, all the defaults with the exception of the build type set to Release, custom prefix path, and target to build X86. The system is a Linux Fedora v28.

Suggestions on how to move on? :slight_smile:

Yours,
Quack

When I do a build on Linux, in /lib I see a directory called python2.7, with a subdirectory site-packages. Do you not see this?

Are you building with a different python version than 2.7.x?

Indeed that folder is not present. Python 2.7 is installed and it is the default version of the system, I’m not changing its setting in the build.

It should be built by the “lldb” target. What does that do?

the target is built fine, with no warnings or other related messages. I tried to dig a bit, but I wasn’t able to understand how it is supposed to be built . The only refs I’ve found are inside lldbUtility, protected by a guard on LLVM_BUILD_STATIC which does seem to be defined nowhere, and scripts/install_custom_python.py which seems to be mostly concerning windows.

Quack

just a quick update, I moved on by commenting out the lines 40-42 in build/tools/lldb/scripts/cmake_install.cmake:

if(“x${CMAKE_INSTALL_COMPONENT}x” STREQUAL “xUnspecifiedx” OR NOT CMAKE_INSTALL_COMPONENT)
file(INSTALL DESTINATION “${CMAKE_INSTALL_PREFIX}/lib” TYPE DIRECTORY FILES “/opt/llvm/build/lib/python2.7”)
endif()

Quack