Better_Software_Header_MobileBetter_Software_Header_Web

Find what you need - explore our website and developer resources

install_name_tool and Universal Binaries

How arm64 Affected an x86_64 App, and How We Fixed It

$ install_name_tool -delete_rpath /usr/local/lib <app bundle>/Contents/Python3/dist-packages/scipy/odr/__odrpack.cpython-39-darwin.so
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: /usr/local/lib found in: <app bundle>/Contents/Python3/dist-packages/scipy/odr/__odrpack.cpython-39-darwin.so (for architecture arm64), required for specified option "-delete_rpath /usr/local/lib"
$ lipo -archs <app bundle>/Contents/Python3/dist-packages/scipy/odr/__odrpack.cpython-39-darwin.so
x86_64 arm64
# Rename the original library
$ mv <app bundle>/Contents/Python3/dist-packages/scipy/odr/__odrpack.cpython-39-darwin.so <app bundle>/Contents/Python3/dist-packages/scipy/odr/__odrpack.cpython-39-darwin.so.universal

# Extract the x86_64 parts
$ lipo -thin x86_64 -output <app bundle>/Contents/Python3/dist-packages/scipy/odr/__odrpack.cpython-39-darwin.so <app bundle>/Contents/Python3/dist-packages/scipy/odr/__odrpack.cpython-39-darwin.so.universal

# Clean up the original
$ rm -f <app bundle>/Contents/Python3/dist-packages/scipy/odr/__odrpack.cpython-39-darwin.so.universal

About KDAB