Numpy Installation Problem on Redhat Linux
Dear all, I've built blas, lapack, and atlas libraries, as shown below. $ ls ~/lib/atlas/lib/ libatlas.a libcblas.a libf77blas.a liblapack.a libptcblas.a libptf77blas.a The library location are specified by site.cfg file, as shown below. [DEFAULT] library_dirs = /home/username/lib/atlas/lib include_dirs = /home/username/lib/atlas/include [blas] libraries = libf77blas, libcblas, libatlas [lapack] libraries = liblapack, libf77blas, libcblas, libatlas I've tried to build numpy (version 1.6.2) by $ python setup.py build --fcompiler=gnu However, I got the following error message: error: Command "/usr/bin/g77 -g -Wall -g -Wall -shared build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/scipy/integrate/vodemodule.o build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/fortranobject.o -L/home/username/lib/ -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.6 -lodepack -llinpack_lite -lmach -lblas -lpython2.6 -lg2c -o build/lib.linux-x86_64-2.6/scipy/integrate/vode.so" failed with exit status I've searched internet for possible solutions whole day but don't have any progress so far. Anyone has any idea of how to fix this? Thanks!
Hi, are you sure that you want g77 and not gfortran? If you want gfortran, you should pass the
--fcompiler=gnu95 flag to setup.py.
Which redhat version are you building on? (I don't know red hat well enough to comment, but perhaps someone else do...) Paul On 6. juli 2012, at 03:00, Hung-Hsuan Chen wrote:
Dear all,
I've built blas, lapack, and atlas libraries, as shown below.
$ ls ~/lib/atlas/lib/ libatlas.a libcblas.a libf77blas.a liblapack.a libptcblas.a libptf77blas.a
The library location are specified by site.cfg file, as shown below.
[DEFAULT] library_dirs = /home/username/lib/atlas/lib include_dirs = /home/username/lib/atlas/include
[blas] libraries = libf77blas, libcblas, libatlas
[lapack] libraries = liblapack, libf77blas, libcblas, libatlas
I've tried to build numpy (version 1.6.2) by $ python setup.py build --fcompiler=gnu
However, I got the following error message: error: Command "/usr/bin/g77 -g -Wall -g -Wall -shared build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/scipy/integrate/vodemodule.o build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/fortranobject.o -L/home/username/lib/ -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.6 -lodepack -llinpack_lite -lmach -lblas -lpython2.6 -lg2c -o build/lib.linux-x86_64-2.6/scipy/integrate/vode.so" failed with exit status
I've searched internet for possible solutions whole day but don't have any progress so far. Anyone has any idea of how to fix this? Thanks! _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Thank you for pointing this out. Actually I tried both
--fcompiler=gnu95 and --fcompiler=gnu flags, but I got the same error
message.
As for the redhat version, I'm using Red Hat Enterprise Linux Server
release 6.3 (Santiago).
On Fri, Jul 6, 2012 at 12:42 AM, Paul Anton Letnes
Hi,
are you sure that you want g77 and not gfortran? If you want gfortran, you should pass the
--fcompiler=gnu95 flag to setup.py.
Which redhat version are you building on? (I don't know red hat well enough to comment, but perhaps someone else do...)
Paul
On 6. juli 2012, at 03:00, Hung-Hsuan Chen wrote:
Dear all,
I've built blas, lapack, and atlas libraries, as shown below.
$ ls ~/lib/atlas/lib/ libatlas.a libcblas.a libf77blas.a liblapack.a libptcblas.a libptf77blas.a
The library location are specified by site.cfg file, as shown below.
[DEFAULT] library_dirs = /home/username/lib/atlas/lib include_dirs = /home/username/lib/atlas/include
[blas] libraries = libf77blas, libcblas, libatlas
[lapack] libraries = liblapack, libf77blas, libcblas, libatlas
I've tried to build numpy (version 1.6.2) by $ python setup.py build --fcompiler=gnu
However, I got the following error message: error: Command "/usr/bin/g77 -g -Wall -g -Wall -shared build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/scipy/integrate/vodemodule.o build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/fortranobject.o -L/home/username/lib/ -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.6 -lodepack -llinpack_lite -lmach -lblas -lpython2.6 -lg2c -o build/lib.linux-x86_64-2.6/scipy/integrate/vode.so" failed with exit status
I've searched internet for possible solutions whole day but don't have any progress so far. Anyone has any idea of how to fix this? Thanks! _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
However, I got the following error message: error: Command "/usr/bin/g77 -g -Wall -g -Wall -shared build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/scipy/integrate/vodemodule.o build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/fortranobject.o -L/home/username/lib/ -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.6 -lodepack -llinpack_lite -lmach -lblas -lpython2.6 -lg2c -o build/lib.linux-x86_64-2.6/scipy/integrate/vode.so" failed with exit status
I'm sure there must have been more output? It does say that the command "failed", but not _why_ it failed. I suggest posting the entire output either in an email, or on a webpage (gist.github.com, for instance) and giving the link. It's very very hard to debug a build without the build log, so I'd suggest always giving it in the first instance. Paul
Link is a great suggestion! I was hesitating about whether or not to
paste such a long output.
The site.cfg file is shown in the following link.
https://gist.github.com/3059209
The output message for
$ python setup.py build --fcompiler=gnu95
can be found at the URL.
https://gist.github.com/3059320
Any suggestion is appreciated.
On Fri, Jul 6, 2012 at 5:21 AM, Paul Anton Letnes
However, I got the following error message: error: Command "/usr/bin/g77 -g -Wall -g -Wall -shared build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/scipy/integrate/vodemodule.o build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/fortranobject.o -L/home/username/lib/ -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.6 -lodepack -llinpack_lite -lmach -lblas -lpython2.6 -lg2c -o build/lib.linux-x86_64-2.6/scipy/integrate/vode.so" failed with exit status
I'm sure there must have been more output? It does say that the command "failed", but not _why_ it failed. I suggest posting the entire output either in an email, or on a webpage (gist.github.com, for instance) and giving the link. It's very very hard to debug a build without the build log, so I'd suggest always giving it in the first instance.
Paul _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
I usually find these problems by searching for "error" in the output, in
your case the complete problem is at the bottom of the log. The relocation
errors you're seeing are happening because the build process is trying to
link in Atlas libraries (located here: /home/hxc249/lib/atlas/lib/) that
were not compiled with -fPIC . Are you building ATLAS from source? If so,
then you follow the instructions to recompile ATLAS with -fPIC enabled
here:
http://math-atlas.sourceforge.net/atlas_install/atlas_install.html#SECTION00...
creating build/temp.linux-x86_64-2.6/numpy/core/blasdot
compile options: '-DATLAS_INFO="\"3.9.83\"" -Inumpy/core/blasdot
-I/home/hxc249/lib/atlas/include -Inumpy/core/include
-Ibuild/src.linux-x86_64-2.6/numpy/core/include/numpy
-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core
-Inumpy/core/src/npymath -Inumpy/core/src/multiarray
-Inumpy/core/src/umath -Inumpy/core/include -I/usr/include/python2.6
-Ibuild/src.linux-x86_64-2.6/numpy/core/src/multiarray
-Ibuild/src.linux-x86_64-2.6/numpy/core/src/umath -c'
gcc: numpy/core/blasdot/_dotblas.c
numpy/core/blasdot/_dotblas.c: In function ‘dotblas_matrixproduct’:
numpy/core/blasdot/_dotblas.c:239: warning: comparison of distinct
pointer types lacks a cast
numpy/core/blasdot/_dotblas.c:257: warning: passing argument 3 of
‘(struct PyObject * (*)(struct PyObject *, struct PyObject *, struct
PyArrayObject *))*(PyArray_API + 2240u)’ from incompatible pointer
type
numpy/core/blasdot/_dotblas.c:257: note: expected ‘struct
PyArrayObject *’ but argument is of type ‘struct PyObject *’
numpy/core/blasdot/_dotblas.c:292: warning: passing argument 3 of
‘(struct PyObject * (*)(struct PyObject *, struct PyObject *, struct
PyArrayObject *))*(PyArray_API + 2240u)’ from incompatible pointer
type
numpy/core/blasdot/_dotblas.c:292: note: expected ‘struct
PyArrayObject *’ but argument is of type ‘struct PyObject *’
gcc -pthread -shared
build/temp.linux-x86_64-2.6/numpy/core/blasdot/_dotblas.o
-L/home/hxc249/lib/atlas/lib -L/usr/lib64
-Lbuild/temp.linux-x86_64-2.6 -lptf77blas -lptcblas -latlas
-lpython2.6 -o build/lib.linux-x86_64-2.6/numpy/core/_dotblas.so
/usr/bin/ld: /home/hxc249/lib/atlas/lib/libptcblas.a(cblas_dptgemm.o):
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
making a shared object; recompile with -fPIC
/home/hxc249/lib/atlas/lib/libptcblas.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
/usr/bin/ld: /home/hxc249/lib/atlas/lib/libptcblas.a(cblas_dptgemm.o):
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
making a shared object; recompile with -fPIC
/home/hxc249/lib/atlas/lib/libptcblas.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: Command "gcc -pthread -shared
build/temp.linux-x86_64-2.6/numpy/core/blasdot/_dotblas.o
-L/home/hxc249/lib/atlas/lib -L/usr/lib64
-Lbuild/temp.linux-x86_64-2.6 -lptf77blas -lptcblas -latlas
-lpython2.6 -o build/lib.linux-x86_64-2.6/numpy/core/_dotblas.so"
failed with exit status 1
On Fri, Jul 6, 2012 at 6:00 AM, Hung-Hsuan Chen
Link is a great suggestion! I was hesitating about whether or not to paste such a long output.
The site.cfg file is shown in the following link. https://gist.github.com/3059209
The output message for $ python setup.py build --fcompiler=gnu95 can be found at the URL. https://gist.github.com/3059320
Any suggestion is appreciated.
On Fri, Jul 6, 2012 at 5:21 AM, Paul Anton Letnes
wrote: However, I got the following error message: error: Command "/usr/bin/g77 -g -Wall -g -Wall -shared
build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/scipy/integrate/vodemodule.o
build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/fortranobject.o -L/home/username/lib/ -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.6 -lodepack -llinpack_lite -lmach -lblas -lpython2.6 -lg2c -o build/lib.linux-x86_64-2.6/scipy/integrate/vode.so" failed with exit status
I'm sure there must have been more output? It does say that the command "failed", but not _why_ it failed. I suggest posting the entire output either in an email, or on a webpage (gist.github.com, for instance) and giving the link. It's very very hard to debug a build without the build log, so I'd suggest always giving it in the first instance.
Paul _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Thank you. This is very helpful!
On Fri, Jul 6, 2012 at 6:23 AM, Aron Ahmadia
I usually find these problems by searching for "error" in the output, in your case the complete problem is at the bottom of the log. The relocation errors you're seeing are happening because the build process is trying to link in Atlas libraries (located here: /home/hxc249/lib/atlas/lib/) that were not compiled with -fPIC . Are you building ATLAS from source? If so, then you follow the instructions to recompile ATLAS with -fPIC enabled here: http://math-atlas.sourceforge.net/atlas_install/atlas_install.html#SECTION00...
creating build/temp.linux-x86_64-2.6/numpy/core/blasdot compile options: '-DATLAS_INFO="\"3.9.83\"" -Inumpy/core/blasdot -I/home/hxc249/lib/atlas/include -Inumpy/core/include -Ibuild/src.linux-x86_64-2.6/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/usr/include/python2.6 -Ibuild/src.linux-x86_64-2.6/numpy/core/src/multiarray -Ibuild/src.linux-x86_64-2.6/numpy/core/src/umath -c' gcc: numpy/core/blasdot/_dotblas.c numpy/core/blasdot/_dotblas.c: In function ‘dotblas_matrixproduct’: numpy/core/blasdot/_dotblas.c:239: warning: comparison of distinct pointer types lacks a cast numpy/core/blasdot/_dotblas.c:257: warning: passing argument 3 of ‘(struct PyObject * (*)(struct PyObject *, struct PyObject *, struct PyArrayObject *))*(PyArray_API + 2240u)’ from incompatible pointer type numpy/core/blasdot/_dotblas.c:257: note: expected ‘struct PyArrayObject *’ but argument is of type ‘struct PyObject *’ numpy/core/blasdot/_dotblas.c:292: warning: passing argument 3 of ‘(struct PyObject * (*)(struct PyObject *, struct PyObject *, struct PyArrayObject *))*(PyArray_API + 2240u)’ from incompatible pointer type numpy/core/blasdot/_dotblas.c:292: note: expected ‘struct PyArrayObject *’ but argument is of type ‘struct PyObject *’ gcc -pthread -shared build/temp.linux-x86_64-2.6/numpy/core/blasdot/_dotblas.o -L/home/hxc249/lib/atlas/lib -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.6 -lptf77blas -lptcblas -latlas -lpython2.6 -o build/lib.linux-x86_64-2.6/numpy/core/_dotblas.so /usr/bin/ld: /home/hxc249/lib/atlas/lib/libptcblas.a(cblas_dptgemm.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /home/hxc249/lib/atlas/lib/libptcblas.a: could not read symbols: Bad value collect2: ld returned 1 exit status /usr/bin/ld: /home/hxc249/lib/atlas/lib/libptcblas.a(cblas_dptgemm.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC /home/hxc249/lib/atlas/lib/libptcblas.a: could not read symbols: Bad value collect2: ld returned 1 exit status error: Command "gcc -pthread -shared build/temp.linux-x86_64-2.6/numpy/core/blasdot/_dotblas.o -L/home/hxc249/lib/atlas/lib -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.6 -lptf77blas -lptcblas -latlas -lpython2.6 -o build/lib.linux-x86_64-2.6/numpy/core/_dotblas.so" failed with exit status 1
On Fri, Jul 6, 2012 at 6:00 AM, Hung-Hsuan Chen
wrote: Link is a great suggestion! I was hesitating about whether or not to paste such a long output.
The site.cfg file is shown in the following link. https://gist.github.com/3059209
The output message for $ python setup.py build --fcompiler=gnu95 can be found at the URL. https://gist.github.com/3059320
Any suggestion is appreciated.
On Fri, Jul 6, 2012 at 5:21 AM, Paul Anton Letnes
wrote: However, I got the following error message: error: Command "/usr/bin/g77 -g -Wall -g -Wall -shared
build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/scipy/integrate/vodemodule.o build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/fortranobject.o -L/home/username/lib/ -L/usr/lib64 -Lbuild/temp.linux-x86_64-2.6 -lodepack -llinpack_lite -lmach -lblas -lpython2.6 -lg2c -o build/lib.linux-x86_64-2.6/scipy/integrate/vode.so" failed with exit status
I'm sure there must have been more output? It does say that the command "failed", but not _why_ it failed. I suggest posting the entire output either in an email, or on a webpage (gist.github.com, for instance) and giving the link. It's very very hard to debug a build without the build log, so I'd suggest always giving it in the first instance.
Paul _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
participants (3)
-
Aron Ahmadia
-
Hung-Hsuan Chen
-
Paul Anton Letnes