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


>>>>>>> 
>>>>>>> INSTALLATION WITH 'R CMD INSTALL --preclean --no-multiarch --library=ChemmineR.buildbin-libdir ChemmineR_3.59.0.tar.gz'
>>>>>>> 

* installing *source* package ‘ChemmineR’ ...
** this is package ‘ChemmineR’ version ‘3.59.0’
** 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 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include   -DNO_MAIN -DNO_DEBUG -DSTRICT_R_HEADERS -DR_NO_REMAP -fPIC  -falign-functions=64 -Wall -g -O2  -DR_NO_REMAP -c DisjointSets.cpp -o DisjointSets.o
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include   -DNO_MAIN -DNO_DEBUG -DSTRICT_R_HEADERS -DR_NO_REMAP -fPIC  -falign-functions=64 -Wall -g -O2  -DR_NO_REMAP -c cluster.cc -o cluster.o
cluster.cc:49:13: warning: unused function 'prepare_neighbors' [-Wunused-function]
void static prepare_neighbors(const char* nbr_file, int skip, int p)
            ^
1 warning generated.
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include   -DNO_MAIN -DNO_DEBUG -DSTRICT_R_HEADERS -DR_NO_REMAP -fPIC  -falign-functions=64 -Wall -g -O2  -DR_NO_REMAP -c cstrsplit.cc -o cstrsplit.o
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include   -DNO_MAIN -DNO_DEBUG -DSTRICT_R_HEADERS -DR_NO_REMAP -fPIC  -falign-functions=64 -Wall -g -O2  -DR_NO_REMAP -c desc.cc -o desc.o
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include   -DNO_MAIN -DNO_DEBUG -DSTRICT_R_HEADERS -DR_NO_REMAP -fPIC  -falign-functions=64 -Wall -g -O2  -DR_NO_REMAP -c fingerprints.cc -o fingerprints.o
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include   -DNO_MAIN -DNO_DEBUG -DSTRICT_R_HEADERS -DR_NO_REMAP -fPIC  -falign-functions=64 -Wall -g -O2  -DR_NO_REMAP -c formats.cc -o formats.o
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include   -DNO_MAIN -DNO_DEBUG -DSTRICT_R_HEADERS -DR_NO_REMAP -fPIC  -falign-functions=64 -Wall -g -O2  -DR_NO_REMAP -c molecule.cc -o molecule.o
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include   -DNO_MAIN -DNO_DEBUG -DSTRICT_R_HEADERS -DR_NO_REMAP -fPIC  -falign-functions=64 -Wall -g -O2  -DR_NO_REMAP -c r_wrap.cc -o r_wrap.o
r_wrap.cc:758:10: warning: 'R_NO_REMAP' macro redefined [-Wmacro-redefined]
# define R_NO_REMAP
         ^
<command line>:6:9: note: previous definition is here
#define R_NO_REMAP 1
        ^
r_wrap.cc:761:10: warning: 'STRICT_R_HEADERS' macro redefined [-Wmacro-redefined]
# define STRICT_R_HEADERS
         ^
<command line>:4:9: note: previous definition is here
#define STRICT_R_HEADERS 1
        ^
2 warnings generated.
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include   -DNO_MAIN -DNO_DEBUG -DSTRICT_R_HEADERS -DR_NO_REMAP -fPIC  -falign-functions=64 -Wall -g -O2  -DR_NO_REMAP -c script.cc -o script.o
clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include   -DNO_MAIN -DNO_DEBUG -DSTRICT_R_HEADERS -DR_NO_REMAP -fPIC  -falign-functions=64 -Wall -g -O2  -DR_NO_REMAP -c similarity.cc -o similarity.o
clang++ -arch x86_64 -std=gnu++17 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o ChemmineR.so DisjointSets.o cluster.o cstrsplit.o desc.o fingerprints.o formats.o molecule.o r_wrap.o script.o similarity.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/biocbuild/bbs-3.21-bioc/meat/ChemmineR.buildbin-libdir/00LOCK-ChemmineR/00new/ChemmineR/libs
** R
** data
** 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 (ChemmineR)


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

>>>>>>> Paths before fix:
ChemmineR.buildbin-libdir/ChemmineR/libs/ChemmineR.so:
	ChemmineR.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/lib/libR.dylib (compatibility version 4.5.0, current version 4.5.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1775.118.101)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 905.6.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)

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

>>>>>>> Paths after fix:
ChemmineR.buildbin-libdir/ChemmineR/libs/ChemmineR.so:
	ChemmineR.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/lib/libR.dylib (compatibility version 4.5.0, current version 4.5.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1775.118.101)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 905.6.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)