[Numpy-discussion] Re: Problems compiling against ATLAS on x86_64

Matt Hyclak hyclak at math.ohiou.edu
Fri Feb 4 06:40:44 EST 2005

On Thu, Feb 03, 2005 at 09:42:31AM -0500, Matt Hyclak enlightened us:
> I'm about ready to pull out my hair trying to get this stuff to compile for
> a faculty member. I'm running RHEL 3 AS on a dual opteron machine. ATLAS
> compiles fine as I go through xconfig, but I can't for the life of me get
> Numeric to compile against it. I've tried ATLAS 3.6.0 and 3.7.8. I'm
> trying to build Numeric 23.7. I keep getting the following error:
> gcc -shared build/temp.linux-x86_64-2.2/lapack_litemodule.o
> -L/usr/lib64/atlas -llapack -lcblas -lf77blas -latlas -lg2c -o
> build/lib.linux-x86_64-2.2/lapack_lite.so
> /usr/bin/ld: /usr/lib64/atlas/liblapack.a(dgesv.o): relocation R_X86_64_32
> can not be used when making a shared object; recompile with -fPIC
> /usr/lib64/atlas/liblapack.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> I built ATLAS with -fPIC, but that didn't seem to help. Could someone
> *please* point me in the right direction before I start hitting things?

Sorry for replying to myself. Just for the archives, the problem seems to be
the static lapack/blas libraries provided with RHEL3 are not compiled with
-fPIC. I ripped open the rpm and rebuild it with an -fPIC added in and all
at least compiles now. I'll leave it up to my faculty to tell me whether or
not it works :-)


Matt Hyclak
Department of Mathematics 
Department of Social Work
Ohio University
(740) 593-1263

More information about the NumPy-Discussion mailing list