[Bug 48685] New: Minimum lldb Python wrapper SWIG requirement should be 3 not 2

Bug ID 48685
Summary Minimum lldb Python wrapper SWIG requirement should be 3 not 2
Product lldb
Version 11.0
Hardware PC
OS Linux
Status NEW
Severity enhancement
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter peter.klotz99@gmail.com
CC jdevlieghere@apple.com, llvm-bugs@lists.llvm.org

Compiling of lldb under Red Hat Enterprise Linux 7 (with SWIG 2 from the repo)
results in this error message:

Scanning dependencies of target swig_wrapper
[ 12%] Building LLDB Python wrapper
/home/build/devel/clang/11.0.0/llvm-project-11.0.0/lldb/bindings/./python/python-typemaps.swig:484:
Error: Syntax error in input(3).
make[2]: *** [tools/lldb/bindings/LLDBWrapPython.cpp] Error 1
make[1]: *** [tools/lldb/bindings/CMakeFiles/swig_wrapper.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 12%] Building CXX object
tools/clang/utils/TableGen/CMakeFiles/obj.clang-tblgen.dir/TableGen.cpp.o
[ 12%] Built target obj.clang-tblgen
make: *** [all] Error 2

In file python-typemaps.swig, line 484 one finds the C++11 keyword "delete":

481 struct Py_buffer_RAII {
482   Py_buffer buffer = {};
483   Py_buffer_RAII() {};
484   Py_buffer &operator=(const Py_buffer_RAII &) = delete;
485   Py_buffer_RAII(const Py_buffer_RAII &) = delete;
486   ~Py_buffer_RAII() {
487     if (buffer.obj)
488       PyBuffer_Release(&buffer);
489   }
490 };

C++11 support requires at least SWIG 3. So in my opinion the minimum
requirement should be changed.

After installing SWIG 3 from the CentOS 7 repo the build works fine.

Jonas Devlieghere changed bug 48685