Jaro Hofierka hofierka at devin.fns.uniba.cs
Fri Apr 2 02:37:56 EST 1993

>Does anyone have a file containing detailed instructions on how to compile
>and install the grass4.0 on a IBM Risc 6000 running under AIXwindows. I
>would appreciate to receive that file. I'm really lost trying to run what
>I got from the compilation process I did a few days ago.
>Thanks a lot.
>Prof. Ricardo Brites
>Universidade Federal de Vicosa
>Hello Ricardo,

We compiled succesfully GRASS4.1beta on ibm/risc6000 a few
weeks ago. Mr. Pearson from University College London sent
us a file below. I suggest to compile grass4.1beta because
then most of these problems will be unrelevant.
However, there were 2 or 3
similar problems with a redaclaration, which can be overcomed
simply using #indef _AIX .. #endif directive. A problem
in .../src/raster/r.mapcalc/polish directory was a little
bit more tough. It was overcomed adding to pol.y:
#indef _AIX
#include <stdlib.h>

Good luck

Jaro Hofierka
Dept. Cartography, Geoinformatics & Rem. Sensing
Comenius University
SLOVAKIA            E-mail: hofierka at devin.fns.uniba.cs


>We are trying to compile grass4.1beta on IBM RISC/6000, AIX 3.2. but
>we have got a lot of problems with that.

I haven't tried compiling grass4.1beta, but I did get 4.0 working on
IBM RISC/6000s. I've included a list of things I did to get Grass 4.0
working (including the problem with "lex.yy.c"). Most of the problems I
had with the XDRIVER are not relevant any more. Most of the compile
problems can be overcome by adding at least the following to the
"COMPILE_FLAGS" in /home/grass/GIS/src/CMD/ibm :


However, I suggest you read the file /usr/lpp/bos/bsdport which explains
how to compile code that expects a BSD type environment. 

James Pearson
Dept. Photogrammetry & Surveying     INTERNET: j.pearson at
University College London		JANET: j.pearson at
Gower Street
London	WC1E 6BT

List of things I did to get GRASS 4.0 to compile on the RS6000's:
(there may well be better ways, but it worked for me.)

        lines 70,260,414,650: redefinition of malloc().  (/usr/include/stdlib.h)
        Fix: add #ifndef _AIX around malloc()

src/raster/r.mapcalc/polish/ and lex.yy.c includes lex.yy.c which includes stdio.h after printf
        has been "used" (ANSI conflicts in stdio.h)
        Fix: add #define <stdio.h> to pol.y at line 66
         or: compile with -D_NO_PROTO

        line 39 conflict with definition of strcpy()
        Fix: add #ifndef _AIX around strcpy()
         or:  compile with -U__STR__

        have to define EXTRA_CFLAGS=-DX11R3 for Graph_Set.c
        and copy Graph.Set.jdw to Graph_Set.c
        (The text in the Gmakefile tells you to add EXTRA_CFLAGS=-DX11R3
        for compiling with X11R3, but none of the code uses it - unless
        you copy Graph.Set.jdw to Graph_Set.c. May be the X11R3 parts
        should be included in Graph_Set.c by default.)

src/display/devices/XDRIVER/XDRIVER/Graph.Set.jdw (Graph_Set.c)
        Grass window not given name if X11R3 is set
        Fix: add
        after line 187 (between #ifdef X11R3 and #else)

        Undefined dependency at end of Gmakefile $(G_LIB),
        Fix: Comment it out

        line 47: something wrong with defining HUGE (doesn't make sense!)
        Fix: change
                #define HUGE            long
                #define HUGE

        fabs "unresolved"
        Fix: add $(MATHLIB) to end of link command

        NOT_SUN not defined by default so trys to include <rasterfile.h>
        Fix: change #ifndef NOT_SUN to #ifdef sun

        if environmental variable HEIGHT is set, the value of rows is
        unchanged (cols set from both HEIGHT and WIDTH) - dangerous as
        rows is not set before Pnpixels is called.
        Fix: set *rows to the value of HEIGHT
         or: (better) set *rows to 0

        XDRIVER crashes on Xservers that don't use backing store if
        the window is resized.
        Fix: add code to Serve_Xevent.c that deletes old "Pixmap" and
        creates new one the correct size.

More information about the grass-user mailing list