Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail if there's a bad library link #286

Merged
merged 5 commits into from
Jun 12, 2023
Merged

Conversation

jwokaty
Copy link
Collaborator

@jwokaty jwokaty commented May 31, 2023

Am I headed in the right direction?

Close #282

@jwokaty jwokaty requested a review from hpages May 31, 2023 02:12
@jwokaty jwokaty self-assigned this May 31, 2023
@jwokaty jwokaty changed the title Fail if bad library link Fail if there's a bad library link May 31, 2023
for so_file in $arch_so_path/*.so; do
bad_shared_libraries=`otool -L "$so_file" | grep /opt/gfortran`
if [ ! -z "$bad_shared_libraries" ]; then
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to print a warning/error mentioning the problematic .so file before exiting here ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The errors are displayed at 6e5bcac.

@hpages
Copy link
Contributor

hpages commented Jun 2, 2023

The logic of the nested if/for/for/if

so_path="$R_LIBS/$pkgname/libs"
if ...
    for ...
        for ...
            if ...

is already implemented in macosx-inst-pkg.sh. So why not just implement the check there instead of reimplementing that same logic in a different file? I'm a strong believer in the DRY principle 😉

@jwokaty
Copy link
Collaborator Author

jwokaty commented Jun 2, 2023

Yes, that makes sense. I took it quite literally that the edit should be in build-universal.sh.

@hpages
Copy link
Contributor

hpages commented Jun 6, 2023

Looks good but it would be nice to display an error message. I don't think many people will understand why we display a red ERROR label when the output of BUILD BIN doesn't show any error. Note that these ERRORs will always be something that we need to fix on our side (they reveal a misconfiguration of the builder) and not something that the developers will be able to address, so the error message should be clear about that in order to avoid confusion.

Finally, if you've not done so already, it would be good to manually test the build-universal.sh script on the Mac builders on a few packages that have caused problems in the past, as well as on a few additional packages (some with and some w/o an .so file etc...). You want to make sure that it displays an intelligible error message and returns a non-zero code in case of error. To facilitate this testing, you could define the FORBIDDEN_PREFIX="/opt/gfortran" variable somewhere at the beginning of macosx-inst-pkg.sh (e.g. right after UNIVERSAL_GFORTRAN) and temporarily set it to a value that triggers an error, just for the testing session.

@jwokaty
Copy link
Collaborator Author

jwokaty commented Jun 6, 2023

@hpages By an error message, is another way that it should display an error other than echoing a message?

The error could read: "Error: Bad BBS configuration. Bad library paths not corrected in Mac binaries. Contact core team."?

@vjcitn
Copy link
Contributor

vjcitn commented Jun 6, 2023

quick comment on "contact core team" -- some method should be provided ... maybe a URL to BBS github issues?

@jwokaty
Copy link
Collaborator Author

jwokaty commented Jun 6, 2023

Error: Bad BBS configuration. Bad library paths not corrected in Mac binaries. Contact the core team by filing an <a href="https://github.com/Bioconductor/BBS/issues">issue</a>.?

@hpages
Copy link
Contributor

hpages commented Jun 6, 2023

I guess echoing the error message is the natural way to go. Whatever is echoed goes to the standard output which will be captured by BBS and displayed on the build report.

Good idea to provide the details of how to contact us. bioc-devel is also a valid option. Additionally the script could send an email to [email protected] (using the same mechanism as BBS-notify.py) so we are the first to know. There's the risk that we get flooded with emails though if hundreds of packages happen to not be linked properly, so if we go that route we should probably think of a way to send the notification only for the first package.

@jwokaty
Copy link
Collaborator Author

jwokaty commented Jun 9, 2023

I am leaving the link to issues so I can work on other planned issues. I know that we'll look at doing some notification in #297 anyway. I'll probably merge this on 9/12.

I tested on lconway by cloning repos for the BBS, a4 (no .so file), and bandle (has .so file) and applying the proposed feature. Below are the results for bandle with good and bad library links for posterity:

Good links

lconway:tmp biocbuild$ BBS/utils/build-universal.sh bandle_1.5.0.tar.gz 
>>>>>>> 
>>>>>>> INSTALLATION WITH 'R CMD INSTALL --preclean --no-multiarch --library=/Library/Frameworks/R.framework/Resources/library bandle_1.5.0.tar.gz'
>>>>>>> 

* installing *source* package ‘bandle’ ...
** using staged installation
** libs
using C++ compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
using C++11
using SDK: ‘MacOSX11.3.sdk’
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c Bessel2ndKind.cpp -o Bessel2ndKind.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c dmvtCpp.cpp -o dmvtCpp.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c leapfrogGPcpp.cpp -o leapfrogGPcpp.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c pg_sample.cpp -o pg_sample.o
clang++ -arch x86_64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o bandle.so Bessel2ndKind.o RcppExports.o dmvtCpp.o leapfrogGPcpp.o pg_sample.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-bandle/00new/bandle/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Creating a generic function from function ‘posteriorEstimates’ in package ‘bandle’
Creating a generic function from function ‘bandleJoint’ in package ‘bandle’
** 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 (bandle)


>>>>>>> 
>>>>>>> FIXING PATHS TO DYNAMIC LIBRARIES FOR /Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so
>>>>>>> 

>>>>>>> Paths before fix:
/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so:
	bandle.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib (compatibility version 4.3.0, current version 4.3.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.dylib (compatibility version 0.0.0, current version 0.0.0)
	/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0)
	/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libR.dylib (compatibility version 4.3.0, current version 4.3.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)

>>>>>>> Fix with install_name_tool:
install_name_tool -change "/usr/local/lib/libgcc_s.1.1.dylib" "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libgcc_s.1.1.dylib" "/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so"
install_name_tool -change "/usr/local/lib/libgfortran.5.dylib" "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libgfortran.5.dylib" "/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so"
install_name_tool -change "/usr/local/lib/libquadmath.0.dylib" "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libquadmath.0.dylib" "/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so"
install_name_tool -change "/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libgfortran.5.dylib" "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libgfortran.5.dylib" "/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so"
install_name_tool -change "/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libquadmath.0.dylib" "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libquadmath.0.dylib" "/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so"

>>>>>>> Paths after fix:

/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so:
	bandle.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib (compatibility version 4.3.0, current version 4.3.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libR.dylib (compatibility version 4.3.0, current version 4.3.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)

Bad links (generated by commenting out fix_dylib_links "$so_file" in BBS/utils/macosx-inst-pkg.sh so that Fix with install_name_tool is now blank:

lconway:tmp biocbuild$ BBS/utils/build-universal.sh bandle_1.5.0.tar.gz 
>>>>>>> 
>>>>>>> INSTALLATION WITH 'R CMD INSTALL --preclean --no-multiarch --library=/Library/Frameworks/R.framework/Resources/library bandle_1.5.0.tar.gz'
>>>>>>> 

* installing *source* package ‘bandle’ ...
** using staged installation
** libs
using C++ compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
using C++11
using SDK: ‘MacOSX11.3.sdk’
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c Bessel2ndKind.cpp -o Bessel2ndKind.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c dmvtCpp.cpp -o dmvtCpp.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c leapfrogGPcpp.cpp -o leapfrogGPcpp.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c pg_sample.cpp -o pg_sample.o
clang++ -arch x86_64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o bandle.so Bessel2ndKind.o RcppExports.o dmvtCpp.o leapfrogGPcpp.o pg_sample.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-bandle/00new/bandle/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Creating a generic function from function ‘posteriorEstimates’ in package ‘bandle’
Creating a generic function from function ‘bandleJoint’ in package ‘bandle’
** 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 (bandle)


>>>>>>> 
>>>>>>> FIXING PATHS TO DYNAMIC LIBRARIES FOR /Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so
>>>>>>> 

>>>>>>> Paths before fix:
/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so:
	bandle.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib (compatibility version 4.3.0, current version 4.3.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.dylib (compatibility version 0.0.0, current version 0.0.0)
	/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0)
	/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libR.dylib (compatibility version 4.3.0, current version 4.3.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)

>>>>>>> Fix with install_name_tool:

>>>>>>> Paths after fix:

/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so:
	bandle.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib (compatibility version 4.3.0, current version 4.3.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.dylib (compatibility version 0.0.0, current version 0.0.0)
	/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0)
	/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libR.dylib (compatibility version 4.3.0, current version 4.3.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)

Error: Bad BBS configuration.
Bad library paths not corrected in macOS binaries. Contact the core team by filing an <a href=https://github.com/Bioconductor/BBS/issues>issue</a>.

@hpages
Copy link
Contributor

hpages commented Jun 9, 2023

Looks good. BBS calls build-universal.sh which calls macosx-inst-pkg.sh. Will BBS "see" the exit code returned by macosx-inst-pkg.sh? More precisely: Are we sure that build-universal.sh will return the exit code returned by macosx-inst-pkg.sh? You should be able to check this by doing echo $? right after running BBS/utils/build-universal.sh bandle_1.5.0.tar.gz.

Note that this exit code will end up on the report here https://bioconductor.org/checkResults/3.18/bioc-LATEST/bandle/lconway-buildbin.html, as the RetCode value in the Summary section.

Finally note that including HTML in the output won't work. That's because the Command output section displayed on the report cannot contain HTML. If it does, it will be displayed as-is (i.e. it won't be rendered).

@jwokaty
Copy link
Collaborator Author

jwokaty commented Jun 10, 2023

I've removed the html. Thanks for the pointer on checking the exit code. echo $? displays a 1 as expected:

lconway:tmp biocbuild$ BBS/utils/build-universal.sh bandle_1.5.0.tar.gz 
>>>>>>> 
>>>>>>> INSTALLATION WITH 'R CMD INSTALL --preclean --no-multiarch --library=/Library/Frameworks/R.framework/Resources/library bandle_1.5.0.tar.gz'
>>>>>>> 

* installing *source* package ‘bandle’ ...
** using staged installation
** libs
using C++ compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
using C++11
using SDK: ‘MacOSX11.3.sdk’
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c Bessel2ndKind.cpp -o Bessel2ndKind.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c dmvtCpp.cpp -o dmvtCpp.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c leapfrogGPcpp.cpp -o leapfrogGPcpp.o
clang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/BH/include' -I/opt/R/x86_64/include     -fPIC  -falign-functions=64 -Wall -g -O2  -c pg_sample.cpp -o pg_sample.o
clang++ -arch x86_64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/x86_64/lib -o bandle.so Bessel2ndKind.o RcppExports.o dmvtCpp.o leapfrogGPcpp.o pg_sample.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-bandle/00new/bandle/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Creating a generic function from function ‘posteriorEstimates’ in package ‘bandle’
Creating a generic function from function ‘bandleJoint’ in package ‘bandle’
** 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 (bandle)


>>>>>>> 
>>>>>>> FIXING PATHS TO DYNAMIC LIBRARIES FOR /Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so
>>>>>>> 

>>>>>>> Paths before fix:
/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so:
	bandle.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib (compatibility version 4.3.0, current version 4.3.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.dylib (compatibility version 0.0.0, current version 0.0.0)
	/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0)
	/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libR.dylib (compatibility version 4.3.0, current version 4.3.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)

>>>>>>> Fix with install_name_tool:

>>>>>>> Paths after fix:

/Library/Frameworks/R.framework/Resources/library/bandle/libs/bandle.so:
	bandle.so (compatibility version 0.0.0, current version 0.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib (compatibility version 4.3.0, current version 4.3.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.dylib (compatibility version 0.0.0, current version 0.0.0)
	/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0)
	/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libR.dylib (compatibility version 4.3.0, current version 4.3.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)

Error: Bad BBS configuration.
Bad library paths not corrected in macOS binaries. Contact the core team by filing an issue at https://github.com/Bioconductor/BBS/issues.
lconway:tmp biocbuild$ echo $?
1

@hpages
Copy link
Contributor

hpages commented Jun 10, 2023

Great! I guess this is good to go then. Thanks!

@jwokaty
Copy link
Collaborator Author

jwokaty commented Jun 12, 2023

Thanks everyone for your input!

@jwokaty jwokaty merged commit f338c19 into Bioconductor:devel Jun 12, 2023
@jwokaty jwokaty deleted the issue/282 branch September 22, 2023 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block propagation for a mac binary if dynamic links are bad
4 participants