In article <Bx4Dzo.IBC@mach1.wlu.ca>, asmall2@mach1.wlu.ca writes:
|>
|> As promised, here is a list of changes made to compile GRASS4.0 under Linux.
|> For those of you not familiar, Linux is a public domain (copyleft?) Unix
|> operating system for 386 or greater PC's and GRASS is a public domain raster
|> based GIS developed by the U.S. Army.
|>
|> I managed to get GRASS running about a month ago on a 486/33 running Linux
|> 0.96c and X11R5. There were still some modules that I never got round to
|> compiling, but I'm sure the problems could be overcome. This only covers the
|> GRASS source and non of the alpha/related/garden programs. Please note that
|> I am no expert at C or Unix, so some of the code changes may not be entirely
|> foolproof, but it should be enough to get you going.
|>
|> The following changes were made to get GRASS running:
|>
|> 1: Run src/CMD/utils/setup
|>
|> Specify where to compile binaries, respond to various questions (in
|> most cases, hit return for defaults.
|>
|> 2: Edit src/CMD/lists/local
|>
|> Specify digitizer, paint, and graphics drivers. If this info is not
|> available, comment out "none" for digitizer, "preview" for paint driver. You
|> must change graphics driver from "CELL" to "XDRIVER"
|>
|> 3: Edit src/CMD/lists/GRASS
|>
|> comment out raster/r.binfer (needs lex and yacc I think)
|> raster/r.mapcal ( " " )
|> raster/r.weight ( " " )
|>
|> I never got around to getting LEX for Linux. I think it's version is
|> called FLEX and may be part of the installation package now. I know that BISON
|> is the Linux version of yacc, and it works with a -y option to make it
|> emulate yacc.
|>
|> 4: Edit src/CMD/generic/GISGEN.sh
|>
|> Even though it says not to edit this file, you must change line #71
|> from:
|> /etc/mknod $GISBASE/dev/fifo.$fifo$i p
|> to:
|> /bin/mkfifo $GISBASE/dev/fifo.$fifo$i p
|>
|> Alternatively, and probably easier, is to make a symbolic link from
|> /bin/mkfifo to /etc/mknod.
|>
|> 5: Edit src/libes/gis/Gmakefile
|>
|> Comment out line #106 - popen.o \
|> This is standard library routine of GCC that does not have to be
|> compiled.
|>
|> 6: Edit src/display/devices/monitorcap
|>
|> Comment out lines #11,12,13 (other X terminals may be uncommented
|> also):
|> X0:driver/XDRIVER:X-windows graphics display: \
|> BASEDIR/dev/fifo.1a BASEDIR/dev/fifo.1b \
|> ::any terminal
|>
|> 7: Edit src/display/devices/XDRIVER/XDRIVER/Gmakefile
|>
|> Change line #36 from:
|> $(CC) $(LDFLAGS) $(OFILES) $(LIB) -lX11 $(MATHLIB)
|> to:
|> $(CC) $(LDFLAGS) $(OFILES) $(LIB) -L/libs -lX11 $(MATHLIB)
|>
|> 8: Edit src/display/devices/XDRIVER/XDRIVER/SWITCHER.c
|>
|> Change line #139 from:
|> setpgrp(0,getpid());
|> to:
|> setpgrp(0);
|>
|> "setpgrp() is used to change the process group to be distinct from the
|> process group of the keyboard. This prevents keyboard interrupts from
|> unintentionally killing the monitor (ie if you comment this line out,
|> run and interrupt any program, the monitor will also die).
|>
|> The problem is that some version of Unix have only one argument to setpgrp()
|> and others have two. It is a hack, but the two argument call works even
|> when only one is expected. However, GCC compiler notices and won't compile.
|> Replace this call with setpgrp(0) and see (1) if it compiles and (2) if
|> it protected from interrupts." (Michael Shapiro)
|>
|>
|> 9: Edit src/fonts/for_grass/Gmakefile
|>
|> Change line #12 from: splitfont $(FONT) to: ./splitfont $(FONT)
|> Change line #24 from: font.bin: font_2_bin $(RAWFONT)
|> to: font.bin: ./font_2_bin $(RAWFONT)
|>
|> 10: Edit src/display/d.profile/main.c
|>
|> Change line #352 from: cfree(profile.ptr); to: free(profile.ptr);
|>
|> 11: Edit src/imagery/i.class/zoom_box.c and
|> src/imagery/i.points/zoom_box.c
|>
|> Declare the following statements before the zoom_box() function:
|>
|> static int cancel();
|> static int zoom1();
|> static int zoom2();
|>
|> and remove int cancel(); and int zoom1(); from within the zoom_box()
|> function. It should look like the following:
|> ----------------------------------------------------------------------------
|> #include "globals.h"
|>
|>
|> static int x1, y1, x2, y2;
|> static View *pick_view, *zoom_view, *main_view;
|>
|> static int cancel();
|> static int zoom1();
|> static int zoom2();
|>
|> zoom_box()
|> {
|> static int use = 1;
|> static Objects objects=
|> {
|> MENU("Cancel",cancel,&use),
|> INFO(" Mark first corner of window ",&use),
|> OTHER(zoom1,&use),
|> -----------------------------------------------------------------------------
|>
|> 12: Edit src/imagery/i.target/ask_target.c
|>
|> Change line #11 from: strcpy(cur_location, location, cur_location);
|> to: strcpy(cur_location, location);
|>
|> Have fun, and email me if you have any problems, I'll try and help.
|>
|> Cheers,
|>
|> +--------------------------------------------------------------------------+
|> | Alastair J. Small |
|> | Department of Geography Tel: (519) 884-1970 Ext. 2040 |
|> | Wilfrid Laurier University Fax: (519) 884-8853 |
|> | Waterloo, Ontario, N2L 3C5 Email: asmall2@mach1.wlu.ca |
|> | CANADA |
|> +--------------------------------------------------------------------------+
--
James Darrell McCauley Dept of Ag Engineering, Purdue Univ
internet: mccauley@ecn.purdue.edu West Lafayette, Indiana 47907-1146, USA
bitnet: mccauley%ecn@purccvm UUCP: pur-ee!mccauley