Skip to content

new packages: geepack and KMsurv

3 messages · Jari Oksanen, Peter Dalgaard, Duncan Temple Lang

#
jsendak at omniwhittington.co.uk said:
I found out that all old packages with compiled code in shared libraries fail to
load in R-1.6.0. My platform is RH7.3 with the notorious C/G77 compiler, but the
reason seem not to be changes in compiler, but changes in R. Packages that I had
compiled and installed day before upgrading to R-1.6.0 failed after upgrading.
The problem vanishes when the package is re-installed from the source. This is a
mild nuisance and for several packages I wait that they are ugpraded in CRAN so
that re-building happens automatically. I am not sure if this is the reason with
your trouble with binary packages, since your platform is very different. This
is the output I get with one example package:
Error in dyn.load(x, as.logical(local), as.logical(now)) : 
	unable to load shared library "/usr/lib/R/library/acepack/libs/acepack.so":
  libR.so: cannot open shared object file: No such file or directory
Error in library(acepack) : .First.lib failed
# But it is there:
-rwxr-xr-x    1 root     root        68548 May 29 11:00 /usr/lib/R/library/acepack/libs/acepack.so
Error in dyn.load(x, as.logical(local), as.logical(now)) : 
	unable to load shared library "/usr/lib/R/library/acepack/libs/acepack.so":
  libR.so: cannot open shared object file: No such file or directory

I have tried to find if this new behaviour is documented, but I haven't yet
found anything, so this may be an "undocumented feature". Who knows?

cheers, jari oksanen
#
Jari Oksanen <jarioksa at sun3.oulu.fi> writes:
Odd, I just tried with a recent R-devel:
works fine, and my odesolve was built under 1.5.1 and does have an odesolve.so.

Now the error message claims that the library is absent, so does the
file actually exist? And did you install from RPM or from source?
#
The key to the error message
is the libR.so.  That means that at some stage you compiled R with the
--enable-R-shlib flag and built libR.so.  Then, when you installed a
new version of R, you did not use the --enable-R-shlib flag. So
libR.so was not built. But when a package is installed and libR.so
exists, that package is linked against the libR.so. So when that
previously compiled package is loaded into the new R that has no
libR.so, you get the error message you are seeing.

To get around this problem, either re-install the packages from source
as you mention or rebuild R with the --enable-R-shlib flag passed to
configure. I agree this is annoying. It is a natural issue when we
have component based software; both a blessing and a curse.

 D.
Jari Oksanen wrote: