GRASS 5 beta4 on DU alpha

Luca Palmeri lpalmeri at ux1.unipd.it
Tue Oct 26 13:41:20 EDT 1999


To DU 64bit users and developers,

 I post in attachment to this mail the errors

and fixes I had to do in order to compile grass5beta4

on Digital Unix alpha.

I had to modify the source code in many places. I do

not actualy know how much of these changes are specific

to the particular system I installed grass on, or to

*my choice* of using cc instead of gcc. Anyhow

I hope these help if somebody runs into troubles in

compiling on a 64bit system

Luca

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


-------------- next part --------------
October 26, 1999   -    GRASS5.0beta4

What I had to do to compile under Digital Unix (alpha)

Preamble:

a - I do not have root privileges on this system, and
I also have some quota limits. So I cannot install all
the librares I would like to.

b - Grass compiles. Yes the fundamentals modules go without
big problems. But I wanted to go pedanthic up to the src.contrib
that it isn't needed in order to have a fully working system

c - The system I am compiling grass on it is not very up to
date.Digital UNIX V4.0D  (Rev. 878). Moreover I am not really
expert of this kind of systems.

d - I have used grass for a while after compilation and seems
working very well. 


First of all switch to 64bit mode as suggested by Bill
Hughes, by changing in src/mapdev/diglib/portable.c

   #define LNG_SIZ  8  /* on 64bit platforms */


before compile, after doing ./configure

0) Changed "gcc" -> "cc" and "-g" -> "-g3" in src/CMD/head/head
   cc likes very much the -g3 optimization with debugging symbols

1) in src/Makefile: Modify "install -d -m 755" with "mkdir -m 755"
   DU install seems not to understand -d option

during compile:

2) changed "-lncurses" -> "-lcurses" in src/CMD/head/head. I do not
   have SOs ncurses on my system and had some unresolved symbols.

3) exclude by commenting i.points3 from src/CMD/list/GRASS, the
   module is broken and cc does not like it

4) same for src/imagery/i.tape.tm3

5) change CM -> CMap in the file src/mapdev/v.digit/defines.h 
   on the line #define CM CurrentMap, and then in that directory 
   a substitution:
       for a in `ls *.c`; do cat $a | sed "s/CM/CMap/g"> ttt; mv ttt $a;done

   This it was necessary due to complaints from the compiler on the
   redefinition of the simbel CM already defined in curses.h (see 2). 
   I guess that with ncurses this shouldn't be necessary.

6) in src/include/geom/basic.h commented the definition of "sbrk" due to the
   following compiler error:
     cc: Error: /usr/include/unistd.h, line 549: In this declaration, the 
     type of "sbrk" is not compatible with the type of a previous declaration 
     of "sbrk" at line number 94 in file src/include/geom/basic.h.
     extern void *sbrk __((ssize_t));

7) in the file src/mapdev/v.in.tig.lndmk/globals.h commented the definition of 
   "dirname" due to the following error:
     cc: Error: globals.h, line 77: In this declaration, the type of
     "dirname" is not compatible with the type of a previous declaration of
     "dirname" at line number 165 in file /usr/include/string.h.
     extern char dirname[250]; /* base directory/file name for Tiger files */

8) in file src/raster/r.combine/cmd/local_proto comment the definition of
   the prototype for "yywrap()" and then in file 
   src/raster/r.combine/cmd/gis_lxcl.l comment out the "yywrap()" function.
   The error reported by cc is:
     cc -g3 -O2   -I/export/venus6b/grass/src/src/include  -c gis_lxcl.c
     cc: Warning: local_proto.h, line 24: Too many actual parameters in 
         macro call.
     int yywrap(void);
     -----------^
     cc: Error: local_proto.h, line 24: Invalid declarator.
     int yywrap(void);
     ----^
     cc: Warning: gis_lxcl.l, line 222: Too many actual parameters in 
         macro call.
     int yywrap(void)
     -----------^
     cc: Error: gis_lxcl.l, line 222: Invalid declarator.
     int yywrap(void)
     ----^
     cc: Error: gis_lxcl.l, line 229: Invalid declarator.
	else

9) in file src/raster/r.mapcalc/polish/pol.y also comment out the definition
   of yywrap() due to the following error:
     cc -g3 -O2   -I/export/venus6b/grass/src/src/include  -c y.tab.c
     cc: Error: pol.y, line 84: Invalid declarator.
     int yywrap()

10) same error in file src/raster/r.weight/inter/local_proto.h and gis_lxcl.l
    in that dir. Comment or delete yywrap() call

11) in file src/scripts/contrib/Gmakefile delete the 2nd line
    # $(GMAKE) tiger.info    
    even if that is commented make on DU seems not allowing comented lines
    like that in makefile, it complains saying something about files not found.

12) in src/sites/s.surf.rst/tree the compiler says it is not possible to
    find stdio.h (???). I commented in Gmakefile the line 
    EXTRA_CFLAGS=-I ../data 
    and substituted in src/sites/s.surf.rst/tree/tree.c
    #include "dataquad.h"    with      #include "../data/dataquad.h" 

13) In src.contrib/CERL/raster/r.out.mpeg I have the following errors:
    (and I just skipped the compilation)
      cc -g3 -O2   -I/export/venus6b/grass/src/src/include  -c main.c
       cc: Error: local_proto.h, line 5: In the declaration of an 
       unnamed object, the array bounds are incorrectly specified.
       int parse_command(int, char *[], char *[][], int *, int *, int *, int *);
       ..............................

14) in src.contrib/CERL/raster/r.water.fea/src/inter/ I have the following 
    error:
     cc -g3 -O2   -I/export/venus6b/grass/src/src/include  -c data.c
     mv data.o OBJ.alphaev56-dec-osf4.0d/data.o
     Make: Don't know how to make -lm.  Stop.
    Really do not know what it is happening. I just remove $(MATHLIB) from
    Gmakefile and add "-lm" to the LDFLAG variable.   Works !

    in src.contrib/CERL/raster/r.water.fea/src/programs/datafea same
    problem, same solution

    in src.contrib/CERL/raster/r.water.fea/src/programs/select_basins again. 

15) src.contrib/NPS/r.in.utm I have this error and I skip
     cc: Error: /usr/lib/libm.il: The 'cc' command cannot be used to compile 
         PL/I programs


16) in src.contrib/PURDUE/s.voronoi/sw_defs.h incompatible definition 
        of malloc (???), just delete it.


17) same problem in src.contrib/SCS/misc/m.bsplit/cmd/main.c, same solution

18) src.contrib/SCS/misc/m.lulc.USGS same error as in 14) solution slightly 
    different: in Gmakefile delete $(MATHLIB) from the line
         $(BIN_CONTRIB_INTER)/Mlulc.USGS: $(OBJ) $(GISLIB) $(MATHLIB)

     same thing in src.contrib/SCS/misc/m.strip99s
                in src.contrib/SCS/raster/r.out.rlc/Gmakefile 
            and in src.contrib/SCS/raster/r.reclass.scs/inter/



AND THAT'S IT. 



More information about the grass-user mailing list