[Verse-dev] verse build (in blender) fails....

Emil Brink emil at obsession.se
Wed Aug 23 08:38:15 CEST 2006


Tony Agee wrote:
> Hello!
> 
>   I am trying to build blender with Verse support. I am using MSVC 2005 
> Express, with the scons build system provided by blender.
> 
>  
> 
> The build fails compiling v_gen_pack_g_node.c with several errors. 
> (C2177: constant too big)
> 
> These occur on every line referencing V_REAL32_MAX, defined in verse.h, 
> with a value of 3.40282347e+38F .

Ah, the Buried Bug.

This is a known problem, unfortunately without a good fix. The problem is
that we (as in, the Verse protocol) needs a distinct floating point bit-
pattern to use to indicate various things, when a float command parameter is
not used.

For this, we use the V_REAL32_MAX symbol, which is supposed to be the
largest IEEE number. The problem is that that number seems to vary with
the platform and/or compiler!

What I've done to make Verse compile, and seemingly run okay, when this has
occured, is to simply change the constant to the local system's proper
FLT_MAX or so. This is incredibly shaky however, and this issue needs to
be fixed for real.

This absolutely sucks, but so far we've been unable to come up with a way
to fix it. I would love to use the "NaN" pattern, but there seems to be no
portable way to *set* a float variable to NaN. Don't ask me why.

Taking a quick surf, I realize there are actually ways around this, and
perhaps that is the way we should go. We really want the semantics of NaN,
to indicate that a field is not currently holding a valid number, but is
being used for something else.

What do you think about switching to NaN, Eskil? Of course, this would be
a non-backwards compatible change, and would force us to bump the release
number to seven.

Regards,

/Emil



More information about the Verse-dev mailing list