You shouldn't need gfortran to compile BLAS/LAPACK since those libraries
are already built into OS X as the veclib framework. You can find how to
link against these native libraries online.
Regarding the configure error, you should look near the end of your
config.log to see exactly what command caused the failure. It should
list a short test program code as well as the command line used to
compile it, and the error message.
On 12/19/2011 4:44 PM, Dongyoon Oh wrote:
On Mon, Dec 19, 2011 at 4:40 PM, Dongyoon Oh <[email protected]
<mailto:[email protected]>> wrote:
Hi,
I'm trying to build mpb on my Mac OS X 10.7.2 but I'm failing it for
some reasons.
Right now, the problem is related with BLAS and gfortran.
I installed gfortran from the package gcc-4.6.2 I downloaded from web.
I've also downloaded blas.tgz from http://www.netlib.org/blas/ and
made 'libblas.a':
||
|cd BLAS|
|gfortran -c -O3 *.f|
|ar rv libblas.a *.o|
|sudo cp libblas.a /usr/local/lib|
(when I removed the command line options and just typed
>> gfortran *.f
I got the following error
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.5.o
ld: symbol(s) not found for architecture x86_64)
Now, I set some variables
export CPPFLAGS="-I/usr/local/include -arch x86_64"
export CFLAGS="-I/usr/local/include -arch x86_64"
export CXXFLAGS="-I/usr/local/include -arch x86_64"
export LDFLAGS="-L/usr/local/lib"
* Fortran Related *
F77=$HOME/my_gcc/bin/my-gfortran
export
FLIBS="-L/Users/Dongyoon/my_gcc/lib/gcc/x86_64-apple-darwin11.2.0/4.6.2"
./configure --prefix=/usr/local --with-blas=/usr/local/lib/libblas.a
--with-lapack=/usr/local/lib/liblapack.a
--with-libctl=/usr/local/share/libctl
Then configure :
./configure --with-blas=/usr/local/lib/libblas.a
--with-lapack=/usr/local/lib/liblapack.a
--with-libctl=/usr/local/share/libctl
Then I get the error message :
checking for ATL_xerbla in -latlas... no
checking for sgemm_ in -lblas... no
checking for sgemm_ in -lcxml... no
checking for sgemm_ in -ldxml... no
checking for sgemm_ in -lscs... no
checking for sgemm_ in -lcomplib.sgimath... no
checking for sgemm_ in -lblas... (cached) no
checking for sgemm_ in -lblas... (cached) no
configure: error: BLAS was not found!
Since I linked to 'libblas.a' by command line options in
configuration, I'm not sure about the cause of the error.
Could this be related to fortran issue?
Best,
Dongyoon
_______________________________________________
mpb-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss
_______________________________________________
mpb-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss