[collectd] collectd 4.6.1 make fails on FreeBSD

Ulf Zimmermann ulf at openlane.com
Sun Apr 19 09:45:55 CEST 2009


> -----Original Message-----
> From: collectd-bounces at verplant.org [mailto:collectd-
> bounces at verplant.org] On Behalf Of Florian Forster
> Sent: Tuesday, February 24, 2009 3:36 AM
> To: Boogie
> Cc: collectd at verplant.org
> Subject: Re: [collectd] collectd 4.6.1 make fails on FreeBSD
> 
> Hi Boogie,
> 
> On Tue, Feb 24, 2009 at 01:37:32AM +0300, Boogie wrote:
> > I've tried to build collectd 4.6.1 on my FreeBSD box today, but it
> failed:
> >
> > client.c: In function 'lcc_getval':
> > client.c:681: error: 'EILSEQ' undeclared (first use in this function)
> 
> argh! This is especially annoying, since I has `EPROTO' there first,
> but
> removed it because OpenBSD didn't define it (EPROTO is in some XSR
> extension to POSIX 2001 or something). I've chosen `EILSEQ' instead,
> because it's in C99..
> 
> Oh well, thanks for the pointer, I'll add appropriate preprocessor
> checks..

On FreeBSD EILSEQ is defined in /usr/include/errno.h, but only if no _POSIX_SOURCE is set.

Was just trying to build 4.6.2 on FreeBSD (an older 6.1 machine).

> 
> > client.c: In function 'lcc_putval':
> > client.c:752: warning: implicit declaration of function 'isnanf'
> > client.c:752: warning: incompatible implicit declaration of built-in
> function 'isnanf'
> 
> That's weird.. According to C99, `isnan' is exported by <math.h> which
> is loaded in that file. That the compiler reports `isnanf' here is a
> sign that the libc already did some magic. This feels like a bug in
> FreeBSD's libc, to be honest..
> 
> Could you please provide the output of the following grep:
> 
>   $ grep NAN src/config.h | egrep '^#'
> 
> > I've tried to configure it without almost any plugins, but nothing
> > changed.
> 
> Hm, there currently isn't a configure flag to disable the client
> libarary (the problem is not in a plugin..). I'll add that, so that you
> can do something like `./configure --disable-libcollectdclient'.
> 
> > Has anybody (successfully or not) compiled 4.6.1 on FreeBSD?

isnanf is only defined if __BSD_VISIBLE is set (from /usr/include/math.h). 

With collectd 4.6.2 I had to add "#define __BSD_VISIBLE 1" on src/libcollectdclient/client.c and src/bind.c

> 
> Not FreeBSD, but Mac OS X works for what it's worth. Don't know how
> similar exactly the FreeBSD and Mac OS X userland is, but as far as I
> know there is *some* similarity ;)

Florian, if you want I can setup a virtual machine with FreeBSD on it for you to test things.


> 
> Regards,
> -octo
> --
> Florian octo Forster
> Hacker in training
> GnuPG: 0x91523C3D
> http://verplant.org/



More information about the collectd mailing list