[Numpy-discussion] Failure to build numpy 1.6.1

2011-11-08 Thread Mads Ipsen

Hi,

I am trying to build numpy-1.6.1 with the following gcc compiler specs:

Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--disable-checking --with-system-zlib --enable-__cxa_atexit 
--disable-libunwind-exceptions --enable-java-awt=gtk 
--host=x86_64-redhat-linux

Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)

I get the following error (any clues at what goes wrong)?

creating build/temp.linux-x86_64-2.7/numpy/core/src/multiarray
compile options: '-Inumpy/core/include 
-Ibuild/src.linux-x86_64-2.7/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/home/quantum/quantumnotes/qw-control/quantumsource/external-libs/build/include/python2.7 

-Ibuild/src.linux-x86_64-2.7/numpy/core/src/multiarray 
-Ibuild/src.linux-x86_64-2.7/numpy/core/src/umath -c'

gcc: numpy/core/src/multiarray/multiarraymodule_onefile.c
numpy/core/src/multiarray/descriptor.c: In function 
`_convert_divisor_to_multiple':
numpy/core/src/multiarray/descriptor.c:606: warning: 'q' might be used 
uninitialized in this function
numpy/core/src/multiarray/einsum.c.src: In function 
`float_sum_of_products_contig_outstride0_one':

numpy/core/src/multiarray/einsum.c.src:852: error: unrecognizable insn:
(insn:HI 440 228 481 14 
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/include/xmmintrin.h:915 (set 
(reg:SF 148)

(vec_select:SF (reg/v:V4SF 67 [ accum_sse ])
(parallel [
(const_int 0 [0x0])
]))) -1 (insn_list 213 (nil))
(nil))
numpy/core/src/multiarray/einsum.c.src:852: internal compiler error: in 
extract_insn, at recog.c:2083

Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://bugzilla.redhat.com/bugzilla for instructions.
Preprocessed source stored into /tmp/ccXaPpf8.out file, please attach 
this to your bugreport.
numpy/core/src/multiarray/descriptor.c: In function 
`_convert_divisor_to_multiple':
numpy/core/src/multiarray/descriptor.c:606: warning: 'q' might be used 
uninitialized in this function
numpy/core/src/multiarray/einsum.c.src: In function 
`float_sum_of_products_contig_outstride0_one':

numpy/core/src/multiarray/einsum.c.src:852: error: unrecognizable insn:
(insn:HI 440 228 481 14 
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/include/xmmintrin.h:915 (set 
(reg:SF 148)

(vec_select:SF (reg/v:V4SF 67 [ accum_sse ])
(parallel [
(const_int 0 [0x0])
]))) -1 (insn_list 213 (nil))
(nil))
numpy/core/src/multiarray/einsum.c.src:852: internal compiler error: in 
extract_insn, at recog.c:2083

Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://bugzilla.redhat.com/bugzilla for instructions.
Preprocessed source stored into /tmp/ccXaPpf8.out file, please attach 
this to your bugreport.
error: Command gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 
-Wall -Wstrict-prototypes -fPIC -Inumpy/core/include
-Ibuild/src.linux-x86_64-2.7/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/home/quantum/quantumnotes/qw-control/quantumsource/external-libs/build/include/python2.7 

-Ibuild/src.linux-x86_64-2.7/numpy/core/src/multiarray 
-Ibuild/src.linux-x86_64-2.7/numpy/core/src/umath -c

numpy/core/src/multiarray/multiarraymodule_onefile.c -o
build/temp.linux-x86_64-2.7/numpy/core/src/multiarray/multiarraymodule_onefile.o 
failed with exit status 1


make: *** 
[/home/quantum/quantumnotes/qw-control/quantumsource/external-libs/src/numpy-1.6.1/make-stamp] 
Error 1


--
+-+
| Mads Ipsen  |
+--+--+
| Gåsebæksvej 7, 4. tv |  |
| DK-2500 Valby| phone:  +45-29716388 |
| Denmark  | email:  mads.ip...@gmail.com |
+--+--+


___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Failure to build numpy 1.6.1

2011-11-08 Thread David Cournapeau
On Tue, Nov 8, 2011 at 9:01 AM, David Cournapeau courn...@gmail.com wrote:
 Hi Mads,

 On Tue, Nov 8, 2011 at 8:40 AM, Mads Ipsen madsip...@gmail.com wrote:
 Hi,

 I am trying to build numpy-1.6.1 with the following gcc compiler specs:

 Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
 Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
 --infodir=/usr/share/info --enable-shared --enable-threads=posix
 --disable-checking --with-system-zlib --enable-__cxa_atexit
 --disable-libunwind-exceptions --enable-java-awt=gtk
 --host=x86_64-redhat-linux
 Thread model: posix
 gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)

 I get the following error (any clues at what goes wrong)?

 This looks like a compiler bug (gcc 3.4 is really old). einsum uses
 SSE intrinsics, and old gcc implementations are quite buggy in that
 area.

 Could you try the following, at line 38, to add the following:

 #define EINSUM_USE_SSE1 0
 #define EINSUM_USE_SSE2 0

I meant to add this in the file
numpy/core/src/multiarray/einsum.c.src, and then rebuild numpy

David
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Failure to build numpy 1.6.1

2011-11-08 Thread David Cournapeau
On Tue, Nov 8, 2011 at 9:20 AM, Mads Ipsen madsip...@gmail.com wrote:

 Yup, that fixes it. For now, we can apply a temporary fix on our build
 system. Is this something that'll go into, say, 1.6.2?

That's more of a workaround than a fix. We need to decide whether we
disable intrinsics altogether or wether we want to drop support for
old compilers.

cheers,

David
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Cross-Compiling Numpy for NAO

2011-11-08 Thread Chris.Barker
On 11/7/11 10:16 AM, Carlos Neves wrote:
 I am a robotics student and I have used numpy to develop a controller
 for a humanoid robot. Now I am trying to implement the same controller
 to a different robot, NAO - http://www.aldebaran-robotics.com/
 This robot has a Linux based OS with Python 2.6.4. Since the goal is to
 implement the controller with the least changes possible and make sure
 the robot remains autonomous, it would be great to install numpy in it.
 The problem is that it is not possible to build numpy in the system and
 I was adviced to use the cross-compilation toolchain provided by
 Aldebaran. However, all their tutorials assume I can build the libraries
 I need with cmake, which isn't the case.

Over on the cython-users list, I'm pretty sure someone recently 
contributed a cmake-based build for cython code -- maybe it could be 
leveraged for numpy?

http://groups.google.com/group/cython-users/browse_thread/thread/c2aa7da05ae8df66

-Chris





 So, is it possible to cross-compile numpy, given a cross-toolchain, with
 not much effort? The other option is to use openCV, which comes with the
 NAO OS, but it require quite a few changes in the program... I tried
 searching the archives, but was unable to find any relevant post.

 I hope you can help me!
 Thank you,
 Carlos Neves


 ___
 NumPy-Discussion mailing list
 NumPy-Discussion@scipy.org
 http://mail.scipy.org/mailman/listinfo/numpy-discussion


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion