[Nut-upsdev] [nut-commits] buildbot failure in Network UPS Tools on FreeBSD-i686

Arnaud Quette aquette.dev at gmail.com
Tue Jan 26 09:54:22 UTC 2010


Hi Arjen,

2010/1/25 Arjen de Korte <nut+devel at de-korte.org>:
> Citeren Arnaud Quette <aquette.dev at gmail.com>:
>
>> I'll have a look at it and get back with a suitable solution.
>> the current situation is that, if we don't define  _XOPEN_SOURCE (as
>> it is currently with AC_CHECK_DECLS()), then strptime won't be
>> available...
>>
>> so this test currently fails on my various Debian systems...
>
> I noticed that some BuildBots didn't complain about this, even though the
> strptime() function is not declared (see the config.log for openSUSE for
> instance). That made me wonder if there might be similarities between the
> ones complaining and the ones not complaining. Lo and behold, I found one!
> The BuildBots that don't complain, all have LIBNETSNMP_CFLAGS defined. Since
> the flags accumulate, these will be used for compiling *all* sources. After
> trying out a couple, it turns out that the -D_GNU_SOURCE enables the
> declaration that is needed. After checking out some autoconf macro's I think
> I found the right one:
>
> --------
>
> Macro: AC_USE_SYSTEM_EXTENSIONS
>
> This macro was introduced in Autoconf 2.60. If possible, enable extensions
> to C or Posix on hosts that normally disable the extensions, typically due
> to standards-conformance namespace issues. This should be called before any
> macros that run the C compiler. The following preprocessor macros are
> defined where appropriate:
>
>    _GNU_SOURCE
>        Enable extensions on GNU/Linux.
>    __EXTENSIONS__
>        Enable general extensions on Solaris.
>    _POSIX_PTHREAD_SEMANTICS
>        Enable threading extensions on Solaris.
>    _TANDEM_SOURCE
>        Enable extensions for the HP NonStop platform.
>    _ALL_SOURCE
>        Enable extensions for AIX 3, and for Interix.
>    _POSIX_SOURCE
>        Enable Posix functions for Minix.
>    _POSIX_1_SOURCE
>        Enable additional Posix functions for Minix.
>    _MINIX
>        Identify Minix platform. This particular preprocessor macro is
> obsolescent, and may be removed in a future release of Autoconf.
>
> --------
>
> I strongly feel that we should include this macro, in order to enable POSIX
> compliance (which we heavily depend on throughout the codebase already).

great. Until now, I was mixed between the Python configure.ac code,
that is somehow doing the above manually, and simply disabling
strptime if we were not sure to have it (an m4 macro would have been
needed), and possibly reimplementing strptime, which was not an option
for 1 small feature in 1 sub driver.

I'm currently checking to setup a small team in India to work around
QA and setting up a buildbot with missing OSs. I hope that this will
give us more visibility for such changes, though it won't be available
before some months.

> As far as I can see, the only drawback would be that it ups the requirements
> for Autoconf to 2.60. This might be a problem for people that build from SVN
> on older systems. Mitigating factor is that they could instead use the
> tarballs we provide on the BuildBot and that we should make available
> through the website as well then. For testing purposes, I added the above to
> configure.in, to see what happens. All of our BuildBots run a compatible
> version of Autoconf, so we don't shoot ourselves in the foot.
>
> Any thoughts?

if AC_USE_SYSTEM_EXTENSIONS solves this issue, and general improve the
system, then it's perfect.
it's also right that we have snapshots ([tarball] from the Buildbot)
available beside of the SVN, so that's not an issue.
@Charles: could we somehow make a stable permalink to the latest
available tarball?

thanks for your investigation here Arjen.

cheers,
Arnaud



More information about the Nut-upsdev mailing list