[Xymon] Compiling Xymon on Solaris 10 - symbol `main' is multiply-defined
Juergen Arndt
arndt02 at googlemail.com
Sat Jul 14 22:31:28 CEST 2012
Hi all,
I'm trying to build and install (and finally package) Xymon 4.3.7 on Solaris 10 with Sunstudio 12. The actual build runs through, but when it comes to "gmake install" I run into the following error:
gmake[1]: Entering directory `/home/ja/opencsw/xymon/trunk/work/build-isa-sparcv8plus/xymon-4.3.7/xymonnet'
cc -g -O -D_REENTRANT -Dgeneric -I. -I`pwd`/include -I/opt/csw/include -o xymonnet xymonnet.o contest.o httptest.o httpresult.o ldaptest.o dns.o dns2.o httpcookies.o ../lib/libxymon.a libcares.a
ld: fatal: symbol `main' is multiply-defined:
(file xymonnet.o type=FUNC; file contest.o type=FUNC);
ld: fatal: symbol `__fsr_init_value' is multiply-defined:
(file xymonnet.o type=NOTY; file contest.o type=NOTY);
ld: fatal: File processing errors. No output written to xymonnet
gmake[1]: *** [xymonnet] Error 1
As far as I understood (I'm not really an programming expert), both xymonnet.o and contest.o has a main function compiled in. I was wondering, why an object file should have a main function. I took a look into the code and found an "#ifdef STANDALONE" directive in contest.c, enclosing the main function.
As the Makefile makes a difference between the targets 'contest' and contest.o' by calling the compiler with '-DSTANDALONE' for 'contest', everything should be fine and 'contest.o' shouldn't have a main function, but nevertheless I get the error above.
Does someone have a solution or an idea?
Regards,
Juergen
--
Juergen Arndt
More information about the Xymon
mailing list