My debugging headache today is absolute paths to shared libraries.

My debugging headache today is absolute paths to shared libraries. If you recognize this solution, then we share a common bond of pain…

install_name_tool -change “$abspath/$dylib” “@executable_path/$dylib”$libfile

I’ve solved this same problem so many times in so many different jobs but it still bites me…

The symptom is that the app fails to launch in release due to a missing lib, but in debug it launches successfully with two copies of the lib loaded into memory, one from the relative path and one from the absolute path. And two libs means there are two of each singleton, which is really evil.