Skip to content

ubuntu problem with 'r-cran-robustbase' [FWD Agustin Lobo]

3 messages · Martin Maechler, Dirk Eddelbuettel

#
Agustin, posted on R-help.
I think the problem is one of the debian/ubuntu package
'r-cran-robustbase' and its setup or (missing?) dependencies.

I can confirm Agustin's problem, working on Ubuntu 8.04.2
(8.04 is a "LTS" = long time support version).

  apt-get install r-cran-robustbase

works fine, but when trying to load the package,
there's a DLL - dependency on libRlapack.so 
which is not fulfilled (and not fulfillable: There's *no*
libRlapack.so).

For me,

  $ /usr/bin/R CMD config LAPACK_LIBS
  -llapack

and lapack.so is found inside /usr/lib/R/modules/ 
and liblapack.so from the 'lapack3' Debian/Ubuntu package 
is simply in /usr/lib/libpack.so  

Could it be that this is caused by an Ubuntu / Debian 
mismatch?

Thank you in advance,

Martin Maechler, ETH Zurich

------- start of forwarded message -------
From: Agustin Lobo <aloboaleu at gmail.com>
To: "r-help at r-project.org" <r-help at r-project.org>
Subject: [R] robustbase: cannot install
Date: Mon, 11 May 2009 18:20:14 +0200

This is really odd,
I've installed the binary of robustbase through synaptic on an ubuntu 
8.04 machine and get:
 > library(robustbase)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared library 
'/usr/lib/R/site-library/robustbase/libs/robustbase.so':
   libRlapack.so: cannot open shared object file: No such file or directory
Error: package/namespace load failed for 'robustbase'
 >

The package is where it is suposed to be:
/usr/lib/R/site-library/robustbase

is this not a problem at compiling?

The problem is that if I try to install the source with 
install.packages("robustbase"), I get:
gcc -std=gnu99 -shared -o robustbase.so R-rng4ftn.o init.o lmrob.o mc.o 
qn_sn.o rf-common.o rffastmcd.o rfltsreg.o wgt_himed.o -L/usr/lib/R/lib 
-lRlapack -lblas -L/usr/lib/gcc/i486-linux-gnu/4.2 -lgfortran -lm 
-L/usr/lib/gcc/i486-linux-gnu/4.2 -lgfortran -lm -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -lRlapack
collect2: ld returned 1 exit status

Despite the fact that I do have Rlapack:
~$ R CMD config LAPACK_LIBS
-L/usr/lib/R/lib -lRlapack

Am I doing something wrong?

Thanks

Agus
#
On 12 May 2009 at 11:45, Martin Maechler wrote:
| Agustin, posted on R-help.
| I think the problem is one of the debian/ubuntu package
| 'r-cran-robustbase' and its setup or (missing?) dependencies.
| 
| I can confirm Agustin's problem, working on Ubuntu 8.04.2
| (8.04 is a "LTS" = long time support version).
| 
|   apt-get install r-cran-robustbase
| 
| works fine, but when trying to load the package,
| there's a DLL - dependency on libRlapack.so 
| which is not fulfilled (and not fulfillable: There's *no*
| libRlapack.so).
| 
| For me,
| 
|   $ /usr/bin/R CMD config LAPACK_LIBS
|   -llapack
| 
| and lapack.so is found inside /usr/lib/R/modules/ 
| and liblapack.so from the 'lapack3' Debian/Ubuntu package 
| is simply in /usr/lib/libpack.so  
| 
| Could it be that this is caused by an Ubuntu / Debian 
| mismatch?

Scratch Debian here. It works there:

edd at ron:~> echo 'library(robustbase);cat("Hi\n")' | R --silent --no-save
R> library(robustbase);cat("Hi\n")
Hi
R>
edd at ron:~>

It looks like Ubuntu failed to rebuild the package. The Rlapack.so vs
lapack.so is an old one from the Atlas 3.6 / gfortran transition well over a
year ago and had affected other package.

So on Ubuntu, uninstall r-cran-robustbase and re-install robustbase from CRAN
sources.  And file a bug report with Ubuntu.

Dirk


