Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

slam package install fails with make error

Tags:

r

linker

I'm trying to install the slam package, but it seems to fail on my system. I'm running ubuntu 12.04. I thought it was a missing library or something so I installed a few that match liblas, but no dice.

* installing *source* package ‘slam’ ...
** package ‘slam’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -O3 -pipe  -g  -c grouped.c -o grouped.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -O3 -pipe  -g  -c sparse.c -o sparse.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG      -fpic  -O3 -pipe  -g  -c util.c -o util.o
gcc -std=gnu99 -shared -o slam.so grouped.o sparse.o util.o -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -lblas
collect2: ld returned 1 exit status
make: *** [slam.so] Error 1
ERROR: compilation failed for package ‘slam’
* removing ‘/home/brandon/.R/i686-pc-linux-gnu-library/2.15/slam’

I've tried:

sudo apt-get install liblas1 liblas-bin liblas-dev
like image 411
Brandon Bertelsen Avatar asked Nov 23 '12 16:11

Brandon Bertelsen


1 Answers

You may have something fishy going on with your system. Try to follow /usr/lib/libblas.* which on my Ubuntu 12.04 server, with the OpenBLAS package installed, yields:

edd@max:~$ ls -log /usr/lib/libblas.* /etc/alternatives/libblas*                                                                                                                                                                 
lrwxrwxrwx 1 36 Jun 15 09:41 /etc/alternatives/libblas.a -> /usr/lib/openblas-base/libopenblas.a
lrwxrwxrwx 1 37 Jun 15 09:41 /etc/alternatives/libblas.so -> /usr/lib/openblas-base/libopenblas.so
lrwxrwxrwx 1 39 Jun 15 09:41 /etc/alternatives/libblas.so.3gf -> /usr/lib/openblas-base/libopenblas.so.0
lrwxrwxrwx 1 27 May  9  2012 /usr/lib/libblas.a -> /etc/alternatives/libblas.a
lrwxrwxrwx 1 28 May  9  2012 /usr/lib/libblas.so -> /etc/alternatives/libblas.so
lrwxrwxrwx 1 32 May  9  2012 /usr/lib/libblas.so.3gf -> /etc/alternatives/libblas.so.3gf
edd@max:~$ 

You should have something similar, albeit with the base blas you have installed.

like image 52
Dirk Eddelbuettel Avatar answered Sep 23 '22 10:09

Dirk Eddelbuettel