[Rd] Failure to load the recommended package Matrix (Was: [R] Can one get a list of recommended packages?)

From: Douglas Bates <bates_at_stat.wisc.edu>
Date: Sun, 13 Jun 2010 12:00:54 -0500


On Sun, Jun 13, 2010 at 8:28 AM, Uwe Ligges <ligges_at_statistik.tu-dortmund.de> wrote:
>
>
> On 13.06.2010 01:09, Dr. David Kirkby wrote:
>>
>> On 06/12/10 05:27 PM, Douglas Bates wrote:
>>>
>>> On Sat, Jun 12, 2010 at 8:37 AM, Dr. David Kirkby
>>> <david.kirkby_at_onetel.net> wrote:
>>>>
>>>> R 2.10.1 is used in the Sage maths project. Several recommended packages
>>>> (Matrix, class, mgcv, nnet, rpart, spatial, and survival) are failing to
>>>> build on Solaris 10 (SPARC).
>>>
>>> Have you checked the dependencies for those packages? Some require GNU
>>> make.
>>
>> We used GNU make.
>>
>>>> We would like to be able to get a list of the recommended packages for R
>>>> 2.10.1, but ideally via a call to R, so it is not necessary to update
>>>> that
>>>> list every time a new version of R is released. We do not want to
>>>> access the
>>>> Internet to get this information.
>>>
>>>> Is there a way in R to list the recommended packages?
>>>
>>> I'm not sure I understand the logic of this. If you are going to
>>> build R then presumably you have the tar.gz file which contains the
>>> sources for the recommended packages in the subdirectory
>>> src/library/Recommended/. Why not get the list from there?
>>
>> The reason is when the version of R gets updated in Sage, then someone
>> will have to check that list again, and more than likely fail to do so,
>> with the result tests will fail since packages do not exist, or worst
>> still we will be unaware they have failed to build properly.
>>
>> Therefore, being able to get them from a command would be useful, but
>> can understand if that is not possible.
>>
>>> $ cd ~/src/R-devel/src/library/Recommended/
>>> $ ls *.tgz
>>> boot.tgz codetools.tgz lattice.tgz mgcv.tgz rpart.tgz
>>> class.tgz foreign.tgz MASS.tgz nlme.tgz spatial.tgz
>>> cluster.tgz KernSmooth.tgz Matrix.tgz nnet.tgz survival.tgz
>>
>> OK, thank you for that list.
>>
>>>> Better still, is there a way to list the recommended packages which
>>>> have not
>>>> been installed, so getting a list of any failures?
>>>
>>> Again, this seems to be a rather convoluted approach. Why not check
>>> why the packages don't install properly?
>>
>> R had built, and the failure of the packages to build was not very
>> obvious, since it did not cause make to exit with a non-zero exit code.
>> Nobody had noticed until very recently that there was a problem.
>>
>> Therefore I proposed to make a test of the packages that should have
>> been installed, and ensure they actually all had.
>>
>> You need to be aware that R is just one part of Sage. Building the whole
>> of Sage takes a long time (>24 hours on some computers) so needless to
>> say, people will not view every line of error messages. The fact that
>> 'make' succeeded left us a false sense of security, when later it was
>> realsed there were problems when R run its self-tests.
>>
>> Dave
>
>
> But if you really want to sense some security, you should really run
> make check-all
> after the installation, particularly since you are on a platform that is not
> really mainstream any more.
>
> Uwe Ligges

And if you look at the other R-help message posted by David Kirby you will find a link to the trouble ticket report in Sage as http://trac.sagemath.org/sage_trac/ticket/9201 which, fortunately, contains a link to the compilation log file http://sage.math.washington.edu/home/mpatel/trac/8306/r-2.10.1.p2.log

The log file correctly points out the problem, which is that the compiled shared object for the Matrix package can't be loaded because it contains references to objects in another library from the compiler and that library is not on the LD_LIBRARY_PATH during the dyn.load from within R. So the original poster needs to look at how the DLLpath is being configured.

Exactly how this ended up as a request to somehow determine a list of recommended packages on the fly from within R is a wonderful example of misguided speculation but has nothing whatsoever to do with the problem. Even the idea that there are a host of other recommended packages that failed to compile because they depend on the Matrix package is pure speculation and, of course, hopelessly wrong. The installation of the Matrix package failed because the check on whether the package could be loaded failed. The compilation of the recommended packages stopped at that point. The other packages weren't compiled because they came after the Matrix package in the compilation sequence.

Problems in compilation of R or its recommended packages should be reported on the R-devel mailing list and I have moved this thread from R-help to R-devel.

Admittedly it was the original poster of the Sage trouble ticket who decided that the issue to focus on was missing recommended packages. That's a red herring. The issue is the visibility of the some of the libraries from the gcc toolchain when R is loading a package.



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sun 13 Jun 2010 - 17:03:50 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 14 Jun 2010 - 13:11:00 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive