From: Hanno K. <kl...@ph...> - 2006-10-11 14:24:29
|
Hi, I don't know if this is a bug or just me doing something wrong (I suspect the latter). I try to compile numpy-1.0rc1 with python2.5 and atlas 3.7.17. I have build the atlas library myself, it doesn't give any errors under make test or make pttest, so it seems to be okay. if I try to build numpy I get the following error: creating build/temp.linux-x86_64-2.5/numpy/core/blasdot compile options: '-DATLAS_INFO="\"3.7.17\"" -Inumpy/core/blasdot -I/scratch/python2.5/include -Inumpy/core/include -Ibuild/src.linux-x86_64-2.5/numpy/core -Inumpy/core/src -Inumpy/core/include -I/scratch/python2.5/include/python2.5 -c' gcc: numpy/core/blasdot/_dotblas.c gcc -pthread -shared build/temp.linux-x86_64-2.5/numpy/core/blasdot/_dotblas.o -L/scratch/python2.5/lib -lcblas -latlas -o build/lib.linux-x86_64-2.5/numpy/core/_dotblas.so /usr/bin/ld: /scratch/python2.5/lib/libcblas.a(cblas_dgemm.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /scratch/python2.5/lib/libcblas.a: could not read symbols: Bad value collect2: ld returned 1 exit status /usr/bin/ld: /scratch/python2.5/lib/libcblas.a(cblas_dgemm.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC /scratch/python2.5/lib/libcblas.a: could not read symbols: Bad value collect2: ld returned 1 exit status error: Command "gcc -pthread -shared build/temp.linux-x86_64-2.5/numpy/core/blasdot/_dotblas.o -L/scratch/python2.5/lib -lcblas -latlas -o build/lib.linux-x86_64-2.5/numpy/core/_dotblas.so" failed with exit status 1 I then tried to recompile atlas with the configure options as: configure --cflags=-fPIC --with-netlib-lapack=/scratch/src/python_dist/LAPACK --prefix=/scratch/python2.5 but the error still remains. I'm on a 2 CPU Intel Xeon machine with gcc 3.2.3. Any hints? Hanno -- Hanno Klemm kl...@ph... |
From: Travis O. <oli...@ee...> - 2006-10-11 16:50:53
|
Hanno Klemm wrote: >Hi, > >I don't know if this is a bug or just me doing something wrong (I >suspect the latter). I try to compile numpy-1.0rc1 with python2.5 and >atlas 3.7.17. > >I have build the atlas library myself, it doesn't give any errors >under make test or make pttest, so it seems to be okay. if I try to >build numpy I get the following error: > >creating build/temp.linux-x86_64-2.5/numpy/core/blasdot >compile options: '-DATLAS_INFO="\"3.7.17\"" -Inumpy/core/blasdot >-I/scratch/python2.5/include -Inumpy/core/include >-Ibuild/src.linux-x86_64-2.5/numpy/core -Inumpy/core/src >-Inumpy/core/include -I/scratch/python2.5/include/python2.5 -c' >gcc: numpy/core/blasdot/_dotblas.c >gcc -pthread -shared >build/temp.linux-x86_64-2.5/numpy/core/blasdot/_dotblas.o >-L/scratch/python2.5/lib -lcblas -latlas -o >build/lib.linux-x86_64-2.5/numpy/core/_dotblas.so >/usr/bin/ld: /scratch/python2.5/lib/libcblas.a(cblas_dgemm.o): >relocation R_X86_64_32 can not be used when making a shared object; >recompile with -fPIC > > This may be part of your problem. It's looks like the linker is having a hard time making use of your compiled extension in a shared library. Perhaps you should make sure -fPIC is on when you compile atlas (I'm not sure how to do that --- perhaps setting CCFLAGS environment variable to include -fPIC would help). -Travis |
From: Hanno K. <kl...@ph...> - 2006-10-12 07:53:11
|
Travis, thank you, setting the -fPIC option indeed solved my problem. Just for future reference (if anybody else needs it), I added the -fPIC flag to the compiler flags in Make.inc in the atlas build directory, as setting CCFLAGS somehwo didn't seem to be successful. This might not be elegant but it worked. Best regards, Hanno Travis Oliphant <oli...@ee...> said: > Hanno Klemm wrote: > > >Hi, > > > >I don't know if this is a bug or just me doing something wrong (I > >suspect the latter). I try to compile numpy-1.0rc1 with python2.5 and > >atlas 3.7.17. > > > >I have build the atlas library myself, it doesn't give any errors > >under make test or make pttest, so it seems to be okay. if I try to > >build numpy I get the following error: > > > >creating build/temp.linux-x86_64-2.5/numpy/core/blasdot > >compile options: '-DATLAS_INFO="\"3.7.17\"" -Inumpy/core/blasdot > >-I/scratch/python2.5/include -Inumpy/core/include > >-Ibuild/src.linux-x86_64-2.5/numpy/core -Inumpy/core/src > >-Inumpy/core/include -I/scratch/python2.5/include/python2.5 -c' > >gcc: numpy/core/blasdot/_dotblas.c > >gcc -pthread -shared > >build/temp.linux-x86_64-2.5/numpy/core/blasdot/_dotblas.o > >-L/scratch/python2.5/lib -lcblas -latlas -o > >build/lib.linux-x86_64-2.5/numpy/core/_dotblas.so > >/usr/bin/ld: /scratch/python2.5/lib/libcblas.a(cblas_dgemm.o): > >relocation R_X86_64_32 can not be used when making a shared object; > >recompile with -fPIC > > > > > > This may be part of your problem. It's looks like the linker is having > a hard time making use of your compiled extension in a shared library. > Perhaps you should make sure -fPIC is on when you compile atlas (I'm not > sure how to do that --- perhaps setting CCFLAGS environment variable to > include -fPIC would help). > > -Travis > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > -- Hanno Klemm kl...@ph... |