Skip to content

Problem loading library Matrix on Solaris machine

4 messages · Gerrit Eichner, Brian Ripley, Douglas Bates

#
Dear R-devel list members,

after having contacted Douglas Bates (author of package Matrix) he
suggested to ask this list for assistance with the following problem:

After having under
platform sparc-sun-solaris2.9
arch     sparc
os       solaris2.9
system   sparc, solaris2.9
status
major    1
minor    9.1
year     2004
month    06
day      21
language R


successfully installed the Matrix package
Package: Matrix
Version: 0.8-10
Date: $Date: 2004-07-07 13:23:11 -0500 (Wed, 07 Jul 2004) $
...
Packaged: Wed Jul 7 14:22:56 2004; bates
Built: R 1.9.1; sparc-sun-solaris2.9; 2004-08-18 14:25:48; unix
-- File: /usr1/soft/R-1.9.1/lib/R/library/Matrix/DESCRIPTION


by using
the attempt to load the library failed:
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
"/usr1/soft/R-1.9.1/lib/R/library/Matrix/libs/Matrix.so":
  ld.so.1: /usr1/soft/R-1.9.1/lib/R/bin/R.bin: fatal: relocation error:
file /usr1/soft/R-1.9.1/lib/R/library/Matrix/libs/Matrix.so: symbol isinf:
referenced symbol not found
Error in library(Matrix) : package/namespace load failed


Are we missing anything obvious? Is anybody able to point me to a
solution?
(We do not have the problem on a Linux machine, so it does not seem to be
an installation error made by us, but is apparently due to our Solaris
system libraries.)

Thank you for any help!

 Best regards  --  Gerrit

-------------------------------------------------------------------------
 AR Dr. Gerrit Eichner                            Mathematical Institute
 gerrit.eichner@math.uni-giessen.de     Justus-Liebig-University Giessen
 Tel: +49-(0)641-99-32104            Arndtstr. 2, 35392 Giessen, Germany
 Fax: +49-(0)641-99-32029      http://www.math.uni-giessen.de/Stochastik
#
I have four Solaris build setups, gcc/Forte cc x 32/64-bit.
If you tell me a bit more about yours, I can do the appropriate testing.

Looks like this

Matrix/src/taucs/taucs.h:
#if (defined(OSTYPE_irix) || defined(OSTYPE_solaris))

#include <math.h>
#include <ieeefp.h>
#define isinf(x) (!finite((x)) && !isnan((x)))

needs OSTYPE_solaris defined.  (I think I told Doug about this long ago.)
On Thu, 19 Aug 2004, Gerrit Eichner wrote:

            

  
    
2 days later
#
Dear Prof. Ripley,

thank you for your offer for assistance. Here are some more details from
our sys admin (who sincerely thanks you for the hint to
Matrix/src/taucs/taucs.h):

--- the system administrator says: ---

Since we don't have a license for the cc compiler anymore I have to use
gcc. Trying to compile the Matrix package via the Makefile in Matrix/src
doesn't work as this uses the cc compiler and I don't know how to change
that in an appropriate way (there is no configure script for example).

As I don't really understand how R compiles downloaded packages and how
and where I could change the configuration for that, I tried the following
dirty hack:

- added '#define OSTYPE_solaris' in Matrix/src/taucs/taucs.h
- made a new tarball (Matrix_0.8-10.tar.gz) of the directory Matrix
- put PACKAGES and Matrix_0.8-10.tar.gz on my own website
- installed the changed package via
  > options(CRAN = 'http://my_own_website...')
  > install.packages("Matrix")

... which did the trick. But where should OSTYPE_solaris really be set?

--- end system administrator ---


I hope these informations can shed some light onto our problem and assist
you in tracking down the reason. Thanks again.

 Best regards  --  Gerrit Eichner

-------------------------------------------------------------------------
 AR Dr. Gerrit Eichner                            Mathematical Institute
 gerrit.eichner@math.uni-giessen.de     Justus-Liebig-University Giessen
 Tel: +49-(0)641-99-32104            Arndtstr. 2, 35392 Giessen, Germany
 Fax: +49-(0)641-99-32029      http://www.math.uni-giessen.de/Stochastik
#
Gerrit Eichner wrote:
The problem stems from my not understanding the configuration of the 
taucs package, which I have included in the Matrix package for one 
routine only.  I configured the taucs package on a Linux machine then 
copied it into Matrix/src/taucs/.

Rather than redoing the taucs package so that it works properly I will 
probably use the LDL' form of the Cholesky decomposition from Tim 
Davis's LDL package and remove taucs entirely.

Watch for a new upload of the Matrix package in the next two days.