[Numpy-discussion] Building Numpy: could not read symbols Bad value error

Robert Kern robert.kern at gmail.com
Wed Jun 16 18:32:58 EDT 2010


On Wed, Jun 16, 2010 at 17:29, Michael Green <mishagreen at gmail.com> wrote:
> Bright minds,
>
> I'm trying to build Numpy v1.4.1 from source on CentOS 5.2 x64 and
> running into errors. It seems to be linking error. Regrettably, I
> don't posses the necessary skill to decipher the error. So your help
> will be invaluable.
>
> I configured (and then successfully built) ATLAS with the following
> configure line:
> ../configure --with-netlib-lapack-tarfile=/usr/local/src/Python/numpy/lapack.tgz
> -D c -DPentiumCPS=2666 --prefix=/usr/local/atlas-3.9.25 -b 64 -Fa alg
> '-fPIC'
>
>
> Now, building the Numpy (using gfortran) fails with:
> /usr/bin/gfortran -Wall -Wall -shared
> build/temp.linux-x86_64-2.6/numpy/linalg/lapack_litemodule.o
> build/temp.linux-x86_64-2.6/numpy/linalg/python_xerbla.o
> -L/usr/local/lib -Lbuild/temp.linux-x86_64-2.6 -llapack -lptf77blas
> -lptcblas -latlas -lgfortran -o
> build/lib.linux-x86_64-2.6/numpy/linalg/lapack_lite.so
> /usr/bin/ld: /usr/local/lib/libatlas.a(.o::ATL_dger2k(void)):
> relocation R_X86_64_32 against `a local symbol' can not be used when
> making a shared object; recompile with -fPIC
> /usr/local/lib/libatlas.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status

This means that your ATLAS library was compiled without the
appropriate flags for inclusion in a shared library like an extension
module. Consult the ATLAS installation instructions for how to compile
it as relocatable code using the -fPIC flag.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the NumPy-Discussion mailing list