[Numpy-discussion] Numpy with uclibc compiled python

David M. Cooke cookedm@physics.mcmaster...
Fri Apr 6 10:23:04 CDT 2007

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 <fenv.h> 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/
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uclibc-fenv.patch
Url: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070406/df1e531f/attachment.pl 

More information about the Numpy-discussion mailing list