GRASS on DU (64-bit problems)

Bill Hughes bhughes at grasshoppernet.com
Sun Oct 17 10:27:54 EDT 1999


Luca Palmeri writes:
> I have compiled Grass 5b3 on an alpha with
> digital unix. The compilation has been a little difficult
> and took me a whole day, editing the scripts and the
> code in many points.

I have been able to compile the src/* modules on Linux/Alpha without
problems.  What scripts and code was not compilable?

> of  the free() call due to the complaints of the gcc

These re-definitions should be removed in general.  Replace them with
an #include of the stdlib.h header, or change the free() calls to
G_free().

> Ok, finaly I got it. I have then imported a Location of
> data I was working with under i586 Linux.
> No problem with raster files, But when i go working
> with vector files strange things happen:
> It seems like if GRASS does not recognize anymore the
> vector files build under linux.

No; Alphas are 64-bit machines, the alleged Portable Vector Format is
not, and that guy who is supposed to be working on the compatibility 
doesn't move too fast.  The vector library is very 32-bit oriented,
and the 'right' solution is to make some big changes in the code.

For the moment, you can change the LNG_SIZ value to 8 instead of 4 in
portable.h in mapdev/diglib, and then your computer will recognize
native-sized vector files.  You cannot read Portable Vector Format,
though.

> any suggestion ?

Change the PVF I/O to read byte-wise instead of assuming
sizeof(long)==LNG_SIZ, then remove the run-time configuration code
and make it configure at compile time.  Then re-think the whole
big-endian/little-endian implementation to make it compatible with
both 32- and 64-bit busses.

You could use the native Tru64 compiler instead of gcc; this offers
a 32-bit compatibility mode that will mask the 64-bit problems.  I
haven't tried this, of course, but it might be worth a try.  The
compiler flag is '-taso'

Bill Hughes



More information about the grass-user mailing list