Looking for Grass in France
Jeff Kern
jeff at climate.cor2.epa.gov
Tue May 31 11:35:10 EDT 1994
I just got this information for your buddy Elisabeth Samain
ftp moon.cerer.army.mil
/grass/incoming"
get HP.trouble.shooting
200 PORT command successful.
The following document is a trouble shooting guide to compiling GRASS and
XGRASS on the HP7XX series 9000 machines. It is provided "as is" without
express or implied warranty.
INSTALLING GRASS ON THE HP7XX series 9000
-----------------------------------------
The following are notes of the efforts that, I went through to install GRASS
and XGRASS on the HP755 series 9000 machines. READ this document completely
before compiling GRASS and XGRASS on the HP7XX machines.
Some important points:
``````````````````````
1. Little bit knowledge of the C programming laguage is extremely helpfull.
2. HP-GRASS in the file refers to the directory under which you contain
the directory src which contains the GRASS source code.
3. HP comes with two types of compiler kits(it seems):
a. A Baby compiler kit: This compiler does not contain yacc and lex and so
you may not be able to compile most of XGRASS and r.mapcalc in GRASS.
b. A Normal compiler kit: This is what you will need to compile GRASS
successfully. This should have yacc and lex.
4. You will need the Motif libraries, the libXaw.a, The libXt.a to
compile XGRASS.
5. You may see some warnings during the compilation process. If you are
knowledgable about them try to correct the warnings.
6. Even though the steps discussed below are intended for trouble shooting, you may still have some problems depending upon where all your libraries
and include files reside. It is quite possible that you may not have some
of the include files or libraries. In these circumstance you must talk to
somebody knowledgable about your system.
INSTALLING GRASS
~~~~~~~~~~~~~~~~
The following steps need to be done inorder to install GRASS successfully.
The README file under HP-GRASS/src/CMD describes the installation process.
Answer the questions as requested by the utils/setup in HP-GRASS/src/CMD.
Choose most default answers and get done with it. The utils/setup creates a
file referred to as $(ARCH) (In my case this is HP) under
HP-GRASS/src/CMD/head. You now may have to edit this file.
My file looks something like this:
-----------------------------------8<----------------------------------------
CC = cc
ARCH = HP
GISBASE = /exthd2/GRASS4.1
UNIX_BIN = /usr/local/bin
DEFAULT_DATABASE = /grass4.1/grass.data
DEFAULT_DATABASE = /grass4.1/grass.data
DEFAULT_LOCATION = spearfish
COMPILE_FLAGS = +O3 +OS -Wp,-H200000
LDFLAGS = -s
XCFLAGS = -D_NO_PROTO
XLDFLAGS = -DSYSV
XINCPATH = -I/usr/include/X11R5
XMINCPATH = -I/usr/include/Motif1.2
XLIBPATH = -L/usr/lib/X11R5
XTLIBPATH = -L/usr/lib/X11R5
XMLIBPATH = -L/usr/lib/Motif1.2
XLIB = -lX11
XTLIB = -lXt
XMLIB = -lXm
XEXTRALIBS =
TERMLIB = -ltermlib
CURSES = -lcurses $(TERMLIB)
MATHLIB = -lm
# LIBRULE = ar ruv $@ $?
# LIBRULE = ar ruv $@ $?; ranlib $@
# LIBRULE = ar ruv $@ $?; ar ts $@
# LIBRULE = ar rc $@ `lorder $(OBJ) | tsort`
LIBRULE = ar ruv $@ $?
USE_TERMIO = -DUSE_TERMIO
USE_MTIO = -DUSE_MTIO
USE_FTIME = -DUSE_FTIME
DIGITFLAGS = -DUSE_SETPRIORITY
VECTLIBFLAGS =
GETHOSTNAME = -DGETHOSTNAME_OK
GETHOSTNAME = -DGETHOSTNAME_OK
-------------------------------------8<----------------------------------------
2. The next important step is related to the program module i.gensig:
I had problems compiling i.gensig under HP 755 series 9000. So I
commented the line (Thus not compiling it)
src.alpha/imagery/i.gensig
in HP-GRASS/src/CMD/lists/GRASS before I started the compilation process.
3. The next step is to follow every step as discussed in the Installation
GUIDE.
4. GRASS (not including XGRASS) compiled in approximately 55 minutes on a
HP755 series 9000 machine.
-------------------------------------------------------------------------------
###############################################################################
Begining of XGRASS compilation.
###############################################################################
-------------------------------------------------------------------------------
INSTALLING XGRASS
~~~~~~~~~~~~~~~~~
You may want to compile programs in every directory inside of
HP-GRASS/src/xgrass one at a time, because of the various compiler
error message that you may get. I started with the libes directory first (you
must compile libes first!). Remember there can be lot of hurdles to cross
before you get XGRASS to run.
1. In HP-GRASS/src/include comment the line that contains
1. In HP-GRASS/src/include comment the line that contains
#include <stdlib.h> line 28.
In the future if you see errors related to realloc, calloc or malloc, then
this has to do with stdlib.h and so you may either comment out those lines
temporaily in stdlib.h or comment out
#include <stdlib.h>
in the file that gives the error.
2. Add the following line to HP-GRASS/src/xgrass/libes/Xgi/Interact.c (line 31):#include <Xm/PrimitiveP.h>
3. Add
#include <Xm/ManagerP.h>
in line 36 in HP-GRASS/src/include/CaptionP.h and
in line 36 in HP-GRASS/src/include/MatrixP.h
4. Add
#include <Xm/PrimitiveP.h> below line 36 in
HP-GRASS/src/include/ClipP.h
5. In HP-GRASS/src/xgrass/display, I got the following link error messages:
/bin/ld: Unsatisfied symbols:
Max(code)
yyerrflag(data)
XAllocColor(code)
*** Error code 1
To remove the first error message add the following to main.c; say
in the begining:
MAX(a,b)
MAX(a,b)
{
return((a)>(b)?(a):(b));
}
To remove the second error message add the following to main.c; say in the
begining
int yyerrflag = 0;
The last error is due to improper instructions in the Gmakefile so
edit it such the line for LIBS = looks as follows:
LIBS = $(BOGUS) $(XGDLIB) $(XGILIB) $(XPMLIB) $(BOGUS) $(YYY) $(XXX)
6. In the /HP-GRASS/src/xgrass/pixmap
I got error messages as Make not being able to open /usr/lib/, Mostly this
has to do with the instructions in the Gmakefile. Here is what I did to
solve the problem.
cc -o /grass4.1/GRASS4.1/bin/pixmap -s -DSYSV OBJ.HP/PixEdit.o \ OBJ.HP/Pixmap.o OBJ.HP/Dialog.o /grass4.1/src/libes/LIB.HP/libgis.a\
/grass4.1/src/xgrass/libes/LIB.HP/libXpm.a -L/usr/lib/Motif1.2\ -lXm -L/usr/lib/X11R5 -lXmu -lXext -lXt -lX11 -lm
Basically if the instructions were set in the Gmakefile, this would not
have happened.
7. In /HP-GRASS/src/xgrass/xgaccess
comment the statement #include <stdlib.h> in xgaccess.c.
8. In /HP-GRASS/src/xgrass/xgbuffer
I got the following error message:
/bin/ld: Unsatisfied symbols:
Min (code)
Max (code)
*** Error code 1
To remove the error message I added the following code to xgbuffer.c,
somewhere in the begining.
Max(x, y)
int x, y;
{
return(((x) > (y)) ? (x) : (y));
}
Min(x, y)
int x, y;
{
return(((x) < (y)) ? (x) : (y));
}
9. In xgmapcalc comment out #include <stdlib.h> in xgmapcalc.c
10. I did not compile stuff under app-defaults.
11. The last step to have xgrass working is the run the following shell script
in the HP-GRASS/PROGRAM_DIR/etc/xclip directory (Where PROGRAM_DIR is the
directory which contains all the GRASS related programs, In my case it is
GRAS4.1 [look in the head file in the begining of this file).
Running this command will disable some of the help related features. But then
otherwise, you may not be able to run XGRASS at all. Be sure to back up your }
Min(x, y)
int x, y;
{
return(((x) < (y)) ? (x) : (y));
}
9. In xgmapcalc comment out #include <stdlib.h> in xgmapcalc.c
10. I did not compile stuff under app-defaults.
11. The last step to have xgrass working is the run the following shell script
in the HP-GRASS/PROGRAM_DIR/etc/xclip directory (Where PROGRAM_DIR is the
directory which contains all the GRASS related programs, In my case it is
GRAS4.1 [look in the head file in the begining of this file).
Running this command will disable some of the help related features. But then
otherwise, you may not be able to run XGRASS at all. Be sure to back up your
xclip directory if you do not feel comfortable about this.
-----------------------------------------8<------------------------------------
#!/bin/sh
for i in *
do
cp $i /tmp/$i
awk -F":" '{if($1 != "helpwidgetref") print $0}' /tmp/$i > $i
done
-----------------------------------------8<------------------------------------
###############################################################################
Nalneesh Gaur
ngaur at apwk01g3.abrfc.noaa.gov
River Forecast Center, Tulsa, Oklahoma.
###############################################################################
More information about the grass-user
mailing list