[NumPy-Tickets] [NumPy] #1625: Numpy is ignoring the fact "isfinite" is undefined

NumPy Trac numpy-tickets@scipy....
Tue Oct 5 14:50:23 CDT 2010

#1625: Numpy is ignoring the fact "isfinite" is undefined
 Reporter:  drkirkby  |       Owner:  somebody
     Type:  defect    |      Status:  new     
 Priority:  normal    |   Milestone:  2.0.0   
Component:  Other     |     Version:  1.5.0   
 Keywords:            |  
 On Solaris or !OpenSolaris, when Python is built, it is not compiled as a
 C99 application. (That's a choice the Python developers took).

 Therefore, {{{isfinite}}}, which was not defined in the C standard until
 C99, does not exist. Hence when Python builds, the config.log shows:


 The latest Numpy, (and this includes the latest snapshot taken only an
 hour or two) ago builds OK on Solaris. However, when one tries to import
 this into Python with:

 import numpy

 it generates an error:

 ImportError: ld.so.1: python: fatal: relocation error: file
 packages/numpy/core/multiarray.so: symbol isfinite: referenced symbol not

 It would appear that Numpy is trying to use {{{isfinite}}}, despite the
 fact that Python is built without adding specific C99 support.

 Linux systems, which I assume is what most Numpy developers use, defines
 {{{isfinite}}} when one includes {{{math.h}}} in a file. But this should
 not happen unless one builds C99 code, as {{{isfinite}}} was not defined
 until the C99 standard. That's a  problem with Linux - it tends not to
 conform to standards too well.

 Solaris in comparison will not define {{{isfinite}}} unless the code is
 C99. {{{isfinite}}} is defined in a header file
 {{{/usr/include/iso/math_c99.h}}} but '''not''' in
 {{{/usr/include/math.h}}}. However, if the compiler is building C99 code,
 then the contents of {{{/usr/include/iso/math_c99.h}}} will be included,
 so {{{isfinite}}} will be defined.

 I believe this is a bug in Numpy, as it should respect the fact the Python
 build has determined {{{isfinite}}} is undefined (so sets
 {{{ac_cv_have_decl_isfinite=no}}}) and so therefore Numpy should not try
 to use {{{isfinite}}}.

 This came up as a bug when we tried to update Numpy in Sage. It is
 documented on


 but I believe you will find the information there confusing, as it covers
 many issues associated with upgrading Numpy and Scipy in Sage.

 The basic problem is Numpy is using {{{isfinite}}} even though Python has
 worked out that it is undefined.


Ticket URL: <http://projects.scipy.org/numpy/ticket/1625>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list