Boost logo

Ublas :

Subject: Re: [ublas] lapack bindings - linker errors in windows but not linux
From: Peter Man (plwm2_at_[hidden])
Date: 2010-04-21 14:32:37


Thanks! It works! The liblapack.a contains dormqr, dgeqrf symbols etc.

However, when compiling my C++ program using g++ on cygwin, it still
comes up with the linker errors:
/cygdrive/c/cygwin/usr/local/atlas/lib/liblapack.a(ilaenv.o):ilaenv.f:(.text+0x213):
undefined reference to `__gfortran_compare_string'
/cygdrive/c/cygwin/usr/local/atlas/lib/liblapack.a(ilaenv.o):ilaenv.f:(.text+0x23f):
undefined reference to `__gfortran_compare_string'
/cygdrive/c/cygwin/usr/local/atlas/lib/liblapack.a(ilaenv.o):ilaenv.f:(.text+0x26b):
undefined reference to `__gfortran_compare_string'
/cygdrive/c/cygwin/usr/local/atlas/lib/liblapack.a(ilaenv.o):ilaenv.f:(.text+0x297):
undefined reference to `__gfortran_compare_string'
/cygdrive/c/cygwin/usr/local/atlas/lib/liblapack.a(ilaenv.o):ilaenv.f:(.text+0x2c3):
undefined reference to `__gfortran_compare_string'
/cygdrive/c/cygwin/usr/local/atlas/lib/liblapack.a(ilaenv.o):ilaenv.f:(.text+0x2eb):
more undefined references to `__gfortran_compare_string' follow
/cygdrive/c/cygwin/usr/local/atlas/lib/liblapack.a(dlamch.o):dlamch.f:(.text+0xf47):
undefined reference to `__gfortran_st_write'
/cygdrive/c/cygwin/usr/local/atlas/lib/liblapack.a(dlamch.o):dlamch.f:(.text+0xf63):
undefined reference to `__gfortran_transfer_integer'
/cygdrive/c/cygwin/usr/local/atlas/lib/liblapack.a(dlamch.o):dlamch.f:(.text+0xf6f):
undefined reference to `__gfortran_st_write_done'
/cygdrive/c/cygwin/usr/local/atlas/lib/libf77blas.a(xerbla.o):xerbla.f:(.text+0x3f):
undefined reference to `__gfortran_st_write'
/cygdrive/c/cygwin/usr/local/atlas/lib/libf77blas.a(xerbla.o):xerbla.f:(.text+0x5a):
undefined reference to `__gfortran_transfer_character'
/cygdrive/c/cygwin/usr/local/atlas/lib/libf77blas.a(xerbla.o):xerbla.f:(.text+0x75):
undefined reference to `__gfortran_transfer_integer'
/cygdrive/c/cygwin/usr/local/atlas/lib/libf77blas.a(xerbla.o):xerbla.f:(.text+0x7d):
undefined reference to `__gfortran_st_write_done'
/cygdrive/c/cygwin/usr/local/atlas/lib/libf77blas.a(xerbla.o):xerbla.f:(.text+0x89):
undefined reference to `__gfortran_stop_numeric'

But I got round that by doing a quick google search and added
"-lgfortran" flag when compiling. Unfortunately the linker errors are
still there with VS9.0,
but that's not a real loss, given that I can now compile using g++ cygwin.

Thanks for all your help!!!!

Peter

On 21/04/2010 18:57, Thomas Klimpel wrote:
> Peter Man wrote:
>
>> I did install atlas, but followed the instructions religiously,
>> including the bit where I do a fake configure
>> of atlas, then install full lapack, and then afterwards do a real
>> configure and install of atlas, which is supposed to link to the full
>> lapack installation if i tell it to.
>>
> It's not a fake configure. You have to first install "lapack", then do a configure with the "--with-netlib-lapack=NLAPACKdir/<your lapack library name>" flag, and then simply build by typing "make". If you type configure again without the "--with-netlib-lapack=NLAPACKdir/<your lapack library name>" flag, you will override your previous configuration and build without full lapack support.
>
> But as you have already built lapack and atlas, just follow the instructions from<http://math-atlas.sourceforge.net/atlas_install/atlas_install.html#sec-lapack-post> to get your fully functional liblapack.a:
>
> mkdir tmp
> cd tmp
> ar x ../liblapack.a
> cp<your LAPACK path& lib> ../liblapack.a
> ar r ../liblapack.a *.o
> cd ..
> rm -rf tmp
>
>
> Have fun,
> Thomas
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: plwm2_at_[hidden]
>

-- 
--------------------------------------------------------------------------
Peter Man                 University of Cambridge,
                           Department of Chemical Engineering
                           and Biotechnology,
Tel. +44 (0)1223 334786   Pembroke Street,
Fax. +44 (0)1223 334796   Cambridge CB2 3RA, UK
email: mailto:plwm2_at_[hidden]
        mailto:plwm2_at_[hidden]
--------------------------------------------------------------------------