[swift-users] Python problem when compiling lldb

Lane Schwartz dowobeha at gmail.com
Thu Dec 10 09:29:45 CST 2015


Hi,

I'm still working on getting a clean compile on Scientific Linux 7.1. So
for I've gotten a compile (after applying Pull Request #282) when for the
basic build script with no additional flags (./swift/utils/build-script).

I'm now trying to also compile with lldb (./swift/utils/build-script
--lldb). When I do so I get the following error:

-- Build files have been written to:
> /home/lanes/swift/build/Ninja-DebugAssert/lldb-linux-x86_64
> ++ cmake_config_opt lldb
> ++ product=lldb
> ++ [[ Ninja == \X\c\o\d\e ]]
> + /home/lanes/cmake-3.4.1-Linux-x86_64.binary_distribution/bin/cmake
> --build /home/lanes/swift/build/Ninja-DebugAssert/lldb-linux-x86_64 -- all
> [10/845] Building CXX object
> scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o
> FAILED: /usr/bin/clang++   -DHAVE_PROCESS_VM_READV -DHAVE_ROUND
> -DLIBXML2_DEFINED -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
> -D__STDC_LIMIT_MACROS -Dreadline_EXPORTS -Iscripts/Python/modules/readline
> -I/home/lanes/swift/lldb/scripts/Python/modules/readline
> -I/home/lanes/swift/lldb/include -Iinclude
> -I/home/lanes/swift/build/Ninja-DebugAssert/llvm-linux-x86_64/include
> -I/home/lanes/swift/build/Ninja-DebugAssert/llvm-linux-x86_64/tools/clang/include
> -I/home/lanes/swift/llvm/include
> -I/home/lanes/swift/llvm/tools/clang/include
> -I/home/lanes/swift/build/Ninja-DebugAssert/swift-linux-x86_64/include
> -I/home/lanes/swift/swift/include -I/home/lanes/swift/lldb/source
> -I/usr/local/include/python3.4m
> -I/home/lanes/swift/lldb/tools/clang/include -I../clang/include
> -I/usr/include/libxml2 -std=c++11 -fcolor-diagnostics
> -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing
> -Wno-deprecated-register -Wno-vla-extension  -fno-exceptions -fno-rtti -g
> -fPIC -MMD -MT
> scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o -MF
> scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o.d -o
> scripts/Python/modules/readline/CMakeFiles/readline.dir/readline.cpp.o -c
> /home/lanes/swift/lldb/scripts/Python/modules/readline/readline.cpp
> /home/lanes/swift/lldb/scripts/Python/modules/readline/readline.cpp:68:34:
> error: assigning to 'char *(*)(FILE *, FILE *, const char *)' from
> incompatible type 'char *(FILE *, FILE *, char *)': type mismatch at 3rd
> parameter ('const char *' vs 'char *')
>     PyOS_ReadlineFunctionPointer = simple_readline;
>                                  ^ ~~~~~~~~~~~~~~~
> /home/lanes/swift/lldb/scripts/Python/modules/readline/readline.cpp:70:5:
> error: use of undeclared identifier 'Py_InitModule4'
>     Py_InitModule4(
>     ^
> 2 errors generated.



I've installed the python-devel, python27-python-devel, and
python33-python-devel packages, as well as swig.

The readline.cpp file where the error occurs imports Python.h. The header
file Python.h exists at /usr/include/python2.7/Python.h, and it includes
modsupport.h (/usr/include/python2.7/modsupport.h) which appears to define
Py_InitModule4.

Any thoughts or assistance would be appreciated.

Thanks,
Lane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151210/92da83f3/attachment.html>


More information about the swift-users mailing list