I need to relink a file with the install_name_tool
. The file in question let me change one of the dylib paths, but when I change the second (of 7), I get this error:
install_name_tool: changing install names or rpaths can't be redone for: some/library (for architecture i386) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)
After googling around I found that there simply is not enough room for the new paths within the file, and that I might be able to use the ld
tool, or the libtool
to fix this. However, I am not able to figure out how. I do not have the source code for this library, so I cannot recompile it.
Is there any way for me to update all the dylib paths for this file? Any help would be very much appreciated!
I am on osx 10.10
The command I am using: install_name_tool -change old/dylib/path.dylib new/dylib/path.dylib file/to/update
The problem is in your binary, not the libraries. Do what the warning suggests. Add -headerpad_max_install_names
to the ld flags used to link your binary. If you are using Xcode, you can put it in your target's Other Linker Flags build setting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With