[MAC OS X] Fix missing libraries of an existing binary by adding correct @rpath rpath LC_RPATH commands to the executable

Adding missing library path to an existing OS X binary: For example:¬†open tracker (see https://github.com/opentrack/opentrack) misses the correct relative @rpath: otool -l /Applications/opentrack.app/Contents/MacOS/opentrack.bin | grep @rpath name @rpath/QtWidgets.framework/Versions/5/QtWidgets (offset 24) name @rpath/QtGui.framework/Versions/5/QtGui (offset 24) name @rpath/QtNetwork.framework/Versions/5/QtNetwork (offset 24) name @rpath/QtCore.framework/Versions/5/QtCore (offset 24) Where @rpath is at: Load command 28 cmd LC_RPATH cmdsize 56 path /Users/sthalik/dev/opentrack/build/install … [Read more…]