[collectd] 4.2.1 on Solaris 10

Christophe Kalt collectd at klb.taranis.org
Wed Dec 5 15:40:20 CET 2007


Sorry, no patches, i'm a bit out of time;  hopefully, the
following will still be useful.  This was on Solaris x86, i'll
only get to SPARC once i figure out how i'm going to get
things working.

Various plugins simply fail to build.  I eventually disabled a
bunch out of furstration.  It'd be nice if they were
automatically disabled as non-Solaris test/ported/working.

	 gcc -DHAVE_CONFIG_H -I. -I. -I. -I/z/pkgs/collectd-4.2.1/include -I/usr/sfw/include -Wall -Werror -L/z/pkgs/collectd-4.2.1/lib -L/usr/
	sfw/lib -MT apcups.lo -MD -MP -MF .deps/apcups.Tpo -c apcups.c  -fPIC -DPIC -o .libs/apcups.o
	In file included from collectd.h:26,
			 from apcups.c:34:
	config.h:832:1: error: "_FILE_OFFSET_BITS" redefined
	In file included from /usr/include/iso/stdlib_iso.h:30,
	*** Error code 1
			 from /usr/include/stdlib.h:18,
			 from apcups.c:32:
	/z/pkgs/gcc-4.1.2/lib/gcc/i386-pc-solaris2.10/4.1.2/include/sys/feature_tests.h:197:1: error: this is the location of the previous defi
	nition
	make: Fatal error: Command failed for target `apcups.lo'
	*** Error code 1

This one appears in multiple plugins:

	 gcc -DHAVE_CONFIG_H -I. -I. -I. -I/z/pkgs/collectd-4.2.1/include -I/usr/sfw/include -Wall -Werror -L/z/pkgs/collectd-4.2.1/lib -L/usr/
	sfw/lib -MT email.lo -MD -MP -MF .deps/email.Tpo -c email.c  -fPIC -DPIC -o .libs/email.o
	email.c: In function 'open_connection':
	*** Error code 1
	email.c:548: error: too many arguments to function 'getgrnam_r'


Now, more tricky is this:

	 gcc -DHAVE_CONFIG_H -I. -I. -I. -I/z/pkgs/collectd-4.2.1/include -I/usr/sfw/include -Wall -Werror -L/z/pkgs/collectd-4.2.1/lib -L/usr/
	sfw/lib -MT swap.lo -MD -MP -MF .deps/swap.Tpo -c swap.c  -fPIC -DPIC -o .libs/swap.o
	swap.c: In function 'swap_read':
	swap.c:195: error: storage size of 'ai' isn't known
	cc1: warnings being treated as errors
	swap.c:197: warning: implicit declaration of function 'swapctl'
	swap.c:197: error: 'SC_AINFO' undeclared (first use in this function)
	swap.c:197: error: (Each undeclared identifier is reported only once
	swap.c:197: error: for each function it appears in.)
	swap.c:195: warning: unused variable 'ai'
	*** Error code 1
	make: Fatal error: Command failed for target `swap.lo'
	*** Error code 1

Looking into it shows that configure failed the test for sys/swap.h:

	configure:23197: checking for sys/swap.h
	configure:23225: gcc -c -L/z/pkgs/collectd-4.2.1/lib -L/usr/sfw/lib -I/z/pkgs/collectd-4.2.1/include -I/usr/sfw/include conftest.c >&5
	In file included from conftest.c:66:
	/usr/include/sys/swap.h:50:2: error: #error "Cannot use swapctl in the large files compilation environment"

That's really furstrating (for me anyhow).  The whole reason i'm
here in the first place is to get LFS working to silence these:
	collectd[1554]: statv?fs failed: Value too large for defined data type

collectd 4.2.1 seems to enable LFS automagically by default
(which is as it should be), but this basically guarantees
you'll never have a working swap plugin on Solaris (where LFS
is very old news).  I think reverting to reading the output
from "swap -s" is probably your best bet, not sure how to best
do this within the current framework.  Ideally, i'd like to
see this done transparently for the user, of course, it can
easily be done via the exec plugin (well, once i port that
one).

Thoughts?

Christophe



More information about the collectd mailing list