[Flightgear-devel] SimGear 'isnan' compile error

2007-04-23 Thread Laurence Homer
Hi,

 

I am attempting to compile the latest cvs version of FlightGear.but I'm
getting an error when I try and compile the pre-requisite SimGear.

 

I'm using Cygwin, on an XP machine, and I believe I have installed all of
the pre-requisite programs (Zlib, Glut, OpenAl, OSG, Plib etc) - I think
correctly, though I have found several different sets of instructions for
the methods that should be used! So I suppose it is possible that the error
lies in installing one of those wrongly.

 

When I try and install SimGear, its all seems to go fine, until I get an
error relating to the isnan function - that it complains is un-declared. I
realise this means somewhere the header/define file that contains isnan
hasn't been recognised, but I've not used Cygwin before, so I've no idea
where this isnan function is stored, or why it would not be defined
properly? 

 

I've played around with a few files, but not managed to fix it yet - Any
help would be much appreciated!

 

Thanks,

 

Loz

 

In case it helps, this is the output of the SimGear 'make' process:

 

make[3]: Entering directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/misc'

g++ -DHAVE_CONFIG_H -I. -I../../simgear -I../..-g -O2 -D_REENTRANT -MT
sg_path.o -MD -MP -MF .deps/sg_path.Tpo -c -o sg_path.o sg_path.cxx

In file included from /usr/local/include/osg/Vec2f:17,

 from ../../simgear/math/SGVec2.hxx:21,

 from ../../simgear/math/SGMath.hxx:36,

 from ../../simgear/math/point3d.hxx:54,

 from ../../simgear/math/sg_types.hxx:41,

 from sg_path.hxx:36,

 from sg_path.cxx:35:

/usr/local/include/osg/Math: In function `bool osg::isNaN(float)':

/usr/local/include/osg/Math:200: error: `isnan' undeclared (first use this
function)

/usr/local/include/osg/Math:200: error: (Each undeclared identifier is
reported only once for each function it appears in.)

/usr/local/include/osg/Math: In function `bool osg::isNaN(double)':

/usr/local/include/osg/Math:201: error: `isnan' undeclared (first use this
function)

make[3]: *** [sg_path.o] Error 1

make[3]: Leaving directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/misc'

make[2]: *** [all-recursive] Error 1

make[2]: Leaving directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear'

make[1]: *** [all] Error 2

make[1]: Leaving directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear'

make: *** [all-recursive] Error 1

Making install in simgear

make[1]: Entering directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear'

Making install in xml

make[2]: Entering directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/xml'

make[3]: Entering directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/xml'

test -z /usr/local/lib || /usr/bin/mkdir -p /usr/local/lib

 /usr/bin/install -c -m 644 'libsgxml.a' '/usr/local/lib/libsgxml.a'

 ranlib '/usr/local/lib/libsgxml.a'

test -z /usr/local/include/simgear/xml || /usr/bin/mkdir -p
/usr/local/include/simgear/xml

 /usr/bin/install -c -m 644 'easyxml.hxx'
'/usr/local/include/simgear/xml/easyxml.hxx'

make[3]: Leaving directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/xml'

make[2]: Leaving directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/xml'

Making install in debug

make[2]: Entering directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/debug'

make[3]: Entering directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/debug'

test -z /usr/local/lib || /usr/bin/mkdir -p /usr/local/lib

 /usr/bin/install -c -m 644 'libsgdebug.a' '/usr/local/lib/libsgdebug.a'

 ranlib '/usr/local/lib/libsgdebug.a'

test -z /usr/local/include/simgear/debug || /usr/bin/mkdir -p
/usr/local/include/simgear/debug

 /usr/bin/install -c -m 644 'debug_types.h'
'/usr/local/include/simgear/debug/debug_types.h'

 /usr/bin/install -c -m 644 'logstream.hxx'
'/usr/local/include/simgear/debug/logstream.hxx'

make[3]: Leaving directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/debug'

make[2]: Leaving directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/debug'

Making install in misc

make[2]: Entering directory
`/cygdrive/c/cygwin/usr/local/source/SimGearcvs/source/simgear/misc'

g++ -DHAVE_CONFIG_H -I. -I../../simgear -I../..-g -O2 -D_REENTRANT -MT
sg_path.o -MD -MP -MF .deps/sg_path.Tpo -c -o sg_path.o sg_path.cxx

In file included from /usr/local/include/osg/Vec2f:17,

 from ../../simgear/math/SGVec2.hxx:21,

 from ../../simgear/math/SGMath.hxx:36,

 from ../../simgear/math/point3d.hxx:54,

 from ../../simgear/math/sg_types.hxx:41,

 from sg_path.hxx:36,

 from sg_path.cxx:35:

/usr/local/include/osg/Math: In function `bool osg::isNaN(float)':


Re: [Flightgear-devel] SimGear 'isnan' compile error

2007-04-23 Thread Csaba Halász
On 4/23/07, Laurence Homer [EMAIL PROTECTED] wrote:

 When I try and install SimGear, its all seems to go fine, until I get an
 error relating to the isnan function – that it complains is un-declared. I
 realise this means somewhere the header/define file that contains isnan
 hasn't been recognised, but I've not used Cygwin before, so I've no idea
 where this isnan function is stored, or why it would not be defined
 properly?

Seems Loic Laronze has run into the same problem. I have given him a
hint, but don't know how he finally got it to compile. (See:
http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg09818.html)
Maybe ask him.

Greets,
Csaba

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] SimGear 'isnan' compile error

2007-04-23 Thread Laurence Homer
Hi Csaba,

Thanks for replying.

I've looked at what you said to Loic, and it seems to be a similar problem,
though I'm still not sure how to fix it...

The extract from OSG math that fails: 

#if defined(WIN32)  !defined(__CYGWIN__)  !defined(__MWERKS__)
inline bool isNaN(float v) { return _isnan(v)!=0; }
inline bool isNaN(double v) { return _isnan(v)!=0; }
#else
#if defined(__APPLE__)
inline bool isNaN(float v) { return std::isnan(v); }
inline bool isNaN(double v) { return std::isnan(v); }
#else
// Need to use to std::isnan to avoid undef problem from cmath
inline bool isNaN(float v) { return isnan(v); }
inline bool isNaN(double v) { return isnan(v); }
#endif
#endif

Since all the functions have the same name, I'm not sure which 'if' section
it is failing in - but I'm assuming that as a cygwin user, I want it to get
into the final else, since it is _CYGWIN_ and not _APPLE_.

As you suggest, I've checked that I have got ieeefp.h (in
cygwin/usr/include), but I'm not sure where __CYGWIN__ should be defined???

(also, ieeefp.h seems to do lots of things to isnan functions, so I'm not
completely clear on which function it is exporting!)

Thanks again,

Loz


 When I try and install SimGear, its all seems to go fine, until I get an
 error relating to the isnan function - that it complains is un-declared. I
 realise this means somewhere the header/define file that contains isnan
 hasn't been recognised, but I've not used Cygwin before, so I've no idea
 where this isnan function is stored, or why it would not be defined
 properly?

Seems Loic Laronze has run into the same problem. I have given him a
hint, but don't know how he finally got it to compile. (See:
http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg09818.
html)
Maybe ask him.

Greets,
Csaba



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel