[Numpy-discussion] Re: Cygwin compilation

Todd Miller jmiller at stsci.edu
Tue Sep 30 04:31:03 CDT 2003


On Tue, 2003-09-30 at 04:44, Jochen Küpper wrote:

> Should work, but I get the following strange behavior:
> ,----
> | > python setup.py build
> | Using EXTRA_COMPILE_ARGS = []
> | running build
> | running build_py
> | copying Lib/numinclude.py -> build/lib.cygwin-1.5.5-i686-2.3/numarray
> | running build_ext
> | building 'numarray._ufunc' extension
> | gcc -shared -Wl,--enable-auto-image-base -march=pentium3 -mcpu=pentium4 -O2 -Wall -pipe build/temp.cygwin-1.5.5-i686-2.3/Src/_ufuncmodule.o -L/usr/lib/python2.3/config -lpython2.3 -o build/lib.cygwin-1.5.5-i686-2.3/numarray/_ufunc.dll -L/lib/mingw -lmingwex
> | build/temp.cygwin-1.5.5-i686-2.3/Src/_ufuncmodule.o(.text+0x14f): In function `_CheckFPErrors':
> | /home/software/programming/numeric/numarray/Src/_ufuncmodule.c:136: undefined reference to `_fetestexcept'
> | build/temp.cygwin-1.5.5-i686-2.3/Src/_ufuncmodule.o(.text+0x17b):/home/software/programming/numeric/numarray/Src/_ufuncmodule.c:142: undefined reference to `_feclearexcept'
> | collect2: ld returned 1 exit status
> | error: command 'gcc' failed with exit status 1
> | 
> | > gcc -shared -Wl,--enable-auto-image-base -march=pentium3 -mcpu=pentium4 -O2 -Wall -pipe build/temp.cygwin-1.5.5-i686-2.3/Src/_ufuncmodule.o -L/usr/lib/python2.3/config -lpython2.3 -o build/lib.cygwin-1.5.5-i686-2.3/numarray/_ufunc.dll -L/lib/mingw -lmingwex
> `----
> 
> That is, it does not work when called from setup.py. When I just copy
> 'n' paste the link statement to the command-line, it just works.(#$%)
> 
> Any ideas??

You could try replacing gcc in order to dump the environment or perhaps
add a switch to run gcc in a more verbose mode and see if any
differences pop up.  distutils-sig?

Have you checked the #ifdef clause in _CheckFPErrors in _ufuncmodule.c
for cygwin/mingw?  Apparently I added it, and I wasn't sure if it was
valid to compile for cygwin and link against mingw.

One other thing:  HAS_UINT64 should work.

Regards,
Todd
 
-- 
Todd Miller 			jmiller at stsci.edu
STSCI / ESS / SSB





More information about the Numpy-discussion mailing list