[GRASS5] Re: [GRASSLIST:1899] ERROR in read/write portable short

Christopher Fonnesbeck chris at fonnesbeck.org
Fri Nov 28 13:04:44 EST 2003


On Nov 27, 2003, at 9:13 AM, Radim Blazek wrote:

> On Wednesday 26 November 2003 20:38, you wrote:
>> I think I have everything configured properly for an OSX build,
>> however, I get the following errors. Any ideas? I scanned the list
>> archives, but did not find anything helpful:
>>
>> cd OBJ.powerpc-apple-darwin7.0.0;
>> LD_LIBRARY_PATH=:/usr/local/src/grass57_exp_2003_11_22/dist.powerpc-
>> apple-darwin7.0.0/lib ./test
>> ERROR in read/write portable short
>>    Written: -32768
>>    Read   : 0
>> ERROR in read/write portable short
>>    Written: -12345
>>    Read   : -57
>> ERROR in read/write portable short
>>    Written: 12345
>>    Read   : 57
>> ERROR in read/write portable short
>>    Written: 32767
>>    Read   : -1
>> make[3]: *** [OBJ.powerpc-apple-darwin7.0.0/test] Error 1
>> make[2]: *** [subdirs] Error 1
>> make[1]: *** [subdirs] Error 1
>> make: *** [default] Error 1
>
> I read in the list, that LD_LIBRARY_PATH does not work on MacOSX,
> and DYLD_LIBRARY_PATH should be used instead. Did you set
> DYLD_LIBRARY_PATH to  
> /usr/local/src/grass57_exp_2003_11_22/dist.powerpc-apple-darwin7.0.0/ 
> lib
> before somehow? Otherwise it should not work.
> Do you have 5.7 only? Are you sure that 5.0 libraries are not
> used (are not in DYLD_LIBRARY_PATH) instead of 5.7 libraries?

I tried setting DYLD_LIBRARY_PATH, with the same resulting error. I've  
never had to set this variable building other programs on OSX.

> Try also
> ldd  
> /usr/local/src/grass57_exp_2003_11_22/lib/vector/diglib/OBJ.powerpc- 
> apple-darwin7.0.0/test
>
> On little endian
>    dec     hex
> -32768 = 00 80
> -12345 = C7 CF
>  12345 = 39 30
>  32767 = FF 7F
>
> dec     hex
>   0 =    00
> -57 = FF C7
>  57 =    39
>  -1 = FF FF
>
> So it seems that 2. byte is lost.
>
> This will be a bug in diglib, it was developed on intel and probably  
> never run on Power PC.
> I updated grass51/lib/vector/diglib/test.c so that it prints byte  
> order also,
> please update from cvs or download from web
> http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass51/lib/vector/ 
> diglib/test.c?rev=1.7&content-type=text/plain
> then recompile diglib and send us your new error report (should  
> include " ... byte_order = ... "),
> usr/local/src/grass57_exp_2003_11_22/dist.powerpc-apple-darwin7.0.0/ 
> include/portable.h and
> usr/local/src/grass57_exp_2003_11_22/lib/vector/diglib/test.tmp  
> (gzipped)

Here is the error now:

cd OBJ.powerpc-apple-darwin7.0.0;  
LD_LIBRARY_PATH=:/usr/local/src/grass57_exp_2003_11_22/dist.powerpc- 
apple-darwin7.0.0/lib ./test
ERROR in read/write portable short, byte_order = 0
   Written: -32768
   Read   : 0
ERROR in read/write portable short, byte_order = 0
   Written: -12345
   Read   : -57
ERROR in read/write portable short, byte_order = 0
   Written: 12345
   Read   : 57
ERROR in read/write portable short, byte_order = 0
   Written: 32767
   Read   : -1
make[3]: *** [OBJ.powerpc-apple-darwin7.0.0/test] Error 1
make[2]: *** [subdirs] Error 1
make[1]: *** [subdirs] Error 1
make: *** [default] Error 1

See requested files attached.

Thanks for the help.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osx_compile.tar.gz
Type: application/x-gzip
Size: 803 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20031128/5bcac575/osx_compile.tar.gz
-------------- next part --------------


>
> By chance, anybody knows how long type 'short' is on Power PC, and 
> which endian.
>
> Paul, you have 5.7 compiled on some non intel platforms, can you send 
> us your
> portable.h files for those machines also?
>
>
> Radim
>
>
>
--
Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g )
Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia


More information about the grass-dev mailing list