Solaris 2.4 compiling

joe leone joe.leone at per.dwe.csiro.au
Tue Jun 20 08:00:00 EDT 1995



Hi all,
There has been some discussion on compiling GRASS on Solaris during the last 
few months. I have tried to compile GRASS on Solaris 2.4 and have come across 
some errors. Some of these have been mentioned before, but I did not find a 
response or solution. The first was regarding Mike Camann's posting. I have the
a similar error ( include message 2).
Is the solution sugested by Mike the way to go?

I continued the compilation with the -skip option and came across the error
message 
with libgis.a. I run into the same error if I did another -skip.

The header file has the same options as that posted by Martijn (14-jun-1995).
I also tried compiling with -fwritable-strings in the CFLAGS as sugested by
Darrel
in a Apr 95 posting.

I am using Gcc 2.7.0 and have not installed any extra X11 stuff.

Any Ideas what is gong wrong???

Thank you
Joe 
Joe.leone at per.dwe.csiro.au


********Begin include message 1*******


../fonts/romanc.hmp
../fonts/romancs.hmp
../fonts/romand.hmp
../fonts/romans.hmp
../fonts/romant.hmp
../fonts/scriptc.hmp
../fonts/scripts.hmp
rm -f splitfont font_2_bin font.bin

GISGEN: src/front.end - Tue Jun 20 14:31:33 WST 1995

#################################################################
/home/joe/src/grass4.1.5/src/front.end
  mkdir OBJ
  make -f OBJ/make.rules

rm -f OBJ/main.o
gcc -O  -I/home/joe/src/grass4.1.5/src/include  -c main.c
main.c:159: warning: `warn' was declared implicitly `extern' and later `static'
mv main.o OBJ/main.o
gcc -s -o /usr/local/grass4.1.5/etc/front.end OBJ/main.o /home/joe/src/grass4.1
.
5/src/libes/LIB/libgis.a
gcc: /home/joe/src/grass4.1.5/src/libes/LIB/libgis.a: No such file or directory
make: *** [/usr/local/grass4.1.5/etc/front.end] Error 1
GISGEN failure at STEP: src/front.end

*********end include message 1*********





********Begin include message 2*******

gcc -O -DGETHOSTNAME_UNAME -I/home/joe/src/grass4.1.5/src/include  -c ialloc.c
mv ialloc.o OBJ/ialloc.o
rm -f OBJ/index.o
gcc -O -DGETHOSTNAME_UNAME -I/home/joe/src/grass4.1.5/src/include  -c index.c
mv index.o OBJ/index.o
rm -f OBJ/intr_char.o
gcc -O -DGETHOSTNAME_UNAME -I/home/joe/src/grass4.1.5/src/include  -c intr_char
.
c
intr_char.c: In function `G_intr_char':
intr_char.c:17: storage size of `buf' isn't known
intr_char.c:19: `TIOCGETC' undeclared (first use this function)
intr_char.c:19: (Each undeclared identifier is reported only once
intr_char.c:19: for each function it appears in.)
make: *** [OBJ/intr_char.o] Error 1
GISGEN failure at STEP: src/libes/gis




********END include message 2*******



********Begin include message 3*******

Date: Thu, 30 Mar 1995 17:38:40 -0500
From: mike camann <camann at pick.uga.edu>
Reply to: grassu-list at max.cecer.army.mil
Sender: grass-lists-owner at moon.cecer.army.mil.
Reply-To: grassu-list at moon.cecer.army.mil.
Precedence: Bulk
To: grassu-list at max.cecer.army.mil
Cc: grassp-list at max.cecer.army.mil
Subject: Compilation problem (Solaris)

Sorry if you get this twice, but I posted it to grassp-list as well as
grassu.

When compiling GRASS 4.1 (update 5) on a Sun SPARC 20 under Solaris 2.4
(? it's SunOS 5.4) I get the following compiler error shortly after
starting GISGEN:

cc -O -Xs -DGETHOSTNAME_UNAME -I/gis-soft/grass4/src/include  -c
"intr_char.c", line 17: incomplete struct/union/enum tchars: buf
"intr_char.c", line 19: undefined symbol: TIOCGETC
"intr_char.c", line 20: undefined struct/union member: t_intrc
cc: acomp failed for intr_char.c
make: *** [OBJ/intr_char.o] Error 2
GISGEN failure at STEP: src/libes/gis

Take a look at $GIS/src/libes/src/intr_char.c.  The incomplete struct
and the undefined symbols refer to definitions that should be found in
<sgtty.h> when  #ifdef USE_TERMIO is undefined, as is the case on my
system. The <sgtty.h> file in SunOS 5.4 is VASTLY different, however,
from the one in SunOS 4.1.1, where I have successfully compiled GRASS
many times (and where this particular preprocessor directive works
fine).  That's /usr/include/sgtty.h.  Under SunOS 4.1.1, tchars and
TIOCGETC are actually defined in <sys/ttold.h>, which is #included in
<sgtty.h>; t_intrc is an element of (struct) tchars.  These definitions
are entirely missing in the SunOS 5.4 version of <sgtty.h> which does
not #include <sys/ttold.h>.
Am I correct in assuming that this is the root of the problem?  Should
I add #include <sys/ttold.h> to the preprocessor directives in
intr_char.c?  If so, why wasn't this done in the source code prior to
release?  The fact that it wasn't makes me suspect that this is not a
good solution.

Can anyone who has successfully compiled GRASS under Solaris 5.4 tell
me how to fix this?  Are there any other surprises in store?


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%

Michael Camann                  camann at dial.pick.uga.edu
Department of Entomology        camann at sparc.ecology.uga.edu
University of Georgia           (706) 542-2303 voice
Athens, GA 30602                (706) 542-2640 FAX





********End include message 3******






More information about the grass-user mailing list