[R-SIG-Mac]problems with Matrix, AnalyzeFMRI installation

Kaspar Pflugshaupt pflugshaupt@geobot.umnw.ethz.ch
Thu, 07 Mar 2002 14:43:12 +0100


On 7.3.2002 4:32 Uhr, John Carew wrote:

> Hello,
> I recently switched from a linux to mac osx g4 laptop.  I installed R and
> atlas with fink.  When I ran install.packages() for AnalyzeFMRI and
> Matrix, I had errors while compiling.
> 
> Part of output for AnalyzeFMRI:
> 
>  sormqr:
> gcc -I/sw/lib/R/include  -I/sw/include   -fno-common  -g -O2 -c slapack.c
> -o slapack.o
> gcc -bundle -bundle_loader /sw/lib/R/bin/R.bin  -o AnalyzeFMRI.so
> analyzeFMRI.o slapack.o -lf77blas -lcblas -latlas -lf2c -lm
> -L/usr/local/lib -lf2c -lm
> /usr/bin/ld: can't locate file for: -lf77blas
> make: *** [AnalyzeFMRI.so] Error 1
> ERROR: compilation failed for package `AnalyzeFMRI'
> 
> Part of output for Matrix:
> 
> Installing *source* package `Matrix' ...
> creating cache ./config.cache
> checking for gcc... gcc
> checking whether the C compiler (gcc  ) works... yes
> checking whether the C compiler (gcc  ) is a cross-compiler... no
> checking whether we are using GNU C... yes
> checking whether gcc accepts -g... yes
> checking for ATL_xerbla in -latlas... no
> checking for dgemm_ in -lcxml... no
> checking for dgemm_ in -ldxml... no
> checking for dgemm_ in -lscs... no
> checking for dgemm_ in -lcomplib.sgimath... no
> checking for zherk in -lblas... no
> checking for dgemm_ in -lblas... no
> could not find your BLAS library
> ERROR: configuration failed for package `Matrix'
> 
> 
> 
> It seems that the problem might be related.  I thought that the BLAS
> library was part of atlas.  Does anyone know how to fix this problem?
> Thank you for your help.
> 
> Best wishes,
> John Carew

Confirmed here for the Matrix package. You can make it install by doing the
following from your shell (got this tip from Jeff Whitaker):

setenv LDFLAGS -L/sw/lib
R INSTALL Matrix_0.3-16.tar.gz

I guess that this should take care of the other package, too.

The problem is that the -L flag (location of binary libraries) is set to
/usr/local/lib, which is wrong for Fink (should be /sw/lib). As a matter of
fact, this should not happen with the newest Fink R version 1.4.1-1, since
Jeff Whitaker (the Fink R manintainer) fixed it. If you look at the file
/sw/lib/R/etc/Makeconf, you should find a line LDFLAGS = -L/sw/lib in there.
I have no idea why it doesn't get used for the installation of this package,
though - it solved similar problems for other packages (e.g. KernSmooth)


Cheers

Kaspar Pflugshaupt

-- 

Kaspar Pflugshaupt
Geobotanisches Institut
Zuerichbergstr. 38
CH-8044 Zuerich

Tel. ++41 1 632 43 19
Fax  ++41 1 632 12 15

mailto:pflugshaupt@geobot.umnw.ethz.ch
privat:pflugshaupt@mails.ch
http://www.geobot.umnw.ethz.ch