[Nut-upsdev] Bug#489742: Should build depend on GLib 2.14

Arnaud Quette aquette.dev at gmail.com
Mon Jul 7 19:46:30 UTC 2008


Hi Jordi,

2008/7/7 Jordi Mallach <jordi at debian.org>:
> Package: nut
> Version: 2.2.2-3
> Severity: important
>
> Hi Arnaud,
>
> I just tried backporting nut 2.2.2 to etch, and found the build fails
> with:
>
> x86_64-linux-gnu-gcc -I../include -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DINET6 -O2 -D_REENTRANT -DNETSNMP_USE_INLINE -Wall -Dlinux -I. -I/usr/include -I/usr/include/neon -O2 -Wall -Wsign-compare -s -o hald-addon-usbhid-ups usbhid-ups.o libhid.o libusb.o hidparser.o apc-hid.o belkin-hid.o cps-hid.o explore-hid.o liebert-hid.o mge-hid.o tripplite-hid.o  ../common/libcommon.a libnuthalmain.a -L/usr/lib /usr/lib/libusb.so /usr/lib/libhal.so -ldbus-glib-1 /usr/lib/libglib-2.0.so -ldbus-1 -lrt
> libnuthalmain.a(main-hal.o): In function `main':
> main-hal.c:(.text+0x7ee): undefined reference to `g_timeout_add_seconds'
> collect2: ld returned 1 exit status
> make[2]: *** [hald-addon-usbhid-ups] Error 1
>
> The hal driver is making use of a GLib function only available in GLib
> 2.14 and onwards.
>
> Hal's changelog reads:
>
> commit 0c9383d363c6dd29da64ed4383ab9819f7f1fc99
> Author: Sven Neumann <sven at gimp.org>
> Date:   Mon Mar 3 17:45:08 2008 -0500
>
>    use g_timeout_add_seconds() where appropriate if glib 2.14 is
>    available
>
>    As you probably know already, glib 2.14 introduced variants of the
>    g_timeout_add() functions that operate at whole second
>    granularity. This
>    allows timers to be grouped, which results in a more power and CPU
>    efficient behavior.
>
>    Attached is a patch that adds a configure check for GLib 2.14 and
>    changes some code (notably in the Linux specific parts) to use the new
>    functions when possible.
>
> Maybe nut could do the same.

sure, and it will now ;-)
I've just commit'ed a fix to the nut trunk (r1511), and will prepare a
dpatch for the upcoming upload of 2.2.2-5.

thanks for catching this,
Arnaud
-- 
Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
Free Software Developer - http://arnaud.quette.free.fr/



More information about the Nut-upsdev mailing list