From edd at debian.org  Mon Nov 21 03:33:23 2016
From: edd at debian.org (Dirk Eddelbuettel)
Date: Sun, 20 Nov 2016 20:33:23 -0600
Subject: [Rd] shared libraries: missing soname
In-Reply-To: <864m31ob4x.fsf@phe.ftfl.ca>
References: <868tsdohoe.fsf@phe.ftfl.ca>
	<22578.18597.717387.458240@max.nulle.part>
	<864m31ob4x.fsf@phe.ftfl.ca>
Message-ID: <22578.23795.540869.831235@max.nulle.part>


On 20 November 2016 at 21:49, Joseph Mingrone wrote:
| Hello Dirk,
| 
| Dirk Eddelbuettel <edd at debian.org> writes:
| 
| > On 20 November 2016 at 19:28, Joseph Mingrone wrote:
| > | Hello,
| > | 
| > | R's shared libraries are linked without setting the soname.  This is causing problems for some consumers.
| > | 
| > |         Error: /usr/local/lib/R/library/tseries/libs/tseries.so is linked to
| > |         /usr/local/lib/R/lib/libRblas.so which does not have a SONAME.  math/R needs
| > |         to be fixed.
| > | 
| > | What's the correct way to add the necessary linker flags?  I believe it should be something like this.
| > | 
| > |        cc -shared -Wl,-soname,...
| 
| > I think that may be true "in theory" (for libraries loaded by ldd(8) via
| > `/etc/ld.conf`) but not "in practice" for R which loads these shared
| > libraries itself (via dlopen(3) etc).
| 
| R may use dlopen() but other customers may not.

Yes, well, but are there other customers?
 
| > For what it is worth, I have been providing the Debian packages "as is" for
| > now 15+ years and nobody has complained. 
| 
| > What system are you on to get that complaint?
| 
| This is on FreeBSD.  Our apt-get, pkg, will not register shared library dependencies if the shared library does not have a soname.  If the library gets changed and is no longer compatible with the previous version, and there is no soname to check, pkg will not know that all its dependencies need to be reinstalled.

Hmpf. No mechanism for fallback / default soname?  In that case you (or
whoever acts as FreeBSD maintainer) may have to supply one.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] shared libraries: missing soname
Dirk Eddelbuettel