octave install Error: A BLAS library was detected

2019-07-07 09:00发布

问题:

I'm trying to install octave 3.8.1 on a cluster running Redhat+IBM LSF. I don't have write access to any directory except my home dir. I have loaded three modules 1) pcre 8.33 2) blas 08/2013 3) lapack 3.5.0. But when I run ./configure, I got the error "configure: error: A BLAS library was detected but found incompatible with your Fortran 77 compiler settings.", as the image below shows.

I have tried loading module gfortran64 and add F77=gfortran as command line parameter, but this doesn't work. Could you please help me with this problem? If you need any information please tell me in this webpage. Thank you.

回答1:

I've had the same problem. On a fresh install of CentOS 6.3 I was able to compile octave 4.0.0 successfully.

After installing the necessary dependencies (notably blas, lapack and pcre) I created symlinks to liblapack and libblas in some directory, e.g.:

mkdir /some/path
cd /some/path
ln -s /usr/lib64/libblas.so.3 libblas.so
ln -s /usr/lib64/liblapack.so.3 liblapack.so

Then put the relevant directory in LDFLAGS, e.g., in bash/sh:

LDFLAGS=-L/some/path ./configure

So either octave's configure didn't look in /usr/lib64, or it requires the name of the libraries to end in ".so" (not ".so.3"). I haven't investigated which of the two was the problem since the above worked for me.

/some/path can be deleted when octave has been installed.



回答2:

My octave repository was compiling flawlessly, until the day I installed gfortran and started to get the same message. I had been using f77 (from the fort77 package). Somehow, the configure script defaulted to gfortran, which [I believe] is incompatible with the BLAS libraries.

I would suggest using f77 in octave compilation instead of gfortran.

I compiled octave 4.0.0 on Mint 17.1, but I believe the issue is the same.