Page 1 of 1

Using a locally-compiled Lapack with gfortran/gcc 4.4.3 ?

PostPosted: Tue Oct 05, 2010 10:04 am
by B_Piguet
First, i would like to apologize if my question has already been answered. Feel free to point me to the right place, if needed.

I'm having problem using a locally-compiled LAPACK with gfortran/gcc4.4.3

I have a library (a shared library) that uses Lapack, wich needs to be compiled with specific flags : -fno-underscoring (for historical reasons) and -fPIC (to be called from the dynamic loader). So, I compile it locally. I'm surely not getting the best optimisation (to say the least..) but it's enough for our needs, and this has been working for some years, now.

I recently tried to compile it with gfortran/gcc4.4.3. The compilation runs OK, so does the compilation of the library which uses LaPack.

But when I try to compile a simple test program which uses my library, I get the message :
/usr/bin/ld: test_oper: hidden symbol `__powisf2' in /usr/lib/gcc/x86_64-manbo-linux-gnu/4.4.3/libgcc.a(_powisf2.o) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output


I learned through Google that I'm not the only one facing this problem : ask "lapack __powisf2 gfortran hidden", an you'll see that people porting numpy to FreeBSD have gotten the same message.

But... I've not been smart enough to find a solution from what I've read on the web.

I think it's probably more a gcc problem than a Lapack problem, but I hope that some of you may already have hit this error, and found a solution.

Some details :
The machine is a x86_64 running GNU/Linux, kernel 2.6.33.5-server-2mnb (mandriva2010.1)
gfortran -v says : "gcc version 4.4.3 (GCC)" and "Target: x86_64-manbo-linux-gnu"
Same results with lapack 3.1.1. and 3.2.2
I didn't succeed in attaching my make.inf file. ask me if you want to check it.

Regards,

Bruno.

Re: Using a locally-compiled Lapack with gfortran/gcc 4.4.3

PostPosted: Wed Oct 06, 2010 3:15 am
by admin
Bruno,
against which BLAS library are you linking?
It seems that the problem is related to ATLAS. (See https://bbs.archlinux.org/viewtopic.php?id=55227)
You can try GotoBLAS, MKL or the Reference BLAS to see if it fixes your problem.
Julie

Re: Using a locally-compiled Lapack with gfortran/gcc 4.4.3

PostPosted: Wed Oct 06, 2010 5:47 am
by B_Piguet
Indeed, I have two blas libraries on my machine :
one in /usr/lib64, and one plain Fortran BLAS coming from lapack.tgz, locally compiled ("make blaslib").

My first test seems to show that I get the same error message with both libraries.
I'll need to to some more testing, and produce a MCE.

Bruno.