Skip to content

Building on MacOS

Claudio edited this page Apr 18, 2020 · 7 revisions

In order to properly compile the plugin, you must make sure it is linked against the same python lib binary used by lldb. To find out this path, run:

lldb
(lldb) script
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> 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', '.']

In my case, the linked python is located under /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7. Finally, to link OpenImageDebugger against this specific python version, set the PKG_CONFIG_PATH environment variable to the folder lib/pkgconfig inside this python path, but do it before running qmake. In my case, I ran:

export PKG_CONFIG_PATH=/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/Current/lib/pkgconfig

Finally you can proceed with the normal compilation instructions:

git clone https://github.com/OpenImageDebugger/OpenImageDebugger.git
cd OpenImageDebugger
git submodule init
git submodule update
mkdir build && cd build
qmake .. BUILD_MODE=release PREFIX=/path/to/installation/folder
make -j4
make install

Clone this wiki locally