[hobbit] xymon-4.3.0-beta2 Compile Errors

Dominique Frise dominique.frise at unil.ch
Thu May 28 07:30:53 CEST 2009


James Wade wrote:
> The CSW packages are the same ones from Solaris Freeware,
> just in a common directory we use here.
> 
> I would not know where that variable would be in other files. 
> Is there a code fix for this on Solaris platforms?
> 
> Thanks...James
> 
> -----Original Message-----
> From: Dominique Frise [mailto:dominique.frise at unil.ch] 
> Sent: Wednesday, May 27, 2009 2:35 PM
> To: hobbit at hswn.dk
> Subject: Re: [hobbit] xymon-4.3.0-beta2 Compile Errors
> 
> James Wade wrote:
>>> Try commenting the definition of "S_NONE" in /usr/include/sys/signal.h
> and
>>> recompile.
>>> You may get an other error while compiling setup-newfiles.c; see > >
>> http://www.hswn.dk/hobbiton/2009/05/msg00028.html
>>> for a fix.
>> Tired it, but I get the same error.
>>
>> James
>>
>>
>> gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I.
>> -I/home/hobbit/src/hobbit/xymon-4.3.0-beta2/include -I/usr/local/include
> -I.
>> -I../include  -I/usr/local/include -c -o matching.o matching.c
>> gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I.
>> -I/home/hobbit/src/hobbit/xymon-4.3.0-beta2/include -I/usr/local/include
> -I.
>> -I../include    -c -o md5.o md5.c
>> gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I.
>> -I/home/hobbit/src/hobbit/xymon-4.3.0-beta2/include -I/usr/local/include
> -I.
>> -I../include    -c -o memory.o memory.c
>> gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I.
>> -I/home/hobbit/src/hobbit/xymon-4.3.0-beta2/include -I/usr/local/include
> -I.
>> -I../include    -c -o misc.o misc.c
>> In file included from
>> /home/hobbit/src/hobbit/xymon-4.3.0-beta2/include/libbbgen.h:42,
>>                  from misc.c:34:
>> /home/hobbit/src/hobbit/xymon-4.3.0-beta2/include/../lib/eventlog.h:38:
>> error: syntax error before numeric constant
>> make[1]: *** [misc.o] Error 1
>> make[1]: Leaving directory `/home/hobbit/src/hobbit/xymon-4.3.0-beta2/lib'
>> make: *** [lib-build] Error 2
>>
>>
>>
>>
>> To unsubscribe from the hobbit list, send an e-mail to
>> hobbit-unsubscribe at hswn.dk
>>
>>
> This solution worked for us when compiling on a Solaris 9 box with only 
> a few Solaris freeware packages installed. (we do not use CSW packages).
> The problem is Xymon tries to define S_NONE as an enum in enventlog.h, 
> but this constant is already defined in /usr/include/sys/signal.h.
> Maybe S_NONE is defined somewhere else in your environement?
> 
> Dominique
> 
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
> 
> 
> 
> 
> 
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
> 
>
Looking again at your all log, there are other weird error messages (ld 
not found) and configure settings.

We have:
Solaris 9 4/04 (fully recommended/security patched)
GNU Make 3.80
gcc version 3.3.2

After commenting out "S_NONE" define in /usr/include/sys/signal.h, here 
below the steps we used for building a client.

[super at uldns1 xymon-4.3.0-beta2]# MAKE=gmake ./configure.client

Configuration script for Xymon client
...
Configuration complete - now run gmake -s (GNU make) to build the tools

[super at uldns1 xymon-4.3.0-beta2]# gmake
MAKE="gmake" CC="gcc" CFLAGS="-g -O2 -Wall -Wno-unused -D_REENTRANT 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSunOS -I. -I`pwd`/include 
-DCLIENTONLY=1" LDFLAGS="" `pwd`/build/genconfig.sh
Checking for socklen_t
Checking for snprintf
Checking for vsnprintf
Checking for rpc/rpcent.h
Checking for sys/select.h
Checking for u_int32_t typedef
Checking for PATH_MAX definition
Checking for SHUT_RD/WR/RDWR definitions
Checking for strtoll()
config.h created
...
gcc -o setup-newfiles -g -O2 -Wall -Wno-unused -D_REENTRANT 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSunOS -I. 
-I/soft/pub/xymon-4.3.0-beta2/include -DCLIENTONLY=1 -Wl,-R 
setup-newfiles.c ../lib/hobbitclient.a  -lresolv -lsocket -lnsl
Undefined                       first referenced
  symbol                             in file
main 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/crt1.o
ld: fatal: Symbol referencing errors. No output written to setup-newfiles
collect2: ld returned 1 exit status
gmake[1]: *** [setup-newfiles] Error 1
gmake[1]: Leaving directory `/soft/pub/xymon-4.3.0-beta2/build'
gmake: *** [build-build] Error 2

[super at uldns1 xymon-4.3.0-beta2]# cd build
[super at uldns1 build]# gcc -o setup-newfiles -g -O2 -Wall -Wno-unused 
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSunOS -I. 
-I/soft/pub/xymon-4.3.0-beta2/include -DCLIENTONLY=1 setup-newfiles.c 
../lib/hobbitclient.a  -lresolv -lsocket -lnsl

[super at uldns1 build]# cd ..
[super at uldns1 xymon-4.3.0-beta2]# gmake
CC="gcc" CFLAGS="-g -O2 -Wall -Wno-unused -D_REENTRANT 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSunOS -I. -I`pwd`/include 
-DCLIENTONLY=1" LDFLAGS="" OSDEF="-DSunOS" RPATHOPT="-Wl,-R" 
PCREINCDIR="" SSLFLAGS="" SSLINCDIR="" SSLLIBS="" NETLIBS="-lresolv 
-lsocket -lnsl" LIBRTDEF="" BBTOPDIR="/soft/pub/BB/hobbit" BBLOGDIR="" 
BBHOSTNAME="" BBHOSTIP="130.223.27.23" BBHOSTOS="" LOCALCLIENT="no" 
gmake -C lib client
...
../build/bb-commands.sh >>hobbitclient.cfg
cat clientlaunch.cfg.DIST | sed -e 's!@CLIENTFLAGS@!!g' >clientlaunch.cfg
gmake[1]: Leaving directory `/soft/pub/xymon-4.3.0-beta2/client'

Build complete. Now run 'gmake install' as root

Hope this helps.

Dominique



More information about the Xymon mailing list