petsc4py fails to configure with my own lapack/blas

Ondrej Certik ondrej at
Thu Jun 4 17:00:52 CDT 2009


I am trying to build petsc-3.0.0 inside Sage, for which I want it to
use Sage's lapack and blas.

Here is what I do:

./configure --prefix="$SAGE_LOCAL"
--with-blas-lapack-dir="$SAGE_LOCAL/lib" --CFLAGS="-fPIC"

(The -fPIC flags are necessary, otherwise petsc4py fails to build on
64bit when linking with petsc -- that might be another bug)

When I execute the above line, I get:

         UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log
for details):
You set a value for --with-blas-lapack-dir=<dir>, but
/home/ondrej/ext/spd-3.4.2spd3-ubuntu-64bit/local/lib cannot be used

and a configure.log is attached. I also tried:

./configure --prefix="$SAGE_LOCAL"
--with-blas-lib="$SAGE_LOCAL/lib/libblas.a" --CFLAGS="-fPIC"

but I got the same result. So as a workaround, I configure it with:

./configure --prefix="$SAGE_LOCAL" --with-blas-lapack-dir="/usr/lib"

which works fine, petsc4py also installs fine, but unfortunately it
doesn't import:

which I suspect is due to the wrong lapack and blas during petsc build
(but I may be wrong, maybe it's another bug).

Does anyone knows what else I can try to get it to work?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: text/x-log
Size: 1096662 bytes
Desc: not available
URL: <>

More information about the petsc-users mailing list