Special thanks to Andreas Lange (andreas.lange@rhein-main.de)for these tips!
You will need some knowledge of c-programming, make, unix-shell to compile grass on a non-linux platform. See the following text for some hints for IRIX.
Operating System: IRIX 6.2, freeware installed, maybe some patches missing
Compiler: gcc 2.8.1, second run with egcs 2.91.66
Configuration: see README-files etc.
first fix the header and library paths and the compiler flags for n32-ABI: see file ./src/CMD/head/sgi-gcc and sgi-egcs. i built this file from the sgi-header and the linux-header in this directory. Compiler flages: gcc/egcs -g -w -O3/-O2 -mabi=n32 -mips3
now unpack sources:
cp /tmp/grass4.3src.tar.gz /usr/local
cd /usr/local
tar xzf grass4.3src.tar.gz
cd /usr/local/grass4.3<
now edit gmake4.3 to reflect directories:
cp gmake4.3 /usr/local/bin/gmake4.3
now edit GISGEN.my and MAKELINKS.my:
cd src/CMD
cp GISGEN.my GISGEN.sgi-egcs
cp MAKELINKS.my MAKELINKS.sgi-egcs
edit both files to reflect correct paths
edit header file or copy sgi-gcc, sgi-egcs:
cd src/CMD/header
cp sgi sgi-egcs
see file sgi-egcs
edit lists/GRASS, see following text which modules failed
cd src/CMD
./GISGEN.my
after that finished:
./MAKELINKS.my
Problems:
problems with -Wl,-s option to linker, ld32 segfaults with -s, could not strip the executables, this is maybe due to my quirky installation. Solution: not using -s option, maybe strip'ing the executables later with 'find . -type f | xargs -l5 strip' (this will cause many, many error warnings, but hopefully not destroy any binaries).
compiling XDRIVER:
unresolved symbol yytext
problem with lex and yacc, which libraries to load? libl.a, libfl.a?
using lex or gnu flex?
using yacc or bison -y?
solution: skipped the compile of all XDRIVERs.
copied the XDRIVER from grass 4.2.1 v20. hope this works.
src/raster/r.hdf/HDF_lib/src
Makefile with CC=cc and RANLIB=ranlib stopped compiling.
After changing compilation succeded.
src/raster/r.nntool
nntool.x:188: conflicting types for random
math.h: previous declaration of random
make error.
commented r.nntool in src/CMD/lists/GRASS.
src/raster/r.out.ppm
cc1: Invalid option -Wl
make Error 1
changed Gmakefile by hand, deleted $(LDFLAGS)
src/raster/r.tiff/cmd
r.in.tiff.c:26: tiffio.h: No such file or directory
changed src/raster/r.tiff/cmd/Gmakefile:
LIBTIFF = $(PATH_LIBTIFF) -L/usr/freeware/lib32 -ltiff ...
where is $PATH_LIBTIFF defined?
changed src/CMD/header/sgi-gcc:
XINCPATH = -I/usr/include/X11 -I/usr/freeware/include
src/raster/r.water.fea/src ...
ld32: Segmentation fault ....
Error.
commented r.water.fea in GRASS.
src/sites/s.geom
ld32: ERROR 33: Unresolved text symbol "mallopt"
ld32: ERROR 33: Unresolved text symbol "mallinfo"
commented s.geom in GRASS.
m.eigensystem calls f77, should be g77!
error in header file.
FC = g77
grass4.3 compiled at last.
the XDRIVER from grass 4.2.1 v20 seems to work on grass4.3.
invoked src/CMD/GISGEN.my
list of modules that did not compile at first or needed editing:
src/display/devices/XDRIVER_24 -- Unresolved text symbol "yylex" -- 1st referended by /usr/lib32/libl.a(main.o).
skipped the XDRIVER_24 first.
I had a second closer look on the error message. I deleted the -ll flag to all XLIBs in the header file and it worked. Yipeee.
src/display/devices/HTMLMAP -- Unresolved text symbol "atan", "fmod" added missing $(MATHLIB) in Gmakefile
src/vector/v.out.shape/shapelib-1.2.7 -- make cc -O -c shpopen.c No such feature exists
added CC = egcs to first line of Makefile in src/vector/v.out.shape/shapelib-1.2.7
src/vector/v.out.shape/gen2shp-0.2.2 -- make cc -O -c utils.c No such feature ...
added CC = egcs to the top of makefile in src/vector/v.out.shape/gen2shp-0.2.2
src/raster/r.hdf/HDF_lib .. make libnofortran fork() failed: too many processes
as i do not use r.in.hdf etc i skipped this module. Should copy MAKE.$(arch)
to "Makefile" to compile the HDF-lib.
Edited HDF_lib/src/Makefile ... But had no luck ...
src/raster/r.nntool -- nntool.c:188: conflicting types for `random´
changed random() to _random() in configure.c and read.c;
compiles and links, but i didn't test if it works.
src/raster/r.out.ppm -- cc1: Invalid option `-Wl´
removed $(LDFLAGS) from Gmakefile. I am not shure what the problem is here.
src/raster/r.water.fea/src -- ld32: Segementation fault. Removing output file...
inter/Gmakefile contains own LDFLAGS = -s -O which is conflicting with main LDFLAGS.
commented this line. But the Segmentation fault occured again. Skipping.
src/raster/fire/src/r.spread -- make: file `OBJ.sgi/make.rules´ line 170: Syntax error the Gmakefile contains an error in line 17 and 18!. After changing the module compiled.
src/sites/s.geom -- Unresolved text symbol "mallopt", "mallinfo"
see SGI.info.
src.contrib/CERL/imagery/i.rvi.prediction
skipped
src.contrib/CERL/raster/r.rvi -- make.rules line 153: Syntax error
removed line from Gmakefile.
src.nonGPL/raster/r.tiff/cmd -- Expecting n32 objects: /usr/freeware/lib/libtiff.so is o32
changed PATH_LIBTIFF = -L/usr/freeware/lib32
do not forget to run CMD/MAKELINKS.my after compiling!
(happend to me).
(I made now a softlink from /usr/freeware/bin/egcs to /usr/bin/cc to prevent problems with the makefiles, but this is no general solution as some machines have installed more than one compiler, eg. GNU egcs and MIPS Pro Compiler)
tcltkgrass produces a Segmentation fault in wish8.0 and dumps core if the configuration is saved to ~/.tcltkgrass. This problem vanished after i made a softlink from wish8.0-o32 to wish8.0 and moved wish8.0 to wish8.0-n32.