Loading ...
Sorry, an error occurred while loading the content.

Re: [tekkotsu_dev] Re: Mirage compilation problems again

Expand Messages
  • Ethan Tira-Thompson
    OK I also applied Dave’s quick fix for MapBuilder privacy and got through a full Aperios build, which involved a couple more tweaks, all checked into CVS.
    Message 1 of 14 , Feb 1, 2012
    • 0 Attachment
      OK I also applied Dave’s quick fix for MapBuilder privacy and got through a full Aperios build, which involved a couple more tweaks, all checked into CVS.

      Dave: I finally collected the Aperios isnan fix stuff together instead of being replicated in a bunch of files like we had talked about a while back (decided to stick it into mathutils.h)

      For reference, if anyone uses isnan and cares about it not crashing on Aperios, you should #include “Shared/mathutils.h” and reference std::isnan().  isfinite() and other friends don’t work portably either, just avoid using or make bitmask versions in mathutils.h.  The problem is the Aibos are set up to crash if they encounter any floating point exceptions, such as operations on NaN, even though these are well defined by standards.  So isnan crashes if it actually encounters a NaN.  Similarly the x!=x type trick.  So you actually have to check the bit pattern to avoid a crash, which is what our custom isnan in mathutils.h does.  It’s #ifdef’d so on non-Aperios platforms it uses the native isnan otherwise.

      -Ethan


      On Jan 31, 2012, at 6:11 PM, nicksultanum wrote:

       

      Dave: the fix you suggested solved that problem.

      Yet another error appeared:

      Compiling Shared/Draw.cc...
      In file included from Shared/Draw.h:5, from Shared/Draw.cc:1:
      Shared/Draw.cc: In member function `Draw& Draw::setRegion(const BoundingBox2D&, bool)':
      Shared/Draw.cc:55: error: `isfinite' undeclared in namespace `std'
      make[1]: *** [/usr/local/Tekkotsu/build/PLATFORM_APERIOS/TGT_ERS7/Shared/Draw.o] Error 1
      make[1]: Leaving directory `/usr/local/Tekkotsu'

      Remembering the previous issue with the 'hypotl' function, are these things related?

      Also... something I didn't mention before, and might be relevant: I'm using Ubuntu 10.04 on VirtualBox, GCC 4.4.3.

      Ignacio: I'm using CA(Canada) locale... think that would be a problem?

      --- In tekkotsu_dev@yahoogroups.com, Dave Touretzky <dst@...> wrote:
      >
      > The easiest way to fix the MapBuilder compilation problem that
      > nicksultanum reports is to edit the MapBuilder.h file to make setAgent
      > be public instead of protected. Try that, and let me know if it works.
      >
      > I don't want to make this change globally because we really want users
      > to be calling Pilot::setAgent and not MapBuilder::setAgent. But I can
      > include it as a special legacy hack for AIBOs if it solves the problem.
      >
      > -- Dave
      >


    • nicksultanum
      Great, it worked. Thanks!
      Message 2 of 14 , Feb 6, 2012
      • 0 Attachment
        Great, it worked.
        Thanks!

        --- In tekkotsu_dev@yahoogroups.com, Ethan Tira-Thompson <ejt@...> wrote:
        >
        > OK I also applied Dave's quick fix for MapBuilder privacy and got through a full Aperios build, which involved a couple more tweaks, all checked into CVS.
        >
        > Dave: I finally collected the Aperios isnan fix stuff together instead of being replicated in a bunch of files like we had talked about a while back (decided to stick it into mathutils.h)
        >
        > For reference, if anyone uses isnan and cares about it not crashing on Aperios, you should #include "Shared/mathutils.h" and reference std::isnan(). isfinite() and other friends don't work portably either, just avoid using or make bitmask versions in mathutils.h. The problem is the Aibos are set up to crash if they encounter any floating point exceptions, such as operations on NaN, even though these are well defined by standards. So isnan crashes if it actually encounters a NaN. Similarly the x!=x type trick. So you actually have to check the bit pattern to avoid a crash, which is what our custom isnan in mathutils.h does. It's #ifdef'd so on non-Aperios platforms it uses the native isnan otherwise.
        >
        > -Ethan
        >
        >
        > On Jan 31, 2012, at 6:11 PM, nicksultanum wrote:
        >
        > > Dave: the fix you suggested solved that problem.
        > >
        > > Yet another error appeared:
        > >
        > > Compiling Shared/Draw.cc...
        > > In file included from Shared/Draw.h:5, from Shared/Draw.cc:1:
        > > Shared/Draw.cc: In member function `Draw& Draw::setRegion(const BoundingBox2D&, bool)':
        > > Shared/Draw.cc:55: error: `isfinite' undeclared in namespace `std'
        > > make[1]: *** [/usr/local/Tekkotsu/build/PLATFORM_APERIOS/TGT_ERS7/Shared/Draw.o] Error 1
        > > make[1]: Leaving directory `/usr/local/Tekkotsu'
        > >
        > > Remembering the previous issue with the 'hypotl' function, are these things related?
        > >
        > > Also... something I didn't mention before, and might be relevant: I'm using Ubuntu 10.04 on VirtualBox, GCC 4.4.3.
        > >
        > > Ignacio: I'm using CA(Canada) locale... think that would be a problem?
        > >
        > > --- In tekkotsu_dev@yahoogroups.com, Dave Touretzky <dst@> wrote:
        > > >
        > > > The easiest way to fix the MapBuilder compilation problem that
        > > > nicksultanum reports is to edit the MapBuilder.h file to make setAgent
        > > > be public instead of protected. Try that, and let me know if it works.
        > > >
        > > > I don't want to make this change globally because we really want users
        > > > to be calling Pilot::setAgent and not MapBuilder::setAgent. But I can
        > > > include it as a special legacy hack for AIBOs if it solves the problem.
        > > >
        > > > -- Dave
        > > >
        > >
        > >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.