Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-06 Thread David M. Cooke
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David Shepherd wrote:
> Hey all,
> 
> We started to try and compile the numpy module on an embedded PowerPC 
> Xilinx board with no luck.  This is one of the errors I get when I try 
> to build the module on-board.  It is due to the fact that the compiler 
> is located in a different location than the original compiler for python 
> (i think).  I made symbolic links to fix the first error.  The second 
> more critical error that I cannot recover from is the "Error: 
> Unrecognized opcode: `fldenv'".  There are many more duplicates of this 
> error, but it occurs when the "umathmodule.c" is being compiled.

Setting CC to your C compiler should work

> I am using Binutils 2.17, GCC 3.4.6, and Python 2.5.  Again, python was 
> compiled with uclibc, not the standard libraries.  We require the FFT 
> module for a project that is due in about a week.  Any help would be 
> appreciated.

> multiple assembler opcode errors when it tries to run the entry build:
> 
> powerpc-linux-gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC 
> -Ibuild/src.linux-ppc-2.5/numpy/core/src -Inumpy/core/include 
> -Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
> -Inumpy/core/include -I/root/python/include/python2.5 -c 
> build/src.linux-ppc-2.5/numpy/core/src/umathmodule.c -o 
> build/temp.linux-ppc-2.5/build/src.linux-ppc-2.5/numpy/core/src/umathmodule.o
> .
> .
> .
> .
> Error: Unrecognized opcode: `fldenv'

The culprit looks like numpy/core/include/numpy/fenv/fenv.h, which is
odd, as I don't see how it would be included -- it's only used for
cygwin. I would think there would be no floating point environment
support included, as the system  is only included when one of
__GLIBC__, __APPLE__, or __MINGW32__ is defined.

See if the attached patch helps.

- --
|>|\/|<
/--\
|David M. Cooke  http://arbutus.physics.mcmaster.ca/dmc/
|[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGFmXYN9ixZKFWjRQRAu23AJ44AslsO5HxqDiVuLjYTzI59Dpt4wCgnBOY
2zEHO9XAQVDVTLtWS7xhWpA=
=Hag4
-END PGP SIGNATURE-
Index: numpy/core/include/numpy/ufuncobject.h
===
--- numpy/core/include/numpy/ufuncobject.h  (revision 3673)
+++ numpy/core/include/numpy/ufuncobject.h  (working copy)
@@ -276,6 +276,13 @@
(void) fpsetsticky(0);  \
}
 
+#elif defined(__UCLIBC__)
+
+#define NO_FLOATING_POINT_SUPPORT
+#define UFUNC_CHECK_STATUS(ret) { \
+ret = 0;  \
+  }
+
 #elif defined(linux) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
 
 #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-06 Thread David Shepherd
