Created attachment 183205 [details] SONAME fix - Fix libR libraries by setting their SONAME - Use USE_LDCONFIG to make them visible to consumers - Modify consumers to correctly indicate that they link with libR - Fix math/rkward-kde4 plist issues also
The libraries under ${PREFIX}/lib/R/lib are not intended (by upstream) to be registered with ldconfig, but are opened with dlopen(3). Yes, this means pkg will not register shared library dependencies, so we will have to adjust and bump ports as necessary. When necessary, unfortunately, is unclear based on how things work upstream. I went back and forth on the R developers mailing list about this. https://stat.ethz.ch/pipermail/r-devel/2016-November/073397.html
(In reply to Joseph Mingrone from comment #1) After reading this thread I fail to understand developers position on this issue too. libR is internal, but they provide .pc file for it and then are surprised some consumer use it as a dynamic library. Just now I discovered that some R-cran packages link to libR also: # pkg check -dan Checking all packages: 100% R-cran-Rcpp is missing a required shared library: libR.so R-cran-RcppEigen is missing a required shared library: libRblas.so R-cran-RcppEigen is missing a required shared library: libRlapack.so R-cran-RcppEigen is missing a required shared library: libR.so R-cran-SparseM is missing a required shared library: libR.so R-cran-XML is missing a required shared library: libR.so R-cran-gtools is missing a required shared library: libR.so R-cran-lme4 is missing a required shared library: libR.so R-cran-minqa is missing a required shared library: libR.so R-cran-mvtnorm is missing a required shared library: libR.so R-cran-nloptr is missing a required shared library: libR.so R-cran-quadprog is missing a required shared library: libRblas.so R-cran-quadprog is missing a required shared library: libR.so R-cran-quantreg is missing a required shared library: libRblas.so R-cran-quantreg is missing a required shared library: libR.so R-cran-quantreg is missing a required shared library: libRlapack.so R-cran-tseries is missing a required shared library: libRblas.so R-cran-tseries is missing a required shared library: libR.so R-cran-zoo is missing a required shared library: libR.so It's worse then I thought :/
I'm not sure what the best course of action is here. Since upstream is saying they don't intend for anyone to link against those internal libraries, we would have to deal with determining when there is an incompatible change in the interface and appropriately bumping the version part of the SONAME. Maybe you could lobby upstream in the referenced thread and offer your patches.
I'm not aware of any issues with patching to add SONAMEs to these libraries, but I don't understand the benefit of doing so without a version portion to the SONAME. Could you update your patch to include a version number?
Created attachment 184385 [details] libR SONAME fix v2 Finally found time to work on this. Patch adds library versioning to libR and family, all centred around LIBVER variable for easy maintenance. To be complete solution I believe Mk/Uses/cran.mk must be patched in similiar way too.
CC'ing dbn@. Let's what is his take on this matter.
Thanks Pawel. I've suggested some tweaks in https://reviews.freebsd.org/D11615. I couldn't find an Phabricator account for you to set you as a reviewer.
A commit references this bug: Author: jrm Date: Wed Jul 19 14:19:48 UTC 2017 New revision: 446199 URL: https://svnweb.freebsd.org/changeset/ports/446199 Log: math/R: set SONAME for libraries under lib/R/lib PR: 219776 Submitted by: pawel Reviewed by: pawel, mat Differential Revision: https://reviews.freebsd.org/D11615 Changes: head/math/R/Makefile head/math/R/files/patch-src_extra_blas_Makefile.in head/math/R/files/patch-src_main_Makefile.in head/math/R/files/patch-src_modules_lapack_Makefile.in head/math/R/pkg-plist
Thank you.
A commit references this bug: Author: pawel Date: Mon Jul 24 18:26:40 UTC 2017 New revision: 446540 URL: https://svnweb.freebsd.org/changeset/ports/446540 Log: After r446199 libR.so has SONAME and was made visible for consumer ports. Register correct dependency by using LIB_DEPENDS instead of BUILD|RUN_DEPENDS dance. math/rkward-kde4: - Add 2 missing files to pkg-plist also PR: 219776 Submitted by: myself Approved by: maintainers timeouts Changes: head/math/cantor/Makefile head/math/rkward-kde4/Makefile head/math/rkward-kde4/pkg-plist head/math/rpy/Makefile head/math/rpy2/Makefile head/science/afni/Makefile
Thanks again pawel@. Sorry, I should have closed this bug. I had forgotten about the changes to the other ports.