Python test failure on Mac

David Huttleston Jr dhjr at HDDESIGN.COM
Sat May 14 10:16:16 PDT 2005


On Sat, May 14, 2005 at 11:12:41AM -0600, Sean Gillies wrote:
> On May 14, 2005, at 11:03 AM, David Huttleston Jr wrote:
>
> >On Fri, May 13, 2005 at 04:54:35PM -0600, Sean Gillies wrote:
> >>
> >>On May 13, 2005, at 4:11 PM, David Huttleston Jr wrote:
> >>>
> >>>Hello All,
> >>>
> >>>I'm in the process of porting Mapserver and some of it's supporting
> >>>libraries to Mac OS X.  The results of which will be released as part
> >>>of the DarwinPort project for others to download and build.
> >>>
> >>>I've bumped into a byte order error on the MapCloningTestCase.  I
> >>>haven't seen anything on google or the archives so I thought I'd ask
> >>>the list before I get ugly with this.  I know others have used
> >>>MapServer on a Mac, has anyone else seen this before?
> >>>
> >>>% python runalltests.py -v
> >>>check attributes of a cloned class ... ok
> >>>testConstructorNoArg (classtest.ClassObjTestCase) ... ok
> >>>testConstructorWithArg (classtest.ClassObjTestCase) ... ok
> >>>MapCloningTestCase.testClonedLayers: the layers of a cloned map equal
> >>>the original ... ERROR 1: CPLVerifyConfiguration(): byte order set
> >>>wrong.
> >>
> >>Never seen that before, and haven't heard anything from other OS X
> >>(10.3) mapscript users.  Looks like a GDAL error.
> >>MapCloningTestCase.testClonedLayers doesn't even render an image, so
> >>I'm not sure where it comes into play.  Maybe there's an assert
> >>somewhere?
> >
> >Yes, it looks assertion-like.  Here is what I found in the gdal source
> >code, at line 405 of cpl_conv.cpp
> >
> >void CPLVerifyConfiguration()
> >{
> >/*
> >--------------------------------------------------------------------
> >*/
> >/*      Verify data types.
> > */
> >/*
> >--------------------------------------------------------------------
> >*/
> >    CPLAssert( sizeof(GInt32) == 4 );
> >    CPLAssert( sizeof(GInt16) == 2 );
> >    CPLAssert( sizeof(GByte) == 1 );
> >
> >    if( sizeof(GInt32) != 4 )
> >        CPLError( CE_Fatal, CPLE_AppDefined,
> >                  "sizeof(GInt32) == %d ... yow!\n",
> >                  sizeof(GInt32) );
> >
> >/*
> >--------------------------------------------------------------------
> >*/
> >/*      Verify byte order
> > */
> >/*
> >--------------------------------------------------------------------
> >*/
> >    GInt32   nTest;
> >
> >    nTest = 1;
> >
> >#ifdef CPL_LSB
> >    if( ((GByte *) &nTest)[0] != 1 )
> >#endif
> >#ifdef CPL_MSB
> >    if( ((GByte *) &nTest)[3] != 1 )
> >#endif
> >        CPLError( CE_Fatal, CPLE_AppDefined,
> >                  "CPLVerifyConfiguration(): byte order set wrong.\n"
> >);
> >}
> >
> >>You forgot to tell us the most important information: which mapserver
> >>and GDAL versions are you building?
> >
> >Oops.  Here's the libraries related to gdal and mapserver:
> >
> >  mapserver  4.4.1
> >  gdal       1.1.9_1
> >  jpeg       6b_0
> >  libgeotiff 1.2.1_0
> >  libpng     1.2.8_1
> >  proj       4.4.7_0
> >  tiff       3.7.1_0
> >  zlib       1.2.2_1
> >
> >It seems odd that this hasn't been hit before.  So, I'm suspicious now
> >of how gdal was built.  :-/  Is there a good way to test gdal?
>
> Norman Vine has confirmed that this is a GDAL bug that was only very
> recently fixed.  The fix might be present in the latest GDAL release.
> Check the change log to find out for sure.  At any rate, you should
> really be using a newer GDAL.  I'd also recommend MapServer from the
> CVS head of the 4.4 branch.  There have been some important fixes since
> 4.4.1.

Excellent, I will try the newer code for both gdal and mapserver.

Thank you very much, Sean.  For the info and the blinding speed of
your response.  :-)

Dave



More information about the MapServer-users mailing list