So I cranked up my sparcv9 gcc 3.0 build environment, ran bootstrap and tried to built gmetad just now off of a circa-15-minutes-old CVS snapshot of the monitoring core.

Problems, in the order I've run into them:

1. Say, the gmetad dir didn't build automatically. Oh well, I'll just cd in and take care of that. 2. Complaints during make about not being able to find rrd.h. Hmm, I thought there was a test for that. Oh well, I'll spackle the old gmetad RRD include/library into /usr on this box - I use it all the time anyway.
3.  ld fails when linking gmetad, complaining of multiply-defined symbols
in libganglia.a and librrd.a:
gcc -I../lib -I../gmond -O2 -D__EXTENSIONS__ -D_POSIX_C_SOURCE=199506L -DHAVE_STRERROR -o gmetad gmetad.o cmdline.o data_thread.o server.o process_xml.o rrd_helpers.o conf.o metric_hash.o xml_hash.o ../lib/.libs/libganglia.a /www/gmetad/lib/librrd.a -lm -lm -lm -lm -lm -ldl -lkvm -lkstat -lresolv -lnsl -lnsl -lsocket -lpthread
ld: fatal: symbol `optind' is multiply-defined:
(file ../lib/.libs/libganglia.a(getopt.o) and file /www/gmetad/lib/librrd.a(getopt.o));
ld: fatal: symbol `getopt' is multiply-defined:
(file ../lib/.libs/libganglia.a(getopt.o) and file /www/gmetad/lib/librrd.a(getopt.o));
ld: fatal: symbol `optopt' is multiply-defined:
(file ../lib/.libs/libganglia.a(getopt.o) and file /www/gmetad/lib/librrd.a(getopt.o));
ld: fatal: symbol `_getopt_internal' is multiply-defined:
(file ../lib/.libs/libganglia.a(getopt.o) and file /www/gmetad/lib/librrd.a(getopt.o));
ld: fatal: symbol `opterr' is multiply-defined:
(file ../lib/.libs/libganglia.a(getopt.o) and file /www/gmetad/lib/librrd.a(getopt.o));
ld: fatal: File processing errors. No output written to gmetad
collect2: ld returned 1 exit status
make: *** [gmetad] Error 1

Boom.  What's librrd doing with getopt linked in?  That seems kinda weird.
I'll try building a plain librrd.a (outside of the old gmetad package) and see if I still get these errors.

Haven't tried SGI yet, I'd kinda like to see this working on my monitoring front-end box first. ;)


Reply via email to