[lldb-dev] LLDB problem about building with Python

Rui Hong via lldb-dev lldb-dev at lists.llvm.org
Thu Mar 12 02:50:00 PDT 2020


Hi LLDB devs,

I'm working on porting LLDB to my own architecture.
I choose to use the target-definition-file(python) to let LLDB support my architecture based on my situation(already have a workable GDB-stub and the target is an embedded DSP). The usage:
 (lldb) settings set plugin.process.gdb-remote.target-definition-file /path/to/xxxx_target_definition.py
 (lldb) gdb-remote xxxx

So I think I definitely need to rebuild LLDB with python support(cmake with -DLLDB_ENABLE_PYTHON=1 according to https://lldb.llvm.org/resources/build.html). But problem comes:
getting this error:
************************

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/export/pfs/home/lte_dsp/hongrui/DEBUG/jihai_lldb/jihai_lldb/lldb/scripts/Python/modules/readline/libedit_INCLUDE_DIRS
   used as include directory in directory /export/pfs/home/lte_dsp/hongrui/DEBUG/jihai_lldb/jihai_lldb/lldb/scripts/Python/modules/readline
libedit_LIBRARIES (ADVANCED)
    linked by target "readline" in directory /export/pfs/home/lte_dsp/hongrui/DEBUG/jihai_lldb/jihai_lldb/lldb/scripts/Python/modules/readline

************************
This problem persists even after I add -DLLDB_ENABLE_LIBEDIT=0
My cmake version is 3.5.2, the LLDB/LLVM version I choose to work with is 7.0.1

My complete command is:
************************
cmake -G "Unix Makefiles" -DLLDB_ENABLE_LIBEDIT=0 -DLLDB_ENABLE_PYTHON=1 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib64/libpython2.7.so.1.0 -DLLVM_TARGETS_TO_BUILD=JiHai -DLLVM_ENABLE_PROJECTS='lldb' -DLLDB_EXPORT_ALL_SYMBOLS=1 -DCMAKE_BUILD    _TYPE=Debug -DCMAKE_INSTALL_PREFIX=. ../llvm
make -j 8

************************
Why the error persists even with -DLLDB_ENABLE_LIBEDIT=0? Does this mean that LLDB python support also need libedit? And what should I do to make LLDB_build_with_python correct(I just want to use the target-definition-file)?


Kind regards,
Rui
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20200312/a31b0622/attachment-0001.html>


More information about the lldb-dev mailing list