Skip to content

Commit

Permalink
Update rpath delete template to follow gcc bump from 13.2.0 to 13.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSazonov committed Jul 23, 2024
1 parent a463ba6 commit 760b73e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
24 changes: 12 additions & 12 deletions scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,22 +1017,22 @@ def change_runpath_for_built_pycfml():
# shared objects step (CONFIG['build-shared']), but it didn't help :(
# Ubuntu usage examples:
# sudo find / -iname "libif*"
# ls -l pycrysfml08_dist/pycrysfml08
# patchelf --print-rpath pycrysfml08_dist/pycrysfml08/py_cfml_metrics.so
# patchelf --set-rpath '$ORIGIN' pycrysfml08_dist/pycrysfml08/py_cfml_metrics.so
# patchelf --print-rpath pycrysfml08_dist/pycrysfml08/py_cfml_metrics.so
# patchelf --no-default-lib pycrysfml08_dist/pycrysfml08/py_cfml_metrics.so
# ldd pycrysfml08_dist/pycrysfml08/py_cfml_metrics.so
# ls -l dist/pyCFML/pycrysfml
# patchelf --print-rpath dist/pyCFML/pycrysfml/crysfml08lib.so
# patchelf --set-rpath '$ORIGIN' dist/pyCFML/pycrysfml/crysfml08lib.so
# patchelf --print-rpath dist/pyCFML/pycrysfml/crysfml08lib.so
# patchelf --no-default-lib dist/pyCFML/pycrysfml/crysfml08lib.so
# ldd dist/pyCFML/pycrysfml/crysfml08lib.so
# ls -l /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pycrysfml08
# ldd /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/pycrysfml08/py_cfml_metrics.so
# macOS usage example:
# sudo find / -iname "libif*"
# ls -l pycrysfml08_dist/pycrysfml08
# install_name_tool -rpath /opt/intel/oneapi/compiler/2023.2.0/mac/bin/intel64/../../compiler/lib @loader_path pycrysfml08_dist/pycrysfml08/py_cfml_metrics.so
# install_name_tool -delete_rpath /usr/local/Cellar/gcc/13.2.0/lib/gcc/current pycrysfml08_dist/pycrysfml08/py_cfml_metrics.so
# install_name_tool -change /usr/local/opt/gcc/lib/gcc/current/libgfortran.5.dylib @rpath/libgfortran.5.dylib pycrysfml08_dist/pycrysfml08/py_cfml_metrics.so
# otool -L pycrysfml08_dist/pycrysfml08/py_cfml_metrics.so
# otool -l pycrysfml08_dist/pycrysfml08/py_cfml_metrics.so | grep RPATH -A2
# ls -l dist/pyCFML/pycrysfml
# install_name_tool -rpath /opt/intel/oneapi/compiler/2023.2.0/mac/bin/intel64/../../compiler/lib @loader_path dist/pyCFML/pycrysfml/crysfml08lib.so
# install_name_tool -delete_rpath /usr/local/Cellar/gcc/13.2.0/lib/gcc/current dist/pyCFML/pycrysfml/crysfml08lib.so
# install_name_tool -change /usr/local/opt/gcc/lib/gcc/current/libgfortran.5.dylib @rpath/libgfortran.5.dylib dist/pyCFML/pycrysfml/crysfml08lib.so
# otool -l dist/pyCFML/pycrysfml/crysfml08lib.so | grep RPATH -A2
# otool -L dist/pyCFML/pycrysfml/crysfml08lib.so
try:
rpaths = CONFIG['build']['rpaths'][_platform()][_processor()][_compiler_name()]
except KeyError:
Expand Down
18 changes: 12 additions & 6 deletions scripts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,20 @@ rpaths.linux.x86_64.ifx = [
{ old = '', new = "'$ORIGIN'" },
] # set rpath to point to '$ORIGIN'
rpaths.macos.i386.gfortran = [
{ old = '/usr/local/Cellar/gcc/13.2.0/lib/gcc/current/gcc/x86_64-apple-darwin21/13', new = '' }, # delete all rpaths besides @loader_path
{ old = '/usr/local/Cellar/gcc/13.2.0/lib/gcc/current/gcc', new = '' }, # delete all rpaths besides @loader_path
{ old = '/usr/local/Cellar/gcc/13.2.0/lib/gcc/current', new = '' }, # delete all rpaths besides @loader_path
#{ old = '/usr/local/Cellar/gcc/13.2.0/lib/gcc/current/gcc/x86_64-apple-darwin21/13', new = '' }, # delete all rpaths besides @loader_path
#{ old = '/usr/local/Cellar/gcc/13.2.0/lib/gcc/current/gcc', new = '' }, # delete all rpaths besides @loader_path
#{ old = '/usr/local/Cellar/gcc/13.2.0/lib/gcc/current', new = '' }, # delete all rpaths besides @loader_path
{ old = '/usr/local/Cellar/gcc@13/13.3.0/lib/gcc/13/gcc/x86_64-apple-darwin21/13', new = '' }, # delete all rpaths besides @loader_path
{ old = '/usr/local/Cellar/gcc@13/13.3.0/lib/gcc/13/gcc', new = '' }, # delete all rpaths besides @loader_path
{ old = '/usr/local/Cellar/gcc@13/13.3.0/lib/gcc/13', new = '' }, # delete all rpaths besides @loader_path
]
rpaths.macos.arm.gfortran = [
{ old = '/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13', new = '' }, # delete all rpaths besides @loader_path
{ old = '/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc', new = '' }, # delete all rpaths besides @loader_path
{ old = '/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current', new = '' }, # delete all rpaths besides @loader_path
#{ old = '/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13', new = '' }, # delete all rpaths besides @loader_path
#{ old = '/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc', new = '' }, # delete all rpaths besides @loader_path
#{ old = '/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current', new = '' }, # delete all rpaths besides @loader_path
{ old = '/opt/homebrew/Cellar/gcc@13/13.3.0/lib/gcc/13/gcc/aarch64-apple-darwin23/13', new = '' }, # delete all rpaths besides @loader_path
{ old = '/opt/homebrew/Cellar/gcc@13/13.3.0/lib/gcc/13/gcc', new = '' }, # delete all rpaths besides @loader_path
{ old = '/opt/homebrew/Cellar/gcc@13/13.3.0/lib/gcc/13', new = '' }, # delete all rpaths besides @loader_path
]
rpaths.macos.i386.ifort = [
{ old = '/opt/intel/oneapi/compiler/2023.2.0/mac/bin/intel64/../../compiler/lib', new = '@loader_path' },
Expand Down

0 comments on commit 760b73e

Please sign in to comment.