From edd at debian.org  Wed Nov 23 17:41:14 2016
From: edd at debian.org (Dirk Eddelbuettel)
Date: Wed, 23 Nov 2016 10:41:14 -0600
Subject: [Rd] shared libraries: missing soname
In-Reply-To: <86h96ybimm.fsf@phe.ftfl.ca>
References: <868tsdohoe.fsf@phe.ftfl.ca>
	<22578.18597.717387.458240@max.nulle.part>
	<864m31ob4x.fsf@phe.ftfl.ca>
	<22578.23795.540869.831235@max.nulle.part>
	<86y40cgpsh.fsf@phe.ftfl.ca>
	<22579.48780.66762.666285@max.nulle.part>
	<86twb0go0c.fsf@phe.ftfl.ca>
	<22579.50911.667739.32126@max.nulle.part>
	<86twazaqbm.fsf@phe.ftfl.ca>
	<22581.24194.824366.415231@stat.math.ethz.ch>
	<86h96ybimm.fsf@phe.ftfl.ca>
Message-ID: <22581.50858.767147.808685@max.nulle.part>


On 22 November 2016 at 22:21, Joseph Mingrone wrote:
| Is this a more appropriate example?
| 
| # ldd /usr/local/lib/R/library/tseries/libs/tseries.so | grep libR
| libRblas.so => /usr/local/lib/R/lib/libRblas.so (0x80120c000)
| libR.so => /usr/local/lib/R/lib/libR.so (0x801c00000)

No it is not.  Do you see the /usr/local/lib/R/lib here?

The trailing R/lib is what Martin and talk about. It means ldd / ldconfig
does not know about it -- if you do `ldconfig -p | grep libR` chances are you
see nothing.

On 23 November 2016 at 06:22, Joseph Mingrone wrote:
| Martin Maechler <maechler at stat.math.ethz.ch> writes:
| > To the issue:  I also don't see what your point is.
| > R works with these so libraries  as intended  in all cases as
| > far as we know, and so I don't understand why anything needs to
| > be changed.
| > All these libraries "belong to R" and are tied to a specific
| > version of R  and are not be used outside of R,  so I also don't see
| > your point.
| 
| "are not to be used outside of R".  You are distributing shared libraries that
| aren't meant to be shared (outside of R)?  But they are.  And I gave an example.

A wrong one though.
 
| I will just patch the FreeBSD port.

Please do.

You currently are the only one with an itch to scratch, and everybody else is
busy. If / when you have a patch which puts a token soname onto every shared
library produced [ internally ] by R feel free to offer it to R Core.

As Martin told you, so far there is no reason to take it but maybe that will
change. Or not. 

Consider eg this:

  edd at max:~$ locate Matrix.so
  /usr/lib/R/library/Matrix/libs/Matrix.so
  /usr/local/lib/R/site-library/Matrix/libs/Matrix.so
  /usr/local/lib/R-devel/lib/R/library/Matrix/libs/Matrix.so
  edd at max:~$

I have three versions of Matrix.so. And still not problem.  The third one
only enters for R-devel, not R.  The first two are distinguished by R itself
_by virtue of different paths_ just like Martin and I told you.

And _no_ other program on my system knows about Matrix.so:

  edd at max:~$ ldconfig -p | grep Matrix.so
  edd at max:~$ ldconfig -p | wc -l
  2814
  edd at max:~$

ldd / ldconfig do NOT know Matrix.so -- as I told you before -- despite the
fact that they know thousands of other things on this (development) machine.

All that you said or quoted about soname is fine and handy, and we all
respect it __for public libraries like libpng or libxml2.

R is different. So if FreeBSD has a problem with that you may indeed have to
work around that on the FreeBSD side of things.

Dirk

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



[Rd] shared libraries: missing soname
Dirk Eddelbuettel