Skip to content

Building on MacOS System lldb

Anton Hromov edited this page Jan 3, 2022 · 1 revision

To find out the path of python library used by system-wide lldb, run:

lldb
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> script import sys; print(sys.path)

For instance, here I got the following results:

['/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A', '/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python3', '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python37.zip', '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7', '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/lib-dynload', '/Users/claudio.fernandes/Library/Python/3.7/lib/python/site-packages', '/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages', '.']

You have to find a directory (of listed above), which contains libpython*.dylib file inside. In my case, the linked python library is located under /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/libpython3.7.dylib. Jot this path down.

Then you have to find a directory which contains include files for this version of python. It should be close to the python library file. In my case include library is located under /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/include/python3.7. Jot this path down.

Clone this wiki locally