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

Michael Green mishagreen@gmail....
Sat Jun 19 17:01:57 CDT 2010


Well I used the instructions found here
<http://www.scipy.org/Installing_SciPy/Linux#head-eecf834fad12bf7a625752528547588a93f8263c>

I started by building lapack and it built successfully.

I then proceeded with ATLAS using the following configure line (that
does contain -fPIC):
../configure -Fa alg -fPIC -Ss flapack
/usr/local/src/lapack-3.1.1/lapack_LINUX.a

and then
make
cd lib
make shared

I'm getting
[root@localhost lib]# make shared
rm -f libatlas.so liblapack.so
make libatlas.so libf77blas.so libcblas.so liblapack.so
make[1]: Entering directory `/usr/local/src/ATLAS/ATLAS_LINUX/lib'
ld -melf_x86_64 -shared -soname /usr/local/atlas/lib/libatlas.so -o
libatlas.so \
           -rpath-link /usr/local/atlas/lib \
           --whole-archive libatlas.a --no-whole-archive -lc -lm
ld: libatlas.a(ATL_dger2k__2.o): relocation R_X86_64_32 against `a
local symbol' can not be used when making a shared object; recompile
with -fPIC
libatlas.a(ATL_dger2k__2.o): could not read symbols: Bad value
make[1]: *** [libatlas.so] Error 1
make[1]: Leaving directory `/usr/local/src/ATLAS/ATLAS_LINUX/lib'
make: *** [shared] Error 2

This error looks similar to the one I've been getting with numpy.
Please help.

--
Warm regards,
Michael Green



On Thu, Jun 17, 2010 at 1:32 AM, Robert Kern <robert.kern@gmail.com> wrote:
> On Wed, Jun 16, 2010 at 17:29, Michael Green <mishagreen@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
>


More information about the NumPy-Discussion mailing list