[Lldb-commits] [PATCH] D67583: Fix swig python package path
Hal Gentz via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 17 17:42:19 PDT 2019
ZeGentzy reopened this revision.
ZeGentzy added a comment.
This revision is now accepted and ready to land.
Hello folks,
These changes break running `ninja install` when building with `-D LLVM_LIBDIR_SUFFIX=32`.
[...]
-- Up-to-date: /build/llvm-git-gentz/pkg/lib32-llvm-git-gentz/opt/llvm32/include
-- Up-to-date: /build/llvm-git-gentz/pkg/lib32-llvm-git-gentz/opt/llvm32/include/lldb
-- Up-to-date: /build/llvm-git-gentz/pkg/lib32-llvm-git-gentz/opt/llvm32/include/lldb/Host
-- Installing: /build/llvm-git-gentz/pkg/lib32-llvm-git-gentz/opt/llvm32/include/lldb/Host/Config.h
CMake Error at tools/lldb/scripts/cmake_install.cmake:41 (file):
file INSTALL cannot find
"/build/llvm-git-gentz/src/_build32_final/./lib/python3.7".
Call Stack (most recent call first):
tools/lldb/cmake_install.cmake:50 (include)
tools/cmake_install.cmake:50 (include)
cmake_install.cmake:68 (include)
FAILED: CMakeFiles/install.util
cd /build/llvm-git-gentz/src/_build32_final && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand failed.
After some investigation, I found that there is no `/build/llvm-git-gentz/src/_build32_final/./lib/python3.7` but there is an `/build/llvm-git-gentz/src/_build32_final/./lib32/python3.7`.
I've temporary solved this problem by applying the following patch:
diff --git a/lldb/scripts/CMakeLists.txt b/lldb/scripts/CMakeLists.txt
index 9de96ef5565..7d346deee7f 100644
--- a/lldb/scripts/CMakeLists.txt
+++ b/lldb/scripts/CMakeLists.txt
@@ -47,7 +47,7 @@ if(NOT LLDB_BUILD_FRAMEWORK)
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
set(swig_python_subdir Lib/site-packages)
else()
- set(swig_python_subdir lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
+ set(swig_python_subdir lib${LLVM_LIBDIR_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
endif()
set(SWIG_PYTHON_DIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${swig_python_subdir})
I believe solving this problem correctly would also involve updating https://github.com/python/cpython/blob/3.8/Lib/distutils/sysconfig.py#L150 to account for `${LLVM_LIBDIR_SUFFIX}`, however, I've never having used the script before and am unfamiliar with it's purpose.
@hhb Could you please revisit this revision so that it doesn't break builds with a modified `LLVM_LIBDIR_SUFFIX` and revert this revision until then?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67583/new/
https://reviews.llvm.org/D67583
More information about the lldb-commits
mailing list