Issue with osxrelocater/install_name_tool on 1.17.2 MacOS framework
I have issues when trying to relocate an installation of the GStreamer.framework version 1.17.2. Both when installing official binaries and building from master (1.17.2.1).
With version 1.14.5 and 1.16.2 it works as expected, so not sure what has changed.
Running this:
osxrelocator -r \
GStreamer.framework/Versions/Current \
/Library/Frameworks/GStreamer.framework/ \
@executable_path/../Frameworks/GStreamer.framework/
Results in:
call ['install_name_tool', '-change', b'/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/GStreamer', b'@executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/GStreamer', 'GStreamer.framework/Versions/Current/GStreamer']
call ['install_name_tool', '-change', b'/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstcodecparsers-1.0.0.dylib', b'@executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/libgstcodecparsers-1.0.0.dylib', 'GStreamer.framework/Versions/Current/GStreamer']
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: changing install names or rpaths can't be redone for: GStreamer.framework/Versions/Current/GStreamer (for architecture x86_64) 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)
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/osxrelocator/__init__.py", line 33, in shell_call
env=os.environ.copy())
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['install_name_tool', '-change', b'/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstcodecparsers-1.0.0.dylib', b'@executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/libgstcodecparsers-1.0.0.dylib', 'GStreamer.framework/Versions/Current/GStreamer']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/osxrelocator", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/osxrelocator/__init__.py", line 157, in main
main.run()
File "/usr/local/lib/python3.7/site-packages/osxrelocator/__init__.py", line 152, in run
relocator.relocate()
File "/usr/local/lib/python3.7/site-packages/osxrelocator/__init__.py", line 70, in relocate
self.parse_dir(self.root, filters=['', '.dylib', '.so'])
File "/usr/local/lib/python3.7/site-packages/osxrelocator/__init__.py", line 102, in parse_dir
self.relocate_file(fn)
File "/usr/local/lib/python3.7/site-packages/osxrelocator/__init__.py", line 73, in relocate_file
self.change_libs_path(object_file)
File "/usr/local/lib/python3.7/site-packages/osxrelocator/__init__.py", line 89, in change_libs_path
shell_call(cmd)
File "/usr/local/lib/python3.7/site-packages/osxrelocator/__init__.py", line 36, in shell_call
raise SystemError("Error running command: {}".format(cmd))
SystemError: Error running command: ['install_name_tool', '-change', b'/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstcodecparsers-1.0.0.dylib', b'@executable_path/../Frameworks/GStreamer.framework/Versions/1.0/lib/libgstcodecparsers-1.0.0.dylib', 'GStreamer.framework/Versions/Current/GStreamer']