[collectd] compiling on solaris 9: 3.11.7 and 4.1.2

Florian Forster octo at verplant.org
Fri Oct 26 11:04:12 CEST 2007


Hi Samuel,

On Wed, Oct 10, 2007 at 03:38:38PM -0700, samuel gipe wrote:
> Thought I would post my experience with compiling collectd on solaris
> 9 using gcc.  If anyone has had better experience, let me know please.

out of curiosity I did compile collectd 4.1.3 under Solaris 10 and with
the Sun CC yesterday. I found a bug in the configure script when the
rrdtool library was in a non-standard place, but other than that it
worked without any problem. To configure the package I used:
 $ ./configure --enable-debug CC=cc CXX=CC \
   CFLAGS="-xarch=v9 -xO5 -D_POSIX_PTHREAD_SEMANTICS"

> Compiling collectd-4.1.2 fails on solaris 9 with an strerror_r related
> error (shown below). 
> collectd wants strerror_r, a lib available for linux and solaris 10,
> but not for solaris 9 (that I know of).

I've just implemented a workaround for this: When `strerror_r' isn't
defined, `sstrerror' uses the non-thread-safe `strerror' and serializes
access to it. This surely isn't bullet-proof, but it should do the trick
in most cases.. This change will be in the next release of collectd.

> Its seems like there are measures provided for in config.h to deal
> with the availability of strerror_r, but something doesn't seem to be
> working.

Actually, so far the build process simply checks for the GNU version of
`strerror_r' and handles it separately, since the GNU guys seem to value
usability higher than portability :/

> note: For both 4.1.2 and 3.11.7, enabling the above modules causes
> make to fail (for at least some of the modules, possibly all...Not
> needing these modules, I didn't spend a lot of time troubleshooting).

Version 4.1 and later automatically disables the plugins with unmet
dependencies. If you use `-enable-foo' to force the building of that
plugin you're out on thin ice and absolutely on your own.

With version 3.11 _all_ plugins should build - although the ones with
unmet dependencies should only provide definitions for RRD-files. If
those fail please feel free to send in a bugreport..

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20071026/8a0e8528/attachment.pgp 


More information about the collectd mailing list