##############################################################################
##############################################################################
###
### Running command:
###
###   rm -rf rhdf5client.buildbin-libdir && mkdir rhdf5client.buildbin-libdir && /Users/biocbuild/BBS/utils/build-universal.sh rhdf5client_1.28.0.tar.gz /Library/Frameworks/R.framework/Resources/bin/R rhdf5client.buildbin-libdir
###
##############################################################################
##############################################################################


>>>>>>> 
>>>>>>> INSTALLATION WITH 'R CMD INSTALL --preclean --no-multiarch --library=rhdf5client.buildbin-libdir rhdf5client_1.28.0.tar.gz'
>>>>>>> 

* installing *source* package ‘rhdf5client’ ...
** using staged installation
** libs
using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
using SDK: ‘MacOSX11.3.sdk’
clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/opt/R/x86_64/include    -fPIC  -falign-functions=64 -Wall -g -O2  -c extract.c -o extract.o
clang -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o rhdf5client.so extract.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/biocbuild/bbs-3.20-bioc/meat/rhdf5client.buildbin-libdir/00LOCK-rhdf5client/00new/rhdf5client/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (rhdf5client)


>>>>>>> 
>>>>>>> FIXING PATHS TO DYNAMIC LIBRARIES FOR rhdf5client.buildbin-libdir/rhdf5client/libs/rhdf5client.so
>>>>>>> 

>>>>>>> Paths before fix:
rhdf5client.buildbin-libdir/rhdf5client/libs/rhdf5client.so:
	rhdf5client.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libR.dylib (compatibility version 4.4.0, current version 4.4.2)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1775.118.101)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)

>>>>>>> Fix with install_name_tool:
install_name_tool -change "/usr/local/lib/libgcc_s.1.1.dylib" "/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libgcc_s.1.1.dylib" "rhdf5client.buildbin-libdir/rhdf5client/libs/rhdf5client.so"
install_name_tool -change "/usr/local/lib/libgfortran.5.dylib" "/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libgfortran.5.dylib" "rhdf5client.buildbin-libdir/rhdf5client/libs/rhdf5client.so"
install_name_tool -change "/usr/local/lib/libquadmath.0.dylib" "/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libquadmath.0.dylib" "rhdf5client.buildbin-libdir/rhdf5client/libs/rhdf5client.so"

>>>>>>> Paths after fix:
rhdf5client.buildbin-libdir/rhdf5client/libs/rhdf5client.so:
	rhdf5client.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libR.dylib (compatibility version 4.4.0, current version 4.4.2)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1775.118.101)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)