Followup:
gcc 2.95.2 on Sun Ultra 1 was the source of the compilation failures.
The Sparc 5 compiled nessus successfully running gcc 3.0.3. Upgraded gcc
(and removed binutils) and nessus compiled fine. One note: configure
using /usr/ccs/bin/as freezes at checking tcpip.h, but configure using
/usr/local/bin/as from gcc3.1 fails to determine if the include files is
valid and moves on. Final compilation seems fine.
Rockie
On Thu, 30 May 2002, R. Brockway wrote:
> Greetings -
>
> I have successfully compiled/installed/ran 1.2.0 on a Sparc 5 Solaris 8.
> Now a different machine Ultra 1 w/ Solaris 8 (both had many previous
> versions of nessus compiled over the last few years) nessus-libraries and
> libnasl install fine, but nessus-core gives this:
>
> totem2:11:58:30:/usr/local/nessus/nessus-core$ make
> cd nessus && make
> make[1]: Entering directory `/usr/local/nessus/nessus-core/nessus'
> gcc -g -O2 `sh ./cflags` -c preferences.c
> preferences.c: In function `preferences_new':
> preferences.c:153: `NESSUSD_SHAREDSTATEDIR' undeclared (first use in this
> function)
> preferences.c:153: (Each undeclared identifier is reported only once
> preferences.c:153: for each function it appears in.)
> preferences.c:153: parse error before string constant
> make[1]: *** [preferences.o] Error 1
> make[1]: Leaving directory `/usr/local/nessus/nessus-core/nessus'
> make: *** [client] Error 2
>
> So ...
>
> :153 preferences.c
> fprintf(f, "trusted_ca = %s/cacert.pem\n", NESSUSD_CA);
>
> cflags:
> echo " -I. -I/usr/local/nessus/nessus-core/include -I/usr/local/include
> -I/usr/local/nessus/nessus-core/src/libpcap -I/usr/local/include
> -I/usr/local/include/nessus -DENABLE_CRYPTO_LAYER
> -I/usr/local/include/peks -I/usr/local/include
> -DNESSUSD_CONFDIR=\"/usr/local/etc\"
> -DNESSUSD_STATEDIR=\"/usr/local/var/nessus\"
> -DNESSUSD_DATADIR=\"/usr/local/etc/nessus\"
> -DNESSUSD_LIBDIR=\"/usr/local/lib/nessus\"
> -DNESSUSD_PLUGINS=\"/usr/local/lib/nessus/plugins\"
> -DNESSUSD_REPORTS=\"/usr/local/lib/nessus/reports\" -DHAVE_CONFIG_H
> -DUSE_GTK -I. -I/usr/local/nessus/nessus-core/include
> -I/usr/local/include -I/usr/local/nessus/nessus-core/src/libpcap
> -I/usr/openwin/include -I/usr/local/lib/glib/include -I/usr/local/include
> -I/usr/local/lib/glib/include -I/usr/local/include -Igdchart0.94b
> -Igdchart0.94b/gd1.3"
>
> /usr/local/nessus/nessus-core/include/config.h:
> #define NESSUSD_CA NESSUSD_SHAREDSTATEDIR "/CA"
>
> totem2:12:06:40:/usr/local/nessus/nessus-core$ grep SHAREDSTATEDIR *
> config.status:s%@NESSUSD_SHAREDSTATEDIR@%${sharedstatedir}/nessus%g
> configure:NESSUSD_SHAREDSTATEDIR='${sharedstatedir}/nessus'
> configure:s%@NESSUSD_SHAREDSTATEDIR@%$NESSUSD_SHAREDSTATEDIR%g
> configure.in:NESSUSD_SHAREDSTATEDIR='${sharedstatedir}/nessus'
> configure.in:AC_SUBST(NESSUSD_SHAREDSTATEDIR)
> nessus.tmpl:NESSUSD_SHAREDSTATEDIR=${sharedstatedir}/nessus
> nessus.tmpl:NESSUS_DIRECTORIES="-DNESSUSD_CONFDIR=\"$(NESSUSD_CONFDIR)\""
> "-DNESSUSD_STATEDIR=\"$(NESSUSD_STATEDIR)\""
> "-DNESSUSD_DATADIR=\"$(NESSUSD_DATADIR)\""
> "-DNESSUSD_LIBDIR=\"${NESSUSD_LIBDIR}\""
> "-DNESSUSD_PLUGINS=\"${NESSUSD_PLUGINS}\""
> "-DNESSUSD_REPORTS=\"${NESSUSD_REPORTS}\""
> -DNESSUSD_SHAREDSTATEDIR=\"${NESSUSD_SHAREDSTATEDIR}\"
> nessus.tmpl.in:NESSUSD_SHAREDSTATEDIR=@NESSUSD_SHAREDSTATEDIR@
> nessus.tmpl.in:NESSUS_DIRECTORIES="-DNESSUSD_CONFDIR=\"$(NESSUSD_CONFDIR)\""
> "-DNESSUSD_STATEDIR=\"$(NESSUSD_STATEDIR)\""
> "-DNESSUSD_DATADIR=\"$(NESSUSD_DATADIR)\""
> "-DNESSUSD_LIBDIR=\"${NESSUSD_LIBDIR}\""
> "-DNESSUSD_PLUGINS=\"${NESSUSD_PLUGINS}\""
> "-DNESSUSD_REPORTS=\"${NESSUSD_REPORTS}\""
> -DNESSUSD_SHAREDSTATEDIR=\"${NESSUSD_SHAREDSTATEDIR}\"
>
>
> So as far as I can see configure is defining the variable
> NESSUSD_SHARDEDSTATEDIR and config.h should know about it but does not. I
> must be missing an enviroment variable because I did not have this problem
> compiling it on my SPARC5. Anything blatantly obvious here that I am
> missing? truss does not show much more info.
>
> Thanks
>
> Rockie
>
>
> --
> R. Brockway GCIH,GSEC,CSS1,CCNA,CCDA,SCSA,SCNA
> Network Security Specialist
> Ranum's Law - You can't solve social problems with software
>
--
R. Brockway GCIH,GSEC,CSS1,CCNA,CCDA,SCSA,SCNA
Network Security Specialist
Ranum's Law - You can't solve social problems with software