how typical I found the answer 5 mins after sending the message:
The problem was I have not changed the C pre-processor from:
cc -E
to:
gcc -E
I did not have the sun compiler I think changing it to
cpp
would have solved the problem too
Original message:
Subject: Compiling tripwire with gcc
To: sun-managers@ra.mcs.anl.gov
Date: Mon, 24 Feb 1997 15:24:50 +0000 (GMT)
From: Robert Bannocks <R.Bannocks@kingston.ac.uk>
I am compiling tripwire 1-1 with GCC on solaris2.5.1 get the following error:
bash# make
(cd aux; make CC=gcc CFLAGS="-O -ansi" \
LDFLAGS="" CPP="cc -E" SHELL=/bin/sh all)
(cd src; make CC=gcc CFLAGS="-O -ansi" LIBS="" \
LDFLAGS="" CPP="cc -E" SHELL=/bin/sh all)
gcc -O -ansi -c config.parse.c
In file included from ../include/tripwire.h:60,
from config.parse.c:42:
.../include/../include/inode.h:9: warning: redefinition of `mode_t'
/usr/local/lib/gcc-lib/i386-unknown-solaris2.5.1/2.7.2/include/sys/types.h:170: warning: `mode_t' previously declared here
.../include/../include/inode.h:10: warning: redefinition of `ino_t'
/usr/local/lib/gcc-lib/i386-unknown-solaris2.5.1/2.7.2/include/sys/types.h:180: warning: `ino_t' previously declared here
.../include/../include/inode.h:11: warning: redefinition of `nlink_t'
/usr/local/lib/gcc-lib/i386-unknown-solaris2.5.1/2.7.2/include/sys/types.h:178: warning: `nlink_t' previously declared here
.../include/../include/inode.h:12: warning: redefinition of `uid_t'
/usr/local/lib/gcc-lib/i386-unknown-solaris2.5.1/2.7.2/include/stdlib.h:51: warning: `uid_t' previously declared here
.../include/../include/inode.h:13: warning: redefinition of `gid_t'
/usr/local/lib/gcc-lib/i386-unknown-solaris2.5.1/2.7.2/include/sys/types.h:177: warning: `gid_t' previously declared here
.../include/../include/inode.h:14: conflicting types for `off_t'
/usr/local/lib/gcc-lib/i386-unknown-solaris2.5.1/2.7.2/include/sys/types.h:34: previous declaration of `off_t'
config.parse.c: In function `configfile_read':
config.parse.c:129: warning: assignment makes pointer from integer without a cast
*** Error code 1
make: Fatal error: Command failed for target `config.parse.o'
Current working directory /opt1/src/local/tripwire-1.1/src
*** Error code 1
make: Fatal error: Command failed for target `all'
I cannot fatham this. Have I installed gcc wrongly or not
configured tripwire correctly? I followed the provided
conf-svr4.h for solaris2. Does anyone know what is wrong?
Other suggestions included:
Don't use -ansi. ANSI conformance requires the includes files that are
listed in the ANSI standard to remove all non-ANSI definitions that exist
in the name space accessible for C programs.
Casper
Thanks
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:47 CDT