GRASS on DU (64-bit problems)

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

Bill Hughes wrote:

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

I can immagine that, but on DU/Alpha things appear a bit more difficult.

A part fron r.in.tiff et related staff (i do not have libtiff, libjpg an
zlib) I
compiled everything. Ah yes no nviz, this is because, I think, we have
here
libtcl8.0 and nviz needs libtcl8.0.4. But the tktclgrass still works.

> 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().

Infact, I did something analogous, even if a littlebit dirty, I renamed
free() -> free2()
I had the same redefinition problems with yywrap(). I commented or
renamed.

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.

Something interesting, I will do that tonight before going to bed if
I have some
spare time left.

No kidding, you mean I cannot use my i586 vector files on the alpha ?
and this even under Linux/alpha ? this should definitely change !

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'

This is what I am doing right now ! I will let you know, thanks a lot

LP

--
--> Luca Palmeri - Dip. Proc. Chimici dell'Ingengeria
    Universita' di Padova TEL: +390498275527 -------
------------------------- FAX: +390498275528 -------
--> Think holistic @ the end of the 2nd millenium <--