grass for digital alpha axp version 0.7 released source and binary

jeg at jeg at
Wed Dec 27 07:00:00 EST 1995

here are the README files


by James Ganong, jeg at, (510)643-6307


You can get it by anonymous ftp from:
The sources are in the same ftp site, but without the -bin in the filename:


Choose a directory where to you want to unpack the grass software.
This directory can be anywhere you have space, it does not have to be
in your path. cd to this directory and run:

% zcat grass-alpha-axp-0.7-bin.tar.Z | tar -xvf - 

This will create a subdirectory called axp.  Then you run: 

% axp/install.script

It will ask your where you unpacked the tar file, and you tell it
the directory you changed to before you unpacked it, not the
axp subdirectory.  This program will create a startup script
for grass that must be put into your path.  It will ask you where
to put this.  /usr/local/bin would be a good choice.  You probably
will not be able to write into /usr/local/bin as a normal user,
so axp/install.script will write its startup script into /tmp
and you can su root afterwards and move it. 


by James Ganong, jeg at, (510)643-6307


You can get it by anonymous ftp from
in /pub/grass/grass-alpha-axp-0.7.tar.Z
If you use this port, please write me (jeg at and
say hi.  If you have problems I will probably be able to help.


cd to the directory where you unpacked the grass4.1.5 distribution,
fp update_8 untarred into it
which i got from
unpack the patch distribution:

% zcat grass-alpha-axp-0.7.tar.Z | tar -xvf - 

install the patches file:

% patch -p0 < grass-alpha-axp-0.7/patches.grass.axp

install the axptrick:

% ( cd axptrick ; axpsetup )

axpsetup will give a few lines of instructions on setting the COMP_HOST_ROOT
variable.  it is essential that you understand and act on these instructions.
most of the changes needed to compile grass on an alpha axp
can be done automatically through global substitutions.
when COMP_HOST_ROOT is set the standard C compiler, cc, will 
preprocess each source file as it compiles it to make these substituions.
see axptrick/README for more information.

put the local file into src/CMD/lists/local so that it will compile
more that the bare minimum of grass programs:

% cp local src/CMD/lists

run the grass setup program that we patched using the patch program
to make an src/CMD/head/axp file that will work on an alpha:
[ the local file lists xgre at the end, so if you don't have this package
comment it out, or see the grass-alpha-axp-0.7/patches.xgre.bugs 
section below for how to obtain it. ]  the setup program asks many questions.
the patched setup program has defaults for each question that would 
be appropriate for an alpha.

% ( cd src/CMD/utils ; setup )

if all goes well, the following step will take several hours:

% src/CMD/GISGEN.axp  

now, and whenever you add new binaries, you have to run the following command:

% src/CMD/MAKELINKS.axp 

try it out!  please send buggestions to jeg at


        patches xgre cell editor bugs found in alpha axp port
        xgre is not part of the GRASS distribution yet
        if you want this package,
        get it by anonymous ftp from

        these changes are duplicated in patches.grass.axp
        they are kept here separately also because they are
        potentially useful as a separate release for
        sites that have 24 bit graphics but no alpha axps.
        allows XDRIVER to use 24 bit truecolor hardware 
        to do typical GRASS 8 bit graphics,
        admittedly not an ideal solution,
        but better than restarting your X server in 8 bit mode
        does not change normal operation on 8 bit displays,
        except it might fix a bug or two.

        useful only to sites who modified pre-0.6 versions of this distribution
        compares every file in the original directory
        and subdirectories against the modified directory. 
        the *.c and *.h files
        are run through sed to elimate the global changes in the input to diff.


the byte order and sizes of types are the same on a decstation
and an alpha axp, except for longs and pointers which are 64 bits.
GRASS on a decstation works and has been tested for years,
so i use a macro trick to change all the longs in GRASS to ints,
which are 32 bits on an alpha axp,
which is the same as a long on a decstation.
the macro trick is this:
i have replaced every long in the .c and .h files with the macro LONG.
then, when compiling on an alpha axp, i define LONG as int.
this could be a problem when GRASS substracts
one pointer from another and puts the result in a LONG, because
the difference between two pointers could be greater that 2^32,
but i haven't seen this to be a problem in practice yet.  
i have been compiling with -trapuv which i think helps limit the
pointers to a smaller address space, but i a not really sure if
it does so.

this strategy allows me to use the portable GRASS vector file format
without any fuss, which is a big win when you have a bunch of non-alpha
machines on your network.  in the long run we may want instead of have
GRASS work with 64 bit longs, so that we can process larger datasets
before we hit limitations, but maybe GRASS should be ansi-ized first?

i think that my port generally will work wherever grass 
works on 32 bit machine.  but there will be situations were
you want to handle data that is too big for a 32 bit machine,
and then my port will need to be reworked.  (a friend of mine says
then why bother with a 64 bit machine?) but the work
that goes into cleaning up grass to run in 32 bits will be
a good starting point for the 64 bit grass.
to have a 64 bit grass i think that we will have to look at
all the ints and longs and for each one replace it with a new
type.  then you would define what all of these types should
be on the machine you are porting to.


when you run src/CMD/utils/setup it will add -DDROP_L_IN_FORMAT and 

  on alpha -- must be defined
  elsewhere -- optional and inconsequential on 32 bit architectures
  DROP_L_IN_FORMAT controls #ifdefs that omit the l from printf and scanf
  formats like %ld and %lu.  axptrick catches and fixes the most common
  case (which is %ld on the same line as scanf or printf) but it was
  necessary to fix a few a complicated cases by hand.

  on alpha -- must be defined
  elsewhere -- desirable unless your machine lacks the usual header files
  DO_NOT_REDECLARE_STDLIB controls #ifdefs that include header
  files in places where the original grass source code redeclares items
  from the standard library.   when they originally wrote grass the
  header files were not as standardized as they are now.
  many of the system functions use the type long, which will be changed
  erroneously by axptrick to int if it is redeclared the the grass code.
  but axptrick knows to leave header files in /usr as is.


new versions are put at the ftp site listed in the AVAILABLITY section.

0.1 first test release

0.2 fixed configuration errors found by Bob Haxo <haxo at>
by that prevented out of the box build.  also fixed a few 
scanf problems of the %lu type where the item being scanned is a LONG.

0.3 moved src/CMD/lists/local out of the patchfile,
used explicit path /lib/cpp in long2LONG, because some users do not have 
/lib in their path, as reported by Boris Livshitz <boris at postgres.Berkeley.EDU>

0.4 fixed typo STLIB should have been STDLIB in patches.grass.axp
convert "long int" to "long" and then "LONG" in long2LONG
and use -f in rm in long2LONG
all of these bugs were found by by Simon Cox <s.cox at>

0.5 upgraded from grass 4.1 update 3 to update 4.
changes by Simon Cox to compile
changes by Simon Cox to compile
changes by Simon Cox to compile XDRIVER/SWITCHER.c
fixed infinite loop in XDRIVER after a resize
[you must do a d.erase after resizing a XDRIVER window or d.rast will coredump]
fixed coredump in 
fixed coredump in
compiles ok on osf/1 version 1.3 and osf/1 version 2.0

0.6 eliminated global changes to the source code tree, now done at compile time
got atleast one digitizer (a summagraphics microgrid II) to work (also on linux
fixed Gmakefile for r.ppm
fixed CELL driver to default to zone 0 projection 0
fixed src/libes/rowio/get.c to compile on alpha

0.7 minor changes needed to compile with grass4.1.5 and fp update_8
hagg at (Wilhelm Hagg) fixed three bugs in paint.
i started also distributing precompiled binaries in another tar file,
with install.script to configure it.


There is a bug in GISGEN.axp where it stops with make: error 1
occasinally.   I tried to figure this bug out but
ran out of time, so all I have is this workaround:
cd to the directory where it stopped, run
gmake4.1; cd .. ; gmake4.1 ; GISGEN.axp 
and the it will continue. 


The following program is no longer used: long2LONG.
Previous versions of this distribution did global substituions
that changed the source files.  This made it difficult to support
multiple architectures, and difficult to exchange patches with non-alpha shops.
Because the global changes are now done on the fly at compile time,
ordinary diff is adequate for preparing patches.
However if you have made any pre-0.6 local changes, filterdiff
could be useful in making a patch that is free of global changes.

The following macros are no longer used: LONG,LDSET,L_IN_LD 
Previous versions of this distribuion used macros that built up scanf and print
formats on the fly.  These macros did not work on some older C compilers,
such as cc on a decstation running ultrix.

More information about the grass-dev mailing list