On Thu, 22 Jan 2009, geno wrote:
Hi, i'm trying to build gretl for Windows. I'm using Linux
(ubuntu
8.10) and mingw compiler.
When i type make in win32 directory i get error messages:
=========================
make
../builddate.pl
Updating build.h
mkdir -p dlls
mkdir -p plugins
i586-mingw32msvc-dllwrap --as=i586-mingw32msvc-as --export-all
--driver-name i586-mingw32msvc-gcc -Wall -O2 -mms-bitfields -DWIN32 -s
\
--output-def libgretl.def --implib ./import-libs/libgretl.a \
-o dlls/libgretl.dll adf_kpss.o ...
qrfac.o qrsolv.o lbfgsb.o dllinit.o -lg2c -lm -L./import-libs -lxml2
-lz -lintl -lprob -lgmp \
-lmingwex -lwsock32
-Lc:/devel/target/610d23b3fdae3f3d08ee4932c288bfbc/lib -lglib-2.0
-lintl -llapack -lblas -L/lib/ -lf77blas -latlas -lg2c -lfftw3.dll
i586-mingw32msvc-dllwrap: no export definition file provided.
Creating one, but that may not be what you want
gretl_matrix.o:gretl_matrix.c:(.text+0x4ad6):
undefined reference to
`_dtrtri_' ...
Looks good up to the point of linking. The undefined references
are to lapack functions, so something is wrong with either the
specification of LAPACK_LIBS in the Makefile, or with the
libraries themselves.
Having both -lblas and -lf77blas looks odd to me, but then linking
to lapack can be a funny business. I take it you have DLLs and
import libraries corresponding to all of lapack, blas, f77blas and
atlas?
As a means of comparison, I've put the lapack files I'm using
at
http://www.wfu.edu/~cottrell/tmp/lapack_win32.zip
The contents are:
libblas.a # blas import library
libg2c.a # static library
liblapack.a # lapack import library
libblas.dll # blas DLL
liblapack.dll # lapack DLL
blas and lapack are the netlib 3.1.1 versions, built with mingw.
The linker invocation string would be
LAPACK_LIBS = -llapack -lblas
assuming that liblapack.a and libblas.a are both located somewhere
the linker can find them -- on my system they're in
/opt/cross-tools/mingw32/lib
I guess you don't want to use these libraries "permanently" since
it appears that you want to try atlas on win32. But all the same
you might see if you can link gretl successfully using them.
Going back to the first linker failure (that is, _dtrtri_
undefined), I tried:
waverley:~$ mingw32-nm \
/opt/cross-tools/mingw32/lib/liblapack.a | grep dtrtri
and got:
00000000 T _dtrtri_
00000000 I __imp__dtrtri_
You might try that on your own liblapack.
Allin.