| Thank you in advance,
| 
| Martin Maechler, ETH Zurich
| 
| ------- start of forwarded message -------
| From: Agustin Lobo <aloboaleu at gmail.com>
| To: "r-help at r-project.org" <r-help at r-project.org>
| Subject: [R] robustbase: cannot install
| Date: Mon, 11 May 2009 18:20:14 +0200
| 
| This is really odd,
| I've installed the binary of robustbase through synaptic on an ubuntu 
| 8.04 machine and get:
|  > library(robustbase)
| Error in dyn.load(file, DLLpath = DLLpath, ...) :
|    unable to load shared library 
| '/usr/lib/R/site-library/robustbase/libs/robustbase.so':
|    libRlapack.so: cannot open shared object file: No such file or directory
| Error: package/namespace load failed for 'robustbase'
|  >
| 
| The package is where it is suposed to be:
| /usr/lib/R/site-library/robustbase
| 
| is this not a problem at compiling?
| 
| The problem is that if I try to install the source with 
| install.packages("robustbase"), I get:
| gcc -std=gnu99 -shared -o robustbase.so R-rng4ftn.o init.o lmrob.o mc.o 
| qn_sn.o rf-common.o rffastmcd.o rfltsreg.o wgt_himed.o -L/usr/lib/R/lib 
| -lRlapack -lblas -L/usr/lib/gcc/i486-linux-gnu/4.2 -lgfortran -lm 
| -L/usr/lib/gcc/i486-linux-gnu/4.2 -lgfortran -lm -L/usr/lib/R/lib -lR
| /usr/bin/ld: cannot find -lRlapack
| collect2: ld returned 1 exit status
| 
| Despite the fact that I do have Rlapack:
| ~$ R CMD config LAPACK_LIBS
| -L/usr/lib/R/lib -lRlapack
| 
| Am I doing something wrong?
| 
| Thanks
| 
| Agus
| -- 
| Dr. Agustin Lobo
| Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
| LLuis Sole Sabaris s/n
| 08028 Barcelona
| Spain
| Tel. 34 934095410
| Fax. 34 934110012
| email: Agustin.Lobo at ija.csic.es
| http://www.ija.csic.es/gt/obster
| 
| ______________________________________________
| R-help at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-help
| PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
| and provide commented, minimal, self-contained, reproducible code.
| ------- end of forwarded message -------
| 
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian
#

        
DE> On 12 May 2009 at 11:45, Martin Maechler wrote:
DE> | Agustin, posted on R-help.
    DE> | I think the problem is one of the debian/ubuntu package
    DE> | 'r-cran-robustbase' and its setup or (missing?) dependencies.
    DE> | 
    DE> | I can confirm Agustin's problem, working on Ubuntu 8.04.2
    DE> | (8.04 is a "LTS" = long time support version).
    DE> | 
    DE> |   apt-get install r-cran-robustbase
    DE> | 
    DE> | works fine, but when trying to load the package,
    DE> | there's a DLL - dependency on libRlapack.so 
    DE> | which is not fulfilled (and not fulfillable: There's *no*
    DE> | libRlapack.so).
    DE> | 
    DE> | For me,
    DE> | 
    DE> |   $ /usr/bin/R CMD config LAPACK_LIBS
    DE> |   -llapack
    DE> | 
    DE> | and lapack.so is found inside /usr/lib/R/modules/ 
    DE> | and liblapack.so from the 'lapack3' Debian/Ubuntu package 
    DE> | is simply in /usr/lib/libpack.so  
    DE> | 
    DE> | Could it be that this is caused by an Ubuntu / Debian 
    DE> | mismatch?

    DE> Scratch Debian here. It works there:

    DE> edd at ron:~> echo 'library(robustbase);cat("Hi\n")' | R --silent --no-save
        R> library(robustbase);cat("Hi\n")
    DE> Hi
        R> 
    DE> edd at ron:~>

That's exactly what I meant with  "Ubuntu / Debian mismatch":

Namely that Ubuntu is not matching Debian in its setup/behavior,
as indeed, knowing the Debian maintainer Dirk E. a bit, I had
already assumed that it would work fine in Debian.


    DE> It looks like Ubuntu failed to rebuild the package. The Rlapack.so vs
    DE> lapack.so is an old one from the Atlas 3.6 / gfortran transition well over a
    DE> year ago and had affected other package.

    DE> So on Ubuntu, uninstall r-cran-robustbase and re-install robustbase from CRAN
    DE> sources.  And file a bug report with Ubuntu.

indeed.  Thank you, Dirk!  

However, I guess that Agustin should also install R itself
differently, namely using the CRAN-ubuntu repository rather than
the standard Ubuntu ones, since he told me his version of R gives
something like

    $ /usr/bin/R CMD config LAPACK_LIBS
    -L/usr/lib/R/libs -lRlapack

whereas I get the more reasonable

    $ /usr/bin/R CMD config LAPACK_LIBS
    -llapack

But, as I said, even my (two servers at work) 
Ubuntu 8.04 -- AMD64 (!) -- systems
get a non-working  r-cran-robustbase 
*from* the CRAN-ubuntu-repository.

However, I now understand why: The 'hardy' (8.04)  CRAN ubuntu
directory does *not* contain  r-cran-robustbase.
(the master is http://cran.r-project.org/bin/linux/ubuntu/hardy/ )

Maybe that could be changed (by Vincent IIRC)?

Regards,
Martin