[Numpy-discussion] Unable to build numpy in cygwin

Travis Oliphant oliphant at ee.byu.edu
Wed Jan 24 16:57:55 EST 2007


Crider, Joseph A wrote:

>I am still clueless as to why numpy.numarray will not build for numpy
>1.0 and later.  As I am currently not using much from either numpy or
>scipy, but do want to be able to use some of the 1.0 features
>(especially the order keyword for sort on record arrays), I've decided
>to disable most of the subpackages of scipy that I'm not using right now
>and disable oldnumeric and numarray in numpy.  That has made it possible
>to build in cygwin and may be sufficient for my needs for now, but I
>would still like to resolve this problem, as I hope to use more of numpy
>and scipy in the future.
>  
>

It looks like the issue is in the platform-dependent code for checking 
the exception flag.  The problem is that this code should be included in 
the distribution on CYGWIN.  The numpy/core/include/numpy/fenv/ 
directory contains implementations of all of the "undefined reference" 
routines (without the preceeding underscore).    Can you tell if this 
code is getting compiled during compilation on your platform?   Some 
configuration issue is causing the code to not be available.

In the short term, if you don't need numarray C-API compatibility, then 
just disable that package.  It looks like the problematic functions are 
fetestexcept and feclearexcept.   Are there any other errors given 
previously that would indicate a problem in finding the include files 
where the functions are defined?

Wait. I see the problem now.  I just copied over the stuff from numarray 
for _capi.c but we need to look for the headers in the fenv/fenv.c 
directory for CYGWIN (just like it's done in ufuncobject.h).

I'll submit a fix to SVN shortly.

-Travis



>-----Original Message-----
>From: Crider, Joseph A 
>Sent: Tuesday, January 23, 2007 1:48 PM
>To: numpy-discussion at scipy.org
>Subject: [Numpy-discussion] Unable to build numpy in cygwin
>
>I have been attempting to build recent versions of numpy and scipy in
>Cygwin on Windows XP for use in Cygwin, but I haven't succeeded with any
>version of numpy that I've tried newer than 0.9.8.  It seems to be
>failing in building numarray.  Here is the numarray portion of the
>output:
>
>creating build/temp.cygwin-1.5.23-i686-2.4/numpy/numarray
>compile options: '-Inumpy/core/include
>-Ibuild/src.cygwin-1.5.23-i686-2.4/numpy/core -Inumpy/core/src
>-Inumpy/core/include -I/usr/include/python2.4 -c'
>gcc: numpy/numarray/_capi.c
>gcc -shared -Wl,--enable-auto-image-base
>build/temp.cygwin-1.5.23-i686-2.4/numpy/numarray/_capi.o
>-L/usr/lib/python2.4/config -lpython2.4 -o
>build/lib.cygwin-1.5.23-i686-2.4/numpy/numarray/_capi.dll
>build/temp.cygwin-1.5.23-i686-2.4/numpy/numarray/_capi.o: In function
>`NA_checkFPErrors':
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2947:
>undefined reference to `_fetestexcept'
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2954:
>undefined reference to `_feclearexcept'
>build/temp.cygwin-1.5.23-i686-2.4/numpy/numarray/_capi.o: In function
>`NA_clearFPErrors':
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2947:
>undefined reference to `_fetestexcept'
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2954:
>undefined reference to `_feclearexcept'
>build/temp.cygwin-1.5.23-i686-2.4/numpy/numarray/_capi.o: In function
>`NA_checkAndReportFPErrors':
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2947:
>undefined reference to `_fetestexcept'
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2954:
>undefined reference to `_feclearexcept'
>collect2: ld returned 1 exit status
>build/temp.cygwin-1.5.23-i686-2.4/numpy/numarray/_capi.o: In function
>`NA_checkFPErrors':
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2947:
>undefined reference to `_fetestexcept'
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2954:
>undefined reference to `_feclearexcept'
>build/temp.cygwin-1.5.23-i686-2.4/numpy/numarray/_capi.o: In function
>`NA_clearFPErrors':
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2947:
>undefined reference to `_fetestexcept'
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2954:
>undefined reference to `_feclearexcept'
>build/temp.cygwin-1.5.23-i686-2.4/numpy/numarray/_capi.o: In function
>`NA_checkAndReportFPErrors':
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2947:
>undefined reference to `_fetestexcept'
>/cygdrive/c/Temp/Python/numpy-1.0.1/numpy/numarray/_capi.c:2954:
>undefined reference to `_feclearexcept'
>collect2: ld returned 1 exit status
>error: Command "gcc -shared -Wl,--enable-auto-image-base
>build/temp.cygwin-1.5.23-i686-2.4/numpy/numarray/_capi.o
>-L/usr/lib/python2.4/config -lpython2.4 -o
>build/lib.cygwin-1.5.23-i686-2.4/numpy/numarray/_capi.dll" failed with
>exit status 1
>
>Any help would be appreciated.  Thanks.
>
>J. Allen Crider
>256-461-2699
>
>_______________________________________________
>Numpy-discussion mailing list
>Numpy-discussion at scipy.org
>http://projects.scipy.org/mailman/listinfo/numpy-discussion
>_______________________________________________
>Numpy-discussion mailing list
>Numpy-discussion at scipy.org
>http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
>
>  
>




More information about the NumPy-Discussion mailing list