[LLVMdev] IsNAN.cpp:23:3: #error "Don't know how to get isnan()"

Reid Spencer reid at x10sys.com
Fri Jul 16 22:42:46 PDT 2004


Henrik,

Note that the contents of IsNAN.cpp has:

#include "Config/config.h"
#if HAVE_ISNAN_IN_MATH_H
# include <math.h>
#elif HAVE_ISNAN_IN_CMATH
# include <cmath>
#elif HAVE_STD_ISNAN_IN_CMATH
# include <cmath>
using std::isnan;
#else
# error "Don't know how to get isnan()"
#endif

so one of the following is true for your platform:

1. The compiler is not finding <cmath> (doubt it)
2. The HAVE_ISNAN_IN_CMATH or HAVE_STD_ISNAN_IN_CMATH #defines are not
    being set in Config/config.h (likely)

Since it is likely the #defines are not set, you can do one of two things:

1. Discover why the configure script doesn't recognize your platform as
    having a cmath header and fix it.
2. Fix (in build dir) your include/Config/config.h so that the
    HAVE_ISNAN_IN_CMATH variable is set to 1. note that this is a generated
    file (source is include/Config/config.h.in) but you can override the
    settings by changing it in your build directory.

Hope this helps.

Reid.


On Sat, 17 Jul 2004 01:31:51 +0200
  "Henrik Bach" <henrik_bach_llvm at hotmail.com> wrote:

> Hi
> 
>>From: Chris Lattner <sabre at nondot.org>
>>Date: Thu, 15 Jul 2004 17:43:27 -0500 (CDT)
> 
>>Ah, suddenly everything makes sense.  If you're interested in LLVM on the
>>windows platform, *please* get CVS.
> 
> Last night I've got the latest version of LLVM from CVS and now porting 
>LLVM to Interix from this version on.
> 
> I got this error:
> 
> ---------------------
> gmake[1]: Entering directory `/usr/local/src/llvm/lib/Support'
> IsNAN.cpp:23:3: #error "Don't know how to get isnan()"
> ---------------------
> 
> I can see that the .\configure script didn't find any version of isnan(). 
>However, I've manually found isnan() in /opt/gcc.3.3/include/c++/3.3/cmath.
> 
> Is this another configuration error from Interix or what?
> 
> 
> /Henrik
> 
> _________________________________________________________________
>Få alle de nye og sjove ikoner med MSN Messenger 
>http://www.msn.dk/messenger
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list