[lldb-dev] [Bug 44225] New: LLDB build error in llvmorg-9.0.1-rc1 with Python 2

via lldb-dev lldb-dev at lists.llvm.org
Wed Dec 4 22:42:12 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44225

            Bug ID: 44225
           Summary: LLDB build error in llvmorg-9.0.1-rc1 with Python 2
           Product: lldb
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: chrschn at google.com
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

LLDB fails to build against Python 2.X, I get the following error message:

/path/to/llvm-build/src/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp:52:25:
error: use of undeclared identifier 'PyMem_RawMalloc'; did you mean
'PyMem_Malloc'?
    char *ret = (char *)PyMem_RawMalloc(1);
                        ^~~~~~~~~~~~~~~
                        PyMem_Malloc
/path/to/llvm-build/workstation-sysroot/usr/include/python2.7/pymem.h:52:20:
note: 'PyMem_Malloc' declared here
PyAPI_FUNC(void *) PyMem_Malloc(size_t);
                   ^
/path/to/llvm-build/src/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp:60:23:
error: use of undeclared identifier 'PyMem_RawMalloc'; did you mean
'PyMem_Malloc'?
  char *ret = (char *)PyMem_RawMalloc(n + 2);
                      ^~~~~~~~~~~~~~~
                      PyMem_Malloc
/path/to/llvm-build/workstation-sysroot/usr/include/python2.7/pymem.h:52:20:
note: 'PyMem_Malloc' declared here
PyAPI_FUNC(void *) PyMem_Malloc(size_t);
                   ^
1 warning and 2 errors generated.


According to the Python documentation, PyMem_RawMalloc() was only introduced in
3.4: https://docs.python.org/3/c-api/memory.html

Looking at the cherry-picks between llvmorg-9.0.0-rc5 and llvmorg-9.0.1-rc1, I
suspect that this is caused by https://reviews.llvm.org/D69793.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20191205/c2423f08/attachment.html>


More information about the lldb-dev mailing list