Hi Rachel,
You need to link with libg2c after you link to liblapack.so. Note that a
simple -lg2c didn't work for me, I had to search for it under /usr using
find /usr -name "libg2c.*"
which found the following on my system
/usr/lib/gcc-lib/ia64-redhat-linux/3.2.3/libg2c.a
/usr/lib/gcc-lib/ia64-redhat-linux/3.2.3/libg2c.so
/usr/lib/libg2c.so.0
/usr/lib/libg2c.so.0.0.0
Linking with any one of these solved the similar undefined reference
problems I had when linking an LAPACK library I compiled with ifort to
/usr/lib/libblas.so
Hope this helps,
Ed
Date: Mon, 20 Mar 2006 18:25:40 -0500
From: rachel bean <rbean@Domain.Removed>
Subject: [Lapack] Lapack library link question
To: lapack@Domain.Removed
Message-ID: <598D2D0C-EBC3-42F5-9CA5-4D22C703663F@Domain.Removed>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Hi,
I am compiling a code with ifort v9.0 which calls the LAPACK library
however I have the following errors at the end of the compilation.
/usr/local/lib/liblapack.so: undefined reference to `e_wsfe'
/usr/local/lib/liblapack.so: undefined reference to `z_abs'
/usr/local/lib/liblapack.so: undefined reference to `c_sqrt'
/usr/local/lib/liblapack.so: undefined reference to `s_cmp'
/usr/local/lib/liblapack.so: undefined reference to `r_lg10'
/usr/local/lib/liblapack.so: undefined reference to `z_exp'
/usr/local/lib/liblapack.so: undefined reference to `c_exp'
/usr/local/lib/liblapack.so: undefined reference to `do_fio'
/usr/local/lib/liblapack.so: undefined reference to `z_sqrt'
/usr/local/lib/liblapack.so: undefined reference to `s_cat'
/usr/local/lib/liblapack.so: undefined reference to `s_stop'
/usr/local/lib/liblapack.so: undefined reference to `c_abs'
/usr/local/lib/liblapack.so: undefined reference to `d_lg10'
/usr/local/lib/liblapack.so: undefined reference to `s_wsfe'
/usr/local/lib/liblapack.so: undefined reference to `s_copy'
make: *** [test] Error 1
The same errors arise if I use the sys-admin LAPACK library or one I
compiled independently. Can you please let me know whether you have
come across this error before, for example could it be a compiler
specific error? Googling appears to show that it has happened to a
number of people - although no solution has been posted.
Thanks in advance,
Rachel Bean
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
|