I have a test directory for the survival suite, and dyn.load has ceased to work in it. Below shows the log: tmt1075% R --vanilla R version 2.12.2 (2011-02-25) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.> dyn.load('survival.so') > q()tmt1076% R13 --vanilla R version 2.13.0 RC (2011-04-11 r55409) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-unknown-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.> dyn.load('survival.so')Error in dyn.load("survival.so") : unable to load shared object '/people/biostat2/therneau/research/surv/Rtest/survival.so': libR.so: cannot open shared object file: No such file or directory> q()-------------------------- Is the issue that the .so file must have been created with the R2.13 script? That's not what the error message says, however. It almost looks like it is ignoring my first argument and looking instead for "libR". Terry Therneau
On 13 April 2011 at 13:00, Terry Therneau wrote: | I have a test directory for the survival suite, and dyn.load has ceased | to work in it. Below shows the log: | | tmt1075% R --vanilla | | R version 2.12.2 (2011-02-25) | Copyright (C) 2011 The R Foundation for Statistical Computing | ISBN 3-900051-07-0 | Platform: x86_64-unknown-linux-gnu (64-bit) [...] | > dyn.load('survival.so') | > q() [...] | | tmt1076% R13 --vanilla | | R version 2.13.0 RC (2011-04-11 r55409) | Copyright (C) 2011 The R Foundation for Statistical Computing | ISBN 3-900051-07-0 | Platform: x86_64-unknown-linux-gnu (64-bit) [...] | > dyn.load('survival.so') | Error in dyn.load("survival.so") : | unable to load shared object | '/people/biostat2/therneau/research/surv/Rtest/survival.so': | libR.so: cannot open shared object file: No such file or directory | > q() | | -------------------------- | | Is the issue that the .so file must have been created with the R2.13 | script? That's not what the error message says, however. It almost | looks like it is ignoring my first argument and looking instead for | "libR". What does 'ldd /path/to/your/survial.so' say? Does the system find libR.so? I have no issues whatsoever on my Ubuntu box with the packages distributed via CRAN (and now also a PPA if you want alpha/beta/rc builds) based on the underlying Debian package I maintain. I have a (pretty visible) hourly cronjob that drives our littler /usr/bin/r frontend to do the CRANberries summaries---and even while /usr/bin/r was last built under R 2.11.1, it continued to work merrily under R 2.12.0, 2.12.1, 2.12.2, and 2.13.0 prereleases: edd at max:~$ r --version | head -4 r ('littler') version 0.1.3 svn revision 178 as of 2010-01-05 20:57:41 built at 20:08:17 on Oct 11 2010 using GNU R Version 2.11.1 (2010-05-31) edd at max:~$ edd at max:~$ R --version | head -1 R version 2.13.0 RC (2011-04-07 r55373) edd at max:~$ Both use the same shared library version libR.so from whichever current r-base-core is installed. So I see no particular breakage. Recompiling your project may also be a start. Hth, Dirk -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
We have no details, but my wild guess would be that you did not re-build the package for 2.13.0 and you have static libR in 2.13.0 yet dynamic in 2.12.2. Cheers, Simon On Apr 13, 2011, at 2:00 PM, Terry Therneau wrote:> I have a test directory for the survival suite, and dyn.load has ceased > to work in it. Below shows the log: > > tmt1075% R --vanilla > > R version 2.12.2 (2011-02-25) > Copyright (C) 2011 The R Foundation for Statistical Computing > ISBN 3-900051-07-0 > Platform: x86_64-unknown-linux-gnu (64-bit) > > R is free software and comes with ABSOLUTELY NO WARRANTY. > You are welcome to redistribute it under certain conditions. > Type 'license()' or 'licence()' for distribution details. > > Natural language support but running in an English locale > > R is a collaborative project with many contributors. > Type 'contributors()' for more information and > 'citation()' on how to cite R or R packages in publications. > > Type 'demo()' for some demos, 'help()' for on-line help, or > 'help.start()' for an HTML browser interface to help. > Type 'q()' to quit R. > >> dyn.load('survival.so') >> q() > > tmt1076% R13 --vanilla > > R version 2.13.0 RC (2011-04-11 r55409) > Copyright (C) 2011 The R Foundation for Statistical Computing > ISBN 3-900051-07-0 > Platform: x86_64-unknown-linux-gnu (64-bit) > > R is free software and comes with ABSOLUTELY NO WARRANTY. > You are welcome to redistribute it under certain conditions. > Type 'license()' or 'licence()' for distribution details. > > Natural language support but running in an English locale > > R is a collaborative project with many contributors. > Type 'contributors()' for more information and > 'citation()' on how to cite R or R packages in publications. > > Type 'demo()' for some demos, 'help()' for on-line help, or > 'help.start()' for an HTML browser interface to help. > Type 'q()' to quit R. > >> dyn.load('survival.so') > Error in dyn.load("survival.so") : > unable to load shared object > '/people/biostat2/therneau/research/surv/Rtest/survival.so': > libR.so: cannot open shared object file: No such file or directory >> q() > > -------------------------- > > Is the issue that the .so file must have been created with the R2.13 > script? That's not what the error message says, however. It almost > looks like it is ignoring my first argument and looking instead for > "libR". > > Terry Therneau > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > >
Terry Therneau
2011-Apr-13 20:47 UTC
[Rd] Problem with dyn.load in R 2.13.0 -- the real problem
On Wed, 2011-04-13 at 15:32 -0500, Dirk Eddelbuettel wrote:> Terry, > > You replied to > > From: Terry Therneau <therneau at mayo.edu> > To: Dirk Eddelbuettel <edd at debian.org> > Cc: cran at r-project.org > Subject: Re: [Rd] Problem with dyn.load in R 2.13.0 -- the real problem > > but dropped r-devel. On purpose?No, not on purpose. Corrected.> This still looks like a local config issue about local libraries to me. > > DirkI fail to see how. Running the newest release of R 2.13, if I issue a library() command for something installed earlier in R_LIBS_USER, something I expect lots of people to do, and that library has a .so file with reference to the now-nonexistent Rlib.so file, an error ensues. This is easy to test elsewhere. I don't anticipate that every user will erase all libraries and reinstall with each new R release. At work particularly, the default R release changes without user intervention; the system admin is not going to go looking for all local downloads. (A lot of people use R_LIBS_USER, as they don't have permission to put things elsewhere -- this includes me.) The error message for logspline is great as it tells them what to do. I'm only looking for a better one in the case I found.> > On 13 April 2011 at 15:01, Terry Therneau wrote: > | Dirk's comment made it clearer: > | > | On Wed, 2011-04-13 at 13:34 -0500, Dirk Eddelbuettel wrote: > | > What does 'ldd /path/to/your/survial.so' say? Does the system find > | > libR.so? > | > > | > | tmt1077% pwd > | /people/biostat2/therneau/research/surv/Rtest > | tmt1078% ldd survival.so > | libR.so => not found > | libc.so.6 => /lib64/libc.so.6 (0x00002aede2d94000) > | /lib64/ld-linux-x86-64.so.2 (0x00000033cd800000) > | > | However, this is a survival.so file created by R12, and that version has > | a libR.so in RHOME/lib. Version R2.13 has no such file. If I remake > | the .so file using R 2.13: then I get > | > | tmt1084% ldd survival.so > | libc.so.6 => /lib64/libc.so.6 (0x00002b656a2f1000) > | /lib64/ld-linux-x86-64.so.2 (0x00000033cd800000) > | > | And R > | > | -------------- > | > | So, the real problem is a misleading error message. I have several > | pacakges loaded into my own ~/Rlib. When I access one of these from > | version 2.13 I get variable errors, or success. > | > | tmt1087% R13 --vanilla > | > | R version 2.13.0 RC (2011-04-11 r55409) > | Copyright (C) 2011 The R Foundation for Statistical Computing > | ISBN 3-900051-07-0 > | Platform: x86_64-unknown-linux-gnu (64-bit) > | ... > | > | > library(logspline) > | Error: package 'logspline' was built before R 2.10.0: please re-install > | it > | > | > library(quadprog) > | Error in dyn.load(file, DLLpath = DLLpath, ...) : > | unable to load shared object > | '/people/biostat2/therneau/Rlib/quadprog/libs/quadprog.so': > | libR.so: cannot open shared object file: No such file or directory > | Error: package/namespace load failed for 'quadprog' > | > | > library(xtable) > | > > | > | My problem is solved, but is this a "user confuser" issue that should be > | addressed in the release? > | > | Terry T. > | > | >