Well, I get further into the compile process, but now it fails on 
another gcc compile operations.  This is essentially the same error 
message I was getting before.  It tries to #include , but does 
not find it (it shouldn't be including it anyway, as you said).  This 
time it fails when trying to compile "_capi.c".  Thanks for all your 
help so far!

Dave Shepherd

Here is the error output:

creating build/temp.linux-ppc-2.5/numpy/lib
creating build/temp.linux-ppc-2.5/numpy/lib/src
compile options: '-Inumpy/core/include 
-Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
-Inumpy/core/include -I/usr/local/include/python2.5 -c'
gcc: numpy/lib/src/_compiled_base.c
gcc -pthread -shared 
build/temp.linux-ppc-2.5/numpy/lib/src/_compiled_base.o -o 
build/lib.linux-ppc-2.5/numpy/lib/_compiled_base.so
building 'numpy.numarray._capi' extension
compiling C sources
C compiler: gcc -pthread -fno-strict-aliasing -mhard-float -DNDEBUG -g 
-O3 -Wall -Wstrict-prototypes -fPIC

creating build/temp.linux-ppc-2.5/numpy/numarray
compile options: '-Inumpy/core/include 
-Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
-Inumpy/core/include -I/usr/local/include/python2.5 -c'
gcc: numpy/numarray/_capi.c
numpy/numarray/_capi.c:228:18: fenv.h: No such file or directory
numpy/numarray/_capi.c: In function `int_overflow_error':
numpy/numarray/_capi.c:230: warning: implicit declaration of function 
`feraiseexcept'
numpy/numarray/_capi.c:230: error: `FE_OVERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:230: error: (Each undeclared identifier is 
reported only once
numpy/numarray/_capi.c:230: error: for each function it appears in.)
numpy/numarray/_capi.c: In function `NA_checkFPErrors':
numpy/numarray/_capi.c:2947: warning: implicit declaration of function 
`fetestexcept'
numpy/numarray/_capi.c:2948: error: `FE_DIVBYZERO' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2948: error: `FE_OVERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2948: error: `FE_UNDERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2948: error: `FE_INVALID' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2954: warning: implicit declaration of function 
`feclearexcept'
numpy/numarray/_capi.c:228:18: fenv.h: No such file or directory
numpy/numarray/_capi.c: In function `int_overflow_error':
numpy/numarray/_capi.c:230: warning: implicit declaration of function 
`feraiseexcept'
numpy/numarray/_capi.c:230: error: `FE_OVERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:230: error: (Each undeclared identifier is 
reported only once
numpy/numarray/_capi.c:230: error: for each function it appears in.)
numpy/numarray/_capi.c: In function `NA_checkFPErrors':
numpy/numarray/_capi.c:2947: warning: implicit declaration of function 
`fetestexcept'
numpy/numarray/_capi.c:2948: error: `FE_DIVBYZERO' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2948: error: `FE_OVERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2948: error: `FE_UNDERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2948: error: `FE_INVALID' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2954: warning: implicit declaration of function 
`feclearexcept'
error: Command "gcc -pthread -fno-strict-aliasing -mhard-float -DNDEBUG 
-g -O3 -Wall -Wstrict-prototypes -fPIC -Inumpy/core/include 
-Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
-Inumpy/core/include -I/usr/local/include/python2.5 -c 
numpy/numarray/_capi.c -o 
build/temp.linux-ppc-2.5/numpy/numarray/_capi.o" failed with exit status 1
#

David M. Cooke wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> David Shepherd wrote:
>> Hey all,
>>
>> We started to try and compile the numpy module on an embedded PowerPC 
>> Xilinx board with no luck.  This is one of the errors I get when I try 
>> to build the module on-board.  It is due to the fact that the compiler 
>> is located in a different location than the original compiler for python 
>> (i think).  I made symbolic links to fix the first error.  The second 
>> more critical error that I cannot recover from is the "Error: 
>> Unrecognized opcode: `fldenv'".  There are many more duplicates of this 
>> error, but it occurs when the "umathmodule.c" is being compiled.
> 
> Setting CC to your C compiler should work
> 
>> I am using Binutils 2.17, GCC 3.4.6, and Python 2.5.  Again, python was 
>> compiled with uclibc, not the standard libraries.  We require the FFT 
>> module for a project that is due in about a week.  Any help would be 
>> appreciated.
> 
>> multiple assembler opcode errors when it tries to run the entry build:
>>
>> powerpc-linux-gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC 
>> -Ibuild/src.linux-ppc-2.5/numpy/core/src -Inumpy/core/include 
>> -Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
>> -Inumpy/core/include -I/root/python/include/python2.5 -c 
>> build/src.li

Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-06 Thread David Shepherd
You know, looking at the core it looks like it has something to do with 
the "define(linux)" statement.  I am running linux, but its a buildroot 
(uclibc) rootfs.  Let me know if you need anymore information.  Thanks.

Dave

David Shepherd wrote:
> Well, I get further into the compile process, but now it fails on 
> another gcc compile operations.  This is essentially the same error 
> message I was getting before.  It tries to #include , but does 
> not find it (it shouldn't be including it anyway, as you said).  This 
> time it fails when trying to compile "_capi.c".  Thanks for all your 
> help so far!
> 
> Dave Shepherd
> 
> Here is the error output:
> 
> creating build/temp.linux-ppc-2.5/numpy/lib
> creating build/temp.linux-ppc-2.5/numpy/lib/src
> compile options: '-Inumpy/core/include 
> -Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
> -Inumpy/core/include -I/usr/local/include/python2.5 -c'
> gcc: numpy/lib/src/_compiled_base.c
> gcc -pthread -shared 
> build/temp.linux-ppc-2.5/numpy/lib/src/_compiled_base.o -o 
> build/lib.linux-ppc-2.5/numpy/lib/_compiled_base.so
> building 'numpy.numarray._capi' extension
> compiling C sources
> C compiler: gcc -pthread -fno-strict-aliasing -mhard-float -DNDEBUG -g 
> -O3 -Wall -Wstrict-prototypes -fPIC
> 
> creating build/temp.linux-ppc-2.5/numpy/numarray
> compile options: '-Inumpy/core/include 
> -Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
> -Inumpy/core/include -I/usr/local/include/python2.5 -c'
> gcc: numpy/numarray/_capi.c
> numpy/numarray/_capi.c:228:18: fenv.h: No such file or directory
> numpy/numarray/_capi.c: In function `int_overflow_error':
> numpy/numarray/_capi.c:230: warning: implicit declaration of function 
> `feraiseexcept'
> numpy/numarray/_capi.c:230: error: `FE_OVERFLOW' undeclared (first use 
> in this function)
> numpy/numarray/_capi.c:230: error: (Each undeclared identifier is 
> reported only once
> numpy/numarray/_capi.c:230: error: for each function it appears in.)
> numpy/numarray/_capi.c: In function `NA_checkFPErrors':
> numpy/numarray/_capi.c:2947: warning: implicit declaration of function 
> `fetestexcept'
> numpy/numarray/_capi.c:2948: error: `FE_DIVBYZERO' undeclared (first use 
> in this function)
> numpy/numarray/_capi.c:2948: error: `FE_OVERFLOW' undeclared (first use 
> in this function)
> numpy/numarray/_capi.c:2948: error: `FE_UNDERFLOW' undeclared (first use 
> in this function)
> numpy/numarray/_capi.c:2948: error: `FE_INVALID' undeclared (first use 
> in this function)
> numpy/numarray/_capi.c:2954: warning: implicit declaration of function 
> `feclearexcept'
> numpy/numarray/_capi.c:228:18: fenv.h: No such file or directory
> numpy/numarray/_capi.c: In function `int_overflow_error':
> numpy/numarray/_capi.c:230: warning: implicit declaration of function 
> `feraiseexcept'
> numpy/numarray/_capi.c:230: error: `FE_OVERFLOW' undeclared (first use 
> in this function)
> numpy/numarray/_capi.c:230: error: (Each undeclared identifier is 
> reported only once
> numpy/numarray/_capi.c:230: error: for each function it appears in.)
> numpy/numarray/_capi.c: In function `NA_checkFPErrors':
> numpy/numarray/_capi.c:2947: warning: implicit declaration of function 
> `fetestexcept'
> numpy/numarray/_capi.c:2948: error: `FE_DIVBYZERO' undeclared (first use 
> in this function)
> numpy/numarray/_capi.c:2948: error: `FE_OVERFLOW' undeclared (first use 
> in this function)
> numpy/numarray/_capi.c:2948: error: `FE_UNDERFLOW' undeclared (first use 
> in this function)
> numpy/numarray/_capi.c:2948: error: `FE_INVALID' undeclared (first use 
> in this function)
> numpy/numarray/_capi.c:2954: warning: implicit declaration of function 
> `feclearexcept'
> error: Command "gcc -pthread -fno-strict-aliasing -mhard-float -DNDEBUG 
> -g -O3 -Wall -Wstrict-prototypes -fPIC -Inumpy/core/include 
> -Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
> -Inumpy/core/include -I/usr/local/include/python2.5 -c 
> numpy/numarray/_capi.c -o 
> build/temp.linux-ppc-2.5/numpy/numarray/_capi.o" failed with exit status 1
> #
> 
> David M. Cooke wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> David Shepherd wrote:
>>> Hey all,
>>>
>>> We started to try and compile the numpy module on an embedded PowerPC 
>>> Xilinx board with no luck.  This is one of the errors I get when I try 
>>> to build the module on-board.  It is due to the fact that the compiler 
>>> is located in a different location than the original compiler for python 
>>> (i think).  I made symbolic links to fix the first error.  The second 
>>> more critical error that I cannot recover from is the "Error: 
>>> Unrecognized opcode: `fldenv'".  There are many more duplicates of this 
>>> error, but it occurs when the "umathmodule.c" is being compiled.
>> Setting CC to your C compiler should work
>>
>>> I am using Binutils 2.17, GCC 3.4.6, and Python 2.5.  Again, python was 
>>> compiled with uclibc, not the standard libraries.  We require the FFT 
>>> module fo

Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-06 Thread David M. Cooke
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David Shepherd wrote:
> You know, looking at the core it looks like it has something to do with 
> the "define(linux)" statement.  I am running linux, but its a buildroot 
> (uclibc) rootfs.  Let me know if you need anymore information.  Thanks.
> 
> Dave
> 
> David Shepherd wrote:
>> Well, I get further into the compile process, but now it fails on 
>> another gcc compile operations.  This is essentially the same error 
>> message I was getting before.  It tries to #include , but does 
>> not find it (it shouldn't be including it anyway, as you said).  This 
>> time it fails when trying to compile "_capi.c".  Thanks for all your 
>> help so far!

Try this updated patch. It replaces the defined(linux) tests with
defined(__GLIBC__).

- --
|>|\/|<
/--\
|David M. Cooke  http://arbutus.physics.mcmaster.ca/dmc/
|[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGFo8PN9ixZKFWjRQRAsFRAJwKK4pOaxxTUCR71vF3P7R+QMY2dACgsnsY
4xssXvgP96hfEbiOvdSFUUM=
=AT85
-END PGP SIGNATURE-
Index: numpy/core/include/numpy/ufuncobject.h
===
--- numpy/core/include/numpy/ufuncobject.h  (revision 3673)
+++ numpy/core/include/numpy/ufuncobject.h  (working copy)
@@ -276,7 +276,7 @@
(void) fpsetsticky(0);  \
}
 
-#elif defined(linux) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
+#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
 
 #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
 #include 
Index: numpy/numarray/_capi.c
===
--- numpy/numarray/_capi.c  (revision 3673)
+++ numpy/numarray/_capi.c  (working copy)
@@ -224,7 +224,7 @@
 }
 
 /* Likewise for Integer overflows */
-#if defined(linux) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
+#if defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
 #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
 #include 
 #elif defined(__CYGWIN__)
@@ -2937,7 +2937,7 @@
return retstatus;
 }
 
-#elif defined(linux) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
+#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
 #if defined(__GLIBC__) || defined(darwin) || defined(__MINGW32__)
 #include 
 #elif defined(__CYGWIN__)
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-06 Thread David Shepherd

The second part of the patch is failing:

# patch -p0 < ../uclibc-fenv.patch
patching file numpy/core/include/numpy/ufuncobject.h
patching file numpy/numarray/_capi.c
Hunk #1 FAILED at 224.
Hunk #2 FAILED at 2937.
2 out of 2 hunks FAILED -- saving rejects to file numpy/numarray/_capi.c.rej
#

I attached the .rej file.


-Dave


David M. Cooke wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David Shepherd wrote:
You know, looking at the core it looks like it has something to do with 
the "define(linux)" statement.  I am running linux, but its a buildroot 
(uclibc) rootfs.  Let me know if you need anymore information.  Thanks.


Dave

David Shepherd wrote:
Well, I get further into the compile process, but now it fails on 
another gcc compile operations.  This is essentially the same error 
message I was getting before.  It tries to #include , but does 
not find it (it shouldn't be including it anyway, as you said).  This 
time it fails when trying to compile "_capi.c".  Thanks for all your 
help so far!


Try this updated patch. It replaces the defined(linux) tests with
defined(__GLIBC__).

- --
|>|\/|<
/--\
|David M. Cooke  http://arbutus.physics.mcmaster.ca/dmc/
|[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGFo8PN9ixZKFWjRQRAsFRAJwKK4pOaxxTUCR71vF3P7R+QMY2dACgsnsY
4xssXvgP96hfEbiOvdSFUUM=
=AT85
-END PGP SIGNATURE-




Index: numpy/core/include/numpy/ufuncobject.h
===
--- numpy/core/include/numpy/ufuncobject.h  (revision 3673)
+++ numpy/core/include/numpy/ufuncobject.h  (working copy)
@@ -276,7 +276,7 @@
(void) fpsetsticky(0);  \
}
 
-#elif defined(linux) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__)

+#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
 
 #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)

 #include 
Index: numpy/numarray/_capi.c
===
--- numpy/numarray/_capi.c  (revision 3673)
+++ numpy/numarray/_capi.c  (working copy)
@@ -224,7 +224,7 @@
 }
 
 /* Likewise for Integer overflows */

-#if defined(linux) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
+#if defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
 #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
 #include 
 #elif defined(__CYGWIN__)
@@ -2937,7 +2937,7 @@
return retstatus;
 }
 
-#elif defined(linux) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__)

+#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
 #if defined(__GLIBC__) || defined(darwin) || defined(__MINGW32__)
 #include 
 #elif defined(__CYGWIN__)




___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
***
*** 224,230 
  }
  
  /* Likewise for Integer overflows */
- #if defined(linux) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
  #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
  #include 
  #elif defined(__CYGWIN__)
--- 224,230 
  }
  
  /* Likewise for Integer overflows */
+ #if defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
  #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
  #include 
  #elif defined(__CYGWIN__)
***
*** 2937,2943 
return retstatus;
  }
  
- #elif defined(linux) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
  #if defined(__GLIBC__) || defined(darwin) || defined(__MINGW32__)
  #include 
  #elif defined(__CYGWIN__)
--- 2937,2943 
return retstatus;
  }
  
+ #elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || 
defined(__MINGW32__)
  #if defined(__GLIBC__) || defined(darwin) || defined(__MINGW32__)
  #include 
  #elif defined(__CYGWIN__)
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-06 Thread David M. Cooke
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David Shepherd wrote:
> The second part of the patch is failing:
> 
> # patch -p0 < ../uclibc-fenv.patch
> patching file numpy/core/include/numpy/ufuncobject.h
> patching file numpy/numarray/_capi.c
> Hunk #1 FAILED at 224.
> Hunk #2 FAILED at 2937.
> 2 out of 2 hunks FAILED -- saving rejects to file
> numpy/numarray/_capi.c.rej
> #

Ahh, you're not using a current subversion checkout :-) For your
purposes, you could just change the #if defined(linux) to #if
defined(__GLIBC__) (or #if 0 if that strikes your fancy).

- --
|>|\/|<
/--\
|David M. Cooke  http://arbutus.physics.mcmaster.ca/dmc/
|[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGFpvoN9ixZKFWjRQRAuAeAJ4xaAxUUz828DeMRUd5vYPl0K6TfACgsSq7
2lvovjwFjEDECCJHKeQwhTQ=
=OGOK
-END PGP SIGNATURE-
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-06 Thread David Shepherd
Okay, I manually changed defined(linux) to defined(__GLIBC__).  I still 
get the same error with "_capi.c".  It keeps trying to #include 
.  Any other things I can change to try to prevent the problem?

Thanks,
David

-Dave

Error output:

creating build/temp.linux-ppc-2.5/numpy/lib
creating build/temp.linux-ppc-2.5/numpy/lib/src
compile options: '-Inumpy/core/include 
-Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
-Inumpy/core/include -I/usr/local/include/python2.5 -c'
gcc: numpy/lib/src/_compiled_base.c
gcc -pthread -shared 
build/temp.linux-ppc-2.5/numpy/lib/src/_compiled_base.o -o 
build/lib.linux-ppc-2.5/numpy/lib/_compiled_base.so
building 'numpy.numarray._capi' extension
compiling C sources
C compiler: gcc -pthread -fno-strict-aliasing -mhard-float -DNDEBUG -g 
-O3 -Wall -Wstrict-prototypes -fPIC

creating build/temp.linux-ppc-2.5/numpy/numarray
compile options: '-Inumpy/core/include 
-Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
-Inumpy/core/include -I/usr/local/include/python2.5 -c'
gcc: numpy/numarray/_capi.c
numpy/numarray/_capi.c:229:18: fenv.h: No such file or directory
numpy/numarray/_capi.c: In function `int_overflow_error':
numpy/numarray/_capi.c:234: warning: implicit declaration of function 
`feraiseexcept'
numpy/numarray/_capi.c:234: error: `FE_OVERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:234: error: (Each undeclared identifier is 
reported only once
numpy/numarray/_capi.c:234: error: for each function it appears in.)
numpy/numarray/_capi.c: In function `NA_checkFPErrors':
numpy/numarray/_capi.c:2951: warning: implicit declaration of function 
`fetestexcept'
numpy/numarray/_capi.c:2952: error: `FE_DIVBYZERO' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2952: error: `FE_OVERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2952: error: `FE_UNDERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2952: error: `FE_INVALID' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2958: warning: implicit declaration of function 
`feclearexcept'
numpy/numarray/_capi.c:229:18: fenv.h: No such file or directory
numpy/numarray/_capi.c: In function `int_overflow_error':
numpy/numarray/_capi.c:234: warning: implicit declaration of function 
`feraiseexcept'
numpy/numarray/_capi.c:234: error: `FE_OVERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:234: error: (Each undeclared identifier is 
reported only once
numpy/numarray/_capi.c:234: error: for each function it appears in.)
numpy/numarray/_capi.c: In function `NA_checkFPErrors':
numpy/numarray/_capi.c:2951: warning: implicit declaration of function 
`fetestexcept'
numpy/numarray/_capi.c:2952: error: `FE_DIVBYZERO' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2952: error: `FE_OVERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2952: error: `FE_UNDERFLOW' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2952: error: `FE_INVALID' undeclared (first use 
in this function)
numpy/numarray/_capi.c:2958: warning: implicit declaration of function 
`feclearexcept'
error: Command "gcc -pthread -fno-strict-aliasing -mhard-float -DNDEBUG 
-g -O3 -Wall -Wstrict-prototypes -fPIC -Inumpy/core/include 
-Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src 
-Inumpy/core/include -I/usr/local/include/python2.5 -c 
numpy/numarray/_capi.c -o build/temp.linux-ppc-2.5/numpy/numarray/_capi.

David M. Cooke wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> David Shepherd wrote:
>> The second part of the patch is failing:
>>
>> # patch -p0 < ../uclibc-fenv.patch
>> patching file numpy/core/include/numpy/ufuncobject.h
>> patching file numpy/numarray/_capi.c
>> Hunk #1 FAILED at 224.
>> Hunk #2 FAILED at 2937.
>> 2 out of 2 hunks FAILED -- saving rejects to file
>> numpy/numarray/_capi.c.rej
>> #
> 
> Ahh, you're not using a current subversion checkout :-) For your
> purposes, you could just change the #if defined(linux) to #if
> defined(__GLIBC__) (or #if 0 if that strikes your fancy).
> 
> - --
> |>|\/|<
> /--\
> |David M. Cooke  http://arbutus.physics.mcmaster.ca/dmc/
> |[EMAIL PROTECTED]
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.6 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFGFpvoN9ixZKFWjRQRAuAeAJ4xaAxUUz828DeMRUd5vYPl0K6TfACgsSq7
> 2lvovjwFjEDECCJHKeQwhTQ=
> =OGOK
> -END PGP SIGNATURE-
> ___
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
> 
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-09 Thread David Shepherd
My message may have gotten lost over the weekend, but I wanted to see if 
anyone had anything else I can try to fix the problem.  We have to demo 
this project for a ECE project on Thursday and I was hoping to get the 
FFT working.

 Original Message 
Subject: Re: [Numpy-discussion] Numpy with uclibc compiled python
Date: Fri, 06 Apr 2007 16:02:51 -0400
From: David Shepherd <[EMAIL PROTECTED]>
To: Discussion of Numerical Python 
References: <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

Okay, I manually changed defined(linux) to defined(__GLIBC__).  I still
get the same error with "_capi.c".  It keeps trying to #include
.  Any other things I can change to try to prevent the problem?

Thanks,
David

-Dave

Error output:

creating build/temp.linux-ppc-2.5/numpy/lib
creating build/temp.linux-ppc-2.5/numpy/lib/src
compile options: '-Inumpy/core/include
-Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src
-Inumpy/core/include -I/usr/local/include/python2.5 -c'
gcc: numpy/lib/src/_compiled_base.c
gcc -pthread -shared
build/temp.linux-ppc-2.5/numpy/lib/src/_compiled_base.o -o
build/lib.linux-ppc-2.5/numpy/lib/_compiled_base.so
building 'numpy.numarray._capi' extension
compiling C sources
C compiler: gcc -pthread -fno-strict-aliasing -mhard-float -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -fPIC

creating build/temp.linux-ppc-2.5/numpy/numarray
compile options: '-Inumpy/core/include
-Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src
-Inumpy/core/include -I/usr/local/include/python2.5 -c'
gcc: numpy/numarray/_capi.c
numpy/numarray/_capi.c:229:18: fenv.h: No such file or directory
numpy/numarray/_capi.c: In function `int_overflow_error':
numpy/numarray/_capi.c:234: warning: implicit declaration of function
`feraiseexcept'
numpy/numarray/_capi.c:234: error: `FE_OVERFLOW' undeclared (first use
in this function)
numpy/numarray/_capi.c:234: error: (Each undeclared identifier is
reported only once
numpy/numarray/_capi.c:234: error: for each function it appears in.)
numpy/numarray/_capi.c: In function `NA_checkFPErrors':
numpy/numarray/_capi.c:2951: warning: implicit declaration of function
`fetestexcept'
numpy/numarray/_capi.c:2952: error: `FE_DIVBYZERO' undeclared (first use
in this function)
numpy/numarray/_capi.c:2952: error: `FE_OVERFLOW' undeclared (first use
in this function)
numpy/numarray/_capi.c:2952: error: `FE_UNDERFLOW' undeclared (first use
in this function)
numpy/numarray/_capi.c:2952: error: `FE_INVALID' undeclared (first use
in this function)
numpy/numarray/_capi.c:2958: warning: implicit declaration of function
`feclearexcept'
numpy/numarray/_capi.c:229:18: fenv.h: No such file or directory
numpy/numarray/_capi.c: In function `int_overflow_error':
numpy/numarray/_capi.c:234: warning: implicit declaration of function
`feraiseexcept'
numpy/numarray/_capi.c:234: error: `FE_OVERFLOW' undeclared (first use
in this function)
numpy/numarray/_capi.c:234: error: (Each undeclared identifier is
reported only once
numpy/numarray/_capi.c:234: error: for each function it appears in.)
numpy/numarray/_capi.c: In function `NA_checkFPErrors':
numpy/numarray/_capi.c:2951: warning: implicit declaration of function
`fetestexcept'
numpy/numarray/_capi.c:2952: error: `FE_DIVBYZERO' undeclared (first use
in this function)
numpy/numarray/_capi.c:2952: error: `FE_OVERFLOW' undeclared (first use
in this function)
numpy/numarray/_capi.c:2952: error: `FE_UNDERFLOW' undeclared (first use
in this function)
numpy/numarray/_capi.c:2952: error: `FE_INVALID' undeclared (first use
in this function)
numpy/numarray/_capi.c:2958: warning: implicit declaration of function
`feclearexcept'
error: Command "gcc -pthread -fno-strict-aliasing -mhard-float -DNDEBUG
-g -O3 -Wall -Wstrict-prototypes -fPIC -Inumpy/core/include
-Ibuild/src.linux-ppc-2.5/numpy/core -Inumpy/core/src
-Inumpy/core/include -I/usr/local/include/python2.5 -c
numpy/numarray/_capi.c -o build/temp.linux-ppc-2.5/numpy/numarray/_capi.

David M. Cooke wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> David Shepherd wrote:
>> The second part of the patch is failing:
>>
>> # patch -p0 < ../uclibc-fenv.patch
>> patching file numpy/core/include/numpy/ufuncobject.h
>> patching file numpy/numarray/_capi.c
>> Hunk #1 FAILED at 224.
>> Hunk #2 FAILED at 2937.
>> 2 out of 2 hunks FAILED -- saving rejects to file
>> numpy/numarray/_capi.c.rej
>> #
> 
> Ahh, you're not using a current subversion checkout :-) For your
> purposes, you could just change the #if defined(linux) to #if
> defined(__GLIBC__) (or #if 0 if that strikes your fancy).
> 
> - --
> |>|

Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-09 Thread Travis Oliphant
David Shepherd wrote:
> My message may have gotten lost over the weekend, but I wanted to see if 
> anyone had anything else I can try to fix the problem.  We have to demo 
> this project for a ECE project on Thursday and I was hoping to get the 
> FFT working.
>
>   

Ideally, you can help us get this working right on your hardware. 

But, in a pinch, you can just comment out the line in numpy/setup.py 
that states:

config.add_subpackage('numarray')

Do you need the numarray package?

-Travis

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-09 Thread Travis Oliphant
David Shepherd wrote:
> My message may have gotten lost over the weekend, but I wanted to see if 
> anyone had anything else I can try to fix the problem.  We have to demo 
> this project for a ECE project on Thursday and I was hoping to get the 
> FFT working.
>   

I know nothing about ulibc.   Do you have any of the floating-point 
routines that this section of code is trying to get?

It looks like you on your platform we probably shouldn't even be trying 
to include fenv.h at all. I would replace the entire line  (#227)  to

#if 0

so that the "default" section of code gets included.  Do this for every 
case where fenv.h is trying to be included.

-Travis

___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-09 Thread David Shepherd
Well, we only need to do an FFT.  So I will try all your suggestions 
tonight and let you know of the results.  Thanks for your help!

-Dave

Travis Oliphant wrote:
> David Shepherd wrote:
>> My message may have gotten lost over the weekend, but I wanted to see if 
>> anyone had anything else I can try to fix the problem.  We have to demo 
>> this project for a ECE project on Thursday and I was hoping to get the 
>> FFT working.
>>
>>   
> 
> Ideally, you can help us get this working right on your hardware. 
> 
> But, in a pinch, you can just comment out the line in numpy/setup.py 
> that states:
> 
> config.add_subpackage('numarray')
> 
> Do you need the numarray package?
> 
> -Travis
> 
> ___
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
> 
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Numpy with uclibc compiled python

2007-04-09 Thread David Shepherd
The default section of the code compiled just fine and the FFT is 
working great.  Thanks so much for your help!

-Dave

Travis Oliphant wrote:
> David Shepherd wrote:
>> My message may have gotten lost over the weekend, but I wanted to see if 
>> anyone had anything else I can try to fix the problem.  We have to demo 
>> this project for a ECE project on Thursday and I was hoping to get the 
>> FFT working.
>>   
> 
> I know nothing about ulibc.   Do you have any of the floating-point 
> routines that this section of code is trying to get?
> 
> It looks like you on your platform we probably shouldn't even be trying 
> to include fenv.h at all. I would replace the entire line  (#227)  to
> 
> #if 0
> 
> so that the "default" section of code gets included.  Do this for every 
> case where fenv.h is trying to be included.
> 
> -Travis
> 
> ___
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
> 
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion