[collectd] Hi, and solaris 8 compilation problems

Aurélien Reynaud collectd at wattapower.net
Thu Apr 29 21:33:30 CEST 2010


Le jeudi 29 avril 2010 à 10:06 +0200, Florian Forster a écrit :
> > - Solaris 8 has strtok_r(), but does not declare it by default. You
> > must at compile time define __EXTENSIONS__, or _REENTRANT or
> > _POSIX_SOURCE >= 199506L. Running ./configure --enable-standards may
> > solves this but raises a ton of other problems...
> 
> Actually, there is a configure check specifically for Solaris / this
> problem. It checks whether or not "_REENTRANT" is required for
> strtok_r(3). If you look for "strtok_r" in "configure.in" you should
> easily find it.
> 
> I'd rather fix that check then setting "__EXTENSIONS__" when on Solaris.
> Could you take a look at the file "config.log" generated by the
> configure script and try to find out why that check failed?

Florian,


you are right, this check exists but doesn't work as expected, and
that's why I missed it.

The test program produces a warning about strtok_r being undeclared, but
the check succeeds nevertheless because warnings don't cause the
compilation to fail (gcc returns 0).

The problem is that -Werror is not in the CFLAGS at the time of the
test, but it is when collectd is compiled. So the check succeeds but the
actual compilation aborts.

I am working on improving the check and will provide a new patch
shortly...


Regards,

Aurélien Reynaud






More information about the collectd mailing list