Details
Description
With branch 5.9 (did not test other branches), on Linux:
...
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.14", minimum required is "2")
– Found PythonLibs: /usr/lib/libpython2.7.so (found suitable version "2.7.14", minimum required is "2")
PYTHON_ARCH: 64
Traceback (most recent call last):
File "<string>", line 5, in <module>
ImportError: No module named utils
LLVM_CONFIG:
CMake Error at CMakeLists.txt:76 (message):
Unable to detect CLANG location by checking LLVM_INSTALL_DIR,
CLANG_INSTALL_DIR or running llvm-config.
– Configuring incomplete, errors occurred!
The script utils.py is located in /build_scripts subdirectory and out of PYTHONPATH reach,
if I copy utils.py to the root of the sources the configuration succeeds.
Here is where this import happens in shiboken, we see that the scripts must be in the top source dir:
macro(get_llvm_config)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "if True:
import os
import sys
sys.path.append(os.path.realpath(os.path.join('${CMAKE_CURRENT_LIST_DIR}', '..', '..')))
from utils import findLlvmConfig
llvmConfig = findLlvmConfig()
if llvmConfig:
print(llvmConfig)
"
OUTPUT_VARIABLE LLVM_CONFIG
OUTPUT_STRIP_TRAILING_WHITESPACE)
message("LLVM_CONFIG: " ${LLVM_CONFIG})
endmacro()