undefined reference in final lapack.a lib

Open discussion regarding features, bugs, issues, vendors, etc.

undefined reference in final lapack.a lib

Postby kukuttou » Thu Mar 01, 2007 7:15 pm

Hi, I got a weird problem for you guys.
I followed the instruction and installed the clapack package sucessfully in my Red-hat Linux system. It passed all the testing.
I include the f2c.h and clapack.h
I linked blas_c.a lacpack_c.a and libF77.a in my makefile.
But when I call dsyev_(...) in my program, there are link errors, like:
../CLAPACK/lapack_c.a(dlamch.o)(.text+0x9d): In function `dlamch_':
: undefined reference to `pow_di'
../CLAPACK/lapack_c.a(dsteqr.o)(.text+0x823): In function `dsteqr_':
: undefined reference to `d_sign'
../CLAPACK/lapack_c.a(ilaenv.o)(.text+0x3b): In function `ilaenv_':
: undefined reference to `s_copy'
../CLAPACK/lapack_c.a(ilaenv.o)(.text+0x210): In function `ilaenv_':
: undefined reference to `s_cmp'
../CLAPACK/lapack_c.a(ilaenv.o)(.text+0x2b6): more undefined references to `s_cmp' follow
../CLAPACK/lapack_c.a(dlartg.o)(.text+0x63f): In function `dlartg_':
: undefined reference to `pow_di'
../CLAPACK/lapack_c.a(dlarfg.o)(.text+0x7b): In function `dlarfg_':
: undefined reference to `d_sign'
../CLAPACK/lapack_c.a(dlarfg.o)(.text+0x1d5): In function `dlarfg_':
: undefined reference to `d_sign'
and bla bla bla.................
I totally have no idea about this, and tried reinstall the whole clapack again, the problem still there. But for the win32 version clapack, under windows xp with visual studio , my code running O.K. No such error when calling dsyev_(...).
Any one has any tips to solve this?
Thanks
kukuttou
 
Posts: 3
Joined: Wed Nov 01, 2006 1:16 am

Postby Iana » Tue Mar 06, 2007 6:19 pm

Hi Kukuttou

I'm not sure if this helps, but on my system (scientific linux 4.4), these symbols are defined by the f2c library /usr/lib/libg2c.a so -lg2c would allow them to be resolved.

Hope this helps.

Ian.
Iana
 
Posts: 8
Joined: Tue Mar 06, 2007 2:48 pm

Postby Klaas » Wed Mar 14, 2007 9:37 am

Hi,

I generaly noticed that you have to add the libraries in the correct order. There you use clapack, this would be

lapack_c.a blas_c.a libF77.a libI77.a

With those four libraries and in this order it should work properly
Klaas
 
Posts: 22
Joined: Mon Feb 06, 2006 2:06 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 38 guests