Skip to content
Prev 208195 / 398502 Next

shared object location

as a motivating example, consider the case where multiple/many R
packages are being developed that all use the same shared object
functions.

each time (during development) that the shared object file changes we
could go alter every single R package directory, or simply have the R
package utilize the most recent single copy of the shared object's
functions.
this is essentially what happens already with most programs and the
common libraries in /usr/lib, /usr/local/lib, etc.

but during development of the library, it's preferable to keep this
library out of those system-level trees, and instead somewhere more
local (e.g. in the developer's home directory, or a location set aside
by a team of developers, e.g. /dev/lib).

then i would like for each of the R packages to do something like
'library.dynam("testlib1")', looking along the LD_LIBRARY_PATH for the
R session (which will include /dev/lib), for the library /dev/lib/
testlib1.so.

but it appears library.dynam can ONLY search inside package
contents... is this correct?
i can keep telling every package writer to include 'dyn.load("/dev/lib/
testlib1.so")' somewhere in their package, but this is fragile (as
dyn.load requires an exact path to be specified, instead of using
LD_LIBRARY_PATH).

so it appears i either have fragility, or an error-prone process of
updating the .so files in each R package separately each time the
library changes (which is frequently).
i have to imagine there is some method in R that i just cannot
identify that will allow for linking/loading of shared objects along
the LD_LIBRARY_PATH.
On Jan 30, 5:52?pm, Murat Tasan <mmu... at gmail.com> wrote: