Files
chia-blockchain/build_scripts/remove_brew_rpaths.sh
dependabot[bot]andEarle Lowe fa339a591e build(deps): bump pyinstaller from 6.15.0 to 6.16.0 (#20074)
* build(deps): bump pyinstaller from 6.15.0 to 6.16.0

Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 6.15.0 to 6.16.0.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.15.0...v6.16.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-version: 6.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* wider find command due to pyinstaller path changes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Earle Lowe <e.lowe@chia.net>
2025-10-22 10:25:05 -07:00

43 lines
1.1 KiB
Bash

#!/usr/bin/env bash
set -eo pipefail
# Removes rpath loader commands from _ssl.cpython-*.so which are sometimes
# added on Apple M-series CPUs, prefer bundled dynamic libraries for which
# there is an rpath added already as "@loader_path/.." -- however, the
# homebrew rpaths appear with higher precedence, potentially causing issues.
# See: #18099
echo ""
echo "Stripping brew rpaths..."
rpath_name=/opt/homebrew/lib
so_path=$(find "dist/daemon/_internal/" -name "_ssl.cpython-*.so")
if [[ -z "${so_path}" ]]; then
>&2 echo "Failed to find _ssl.cpython-*.so"
fi
echo "Found '_ssl.cpython-*.so' at '$so_path':"
otool -l "$so_path"
echo ""
set +e
nt_output=
r=0
while [[ $r -eq 0 ]]; do
install_name_tool -delete_rpath $rpath_name "$so_path" 2>&1 | read -r nt_output
r=$?
done
if [[ -n "$nt_output" ]]; then
echo "$nt_output" | grep "no LC_RPATH load command with path:" >/dev/null
# shellcheck disable=SC2181
if [[ $? -ne 0 ]]; then
>&2 echo "An unexpected error occurred when running install_name_tool:"
>&2 echo "$nt_output"
fi
fi
echo "Done."
echo ""