From b1c4ff27bde8c2874026d03904db85b70d4eaafb Mon Sep 17 00:00:00 2001 From: Andrew Sazonov Date: Wed, 24 Jul 2024 00:11:04 +0200 Subject: [PATCH] Update rpath delete template to follow gcc bump from 13.2.0 to 13.3.0 --- scripts.py | 24 ++++++++++++------------ scripts.toml | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/scripts.py b/scripts.py index eac8181..bcd8de3 100644 --- a/scripts.py +++ b/scripts.py @@ -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: diff --git a/scripts.toml b/scripts.toml index 891a8f9..fef2248 100644 --- a/scripts.toml +++ b/scripts.toml @@ -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' },