[R-sig-Debian] Problems compiling packages from source: can't find -lquadmath.

Dirk Eddelbuettel edd at debian.org
Thu Jan 12 04:46:37 CET 2012


On 12 January 2012 at 12:51, Simon Blomberg wrote:
| Hi all,
| 
| I have recently installed Debian squeeze on a Dell T7500, but I have 
| pinned R and friends to come from the unstable distribution. Currently I 
| have these Debian packages installed (with dependencies):
| 
| r-base-core 2.14.1-1
| r-base-dev 2.14.1-1
| 
| The problem comes when installing new source packages from CRAN using 
| install.packages(). Below is a typical installation output:
| 
| * installing *source* package ‘gee’ ...
| ** libs
| gfortran -fpic -O3 -pipe -g -c dgedi.f -o dgedi.o
| gfortran -fpic -O3 -pipe -g -c dgefa.f -o dgefa.o
| gcc -std=gnu99 -I/usr/share/R/include -fpic -O3 -pipe -g -c ugee.c -o ugee.o
| gcc -std=gnu99 -shared -o gee.so dgedi.o dgefa.o ugee.o -lblas 
| -lgfortran -lm -lquadmath -lgfortran -lm -lquadmath -L/usr/lib64/R/lib -lR
| /usr/bin/ld: cannot find -lquadmath
| collect2: ld returned 1 exit status
| make: *** [gee.so] Error 1
| ERROR: compilation failed for package ‘gee’
| * removing ‘/usr/local/lib/R/site-library/gee’
| 
| The downloaded packages are in
| ‘/tmp/Rtmp7Cgdu4/downloaded_packages’
| Warning message:
| In install.packages("gee") :
| installation of package ‘gee’ had non-zero exit status
| 
| The problem seems to be with the location of libquadmath. I tried 
| putting a symbolic link to libquadmath.so.0.0.0 (which is in 
| /usr/lib/x86_64-linux-gnu) in /usr/lib64/R/lib , after reading the 
| following thread (with the help of an internet translator!):
| 
| http://r-br.2285057.n4.nabble.com/R-br-lquadmath-td4124090.html
| 
| However, this has not solved the problem at all.
| 
| Can anyone help me with this?

Funny you bring that up because I saw the -lquadmath in a link line the other
day and wondered "where on earth did that come from" :)

So now, on this (Ubuntu 11.10) box, we can start the chase:

edd at max:~$ locate libquadmath|wc -l
64                                              # a lot, some are older .deb packages
edd at max:~$ locate libquadmath.so|wc -l         
6                                               # still a lot
edd at max:~$ locate libquadmath.so|head -2        # so let's look at the first two
/usr/lib/gcc/x86_64-linux-gnu/4.6/libquadmath.so
/usr/lib/gcc/x86_64-linux-gnu/4.6/32/libquadmath.so
edd at max:~$ dpkg -S /usr/lib/gcc/x86_64-linux-gnu/4.6/libquadmath.so
gcc-4.6: /usr/lib/gcc/x86_64-linux-gnu/4.6/libquadmath.so
edd at max:~$ 

So gcc brings this along.  I suspect you are (for once) bitten by the
unstable/testing split.  The /new/ R packages (r-base-core etc) were probably
built against a different compiler than the one you use.  You need to bring
that back in sync, either by also letting the new compiler in (risque as it
will bring a new libc) or (safer, boring) getting maybe the squeeze build of
R onto your system, or (more work) reb-building the Debian R package on your
system to match you compiler.

Let me assure you that "the system" as a whole works, I would have heard by
now if r-base-core broke builds of r-cran-* packages. The Debian archive
rebuilds those way too frequently for anything substantial to slip through.

So looks like this is yours.  Sorry that are bitten by a compiler transition,
but "he who lives at the edge of unstable ... "  ;-)

Cheers,  Dirk 
 
| Thanks in advance,
| 
| Simon.
| 
| -- 
| Simon Blomberg, BSc (Hons), PhD, MAppStat, AStat.
| Lecturer and Consultant Statistician
| School of Biological Sciences
| The University of Queensland
| St. Lucia Queensland 4072
| Australia
| T: +61 7 3365 2506
| email: S.Blomberg1_at_uq.edu.au
| http://www.uq.edu.au/~uqsblomb/
| 
| Policies:
| 1.  I will NOT analyse your data for you.
| 2.  Your deadline is your problem.
| 
| Statistics is the grammar of science - Karl Pearson.
| 
| _______________________________________________
| R-SIG-Debian mailing list
| R-SIG-Debian at r-project.org
| https://stat.ethz.ch/mailman/listinfo/r-sig-debian

-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx



More information about the R-SIG-Debian mailing list