A tip about install_name_tool

Install_name_tool is a trick to hack up an executable so that it is using specific dynamic libraries. It is very handy for embedding libraries in the bundle. However, there might not be enough room in the binary for the new name. Here is a solution from Apple Developer Forums.

It's a linker option.  It's documented in the ld man page.
The idea is that install_name_tool is changing the contents of one of the Mach-O loader commands in the executable in place.  It's not completely rebuilding the executable.  So, the new install name needs to fit in the space that was already allocated for the existing loader command.  There's no guarantee that there's enough space for the new name if it's longer than the old name, unless you tell the linker to set aside additional space at the time the executable is built.  That's what -headerpad_max_install_names does.