Building libvirtd with CFLAGS=-g (and not -O) failed:
../src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_driver.o): In function
`qemudExtractMonitorPath':
/home/meyering/w/co/libvirt/src/qemu_driver.c:549: undefined reference to `c_isspace'
../src/.libs/libvirt_driver_qemu.a(libvirt_driver_qemu_la-qemu_driver.o): In function
`qemudDetectVcpuPIDs':
/home/meyering/w/co/libvirt/src/qemu_driver.c:702: undefined reference to `c_isspace'
collect2: ld returned 1 exit status
make[2]: *** [libvirtd] Error 1
make[2]: Leaving directory `/home/meyering/w/co/libvirt/qemud'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/meyering/w/co/libvirt'
make: *** [all] Error 2
Here's the fix:
From 7b963a92060c4591ce5c89f85301c35655056557 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Thu, 11 Dec 2008 18:43:12 +0100
Subject: [PATCH] build: avoid libvirtd link failure with CFLAGS=-g
* qemud/Makefile.am (libvirtd_LDADD): Add gnulib's libgnu.la last.
Otherwise, building with -g (no inlining) would fail due to a use
of c_isspace in libvirt_driver_qemu.a, which used to followed
libgnu.a in the link command.
---
qemud/Makefile.am | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/qemud/Makefile.am b/qemud/Makefile.am
index 8cb0847..ea89d06 100644
--- a/qemud/Makefile.am
+++ b/qemud/Makefile.am
@@ -93,8 +93,7 @@ libvirtd_LDADD = \
$(LIBXML_LIBS) \
$(GNUTLS_LIBS) \
$(SASL_LIBS) \
- $(POLKIT_LIBS) \
- ../gnulib/lib/libgnu.la
+ $(POLKIT_LIBS)
if ! WITH_DRIVER_MODULES
if WITH_QEMU
@@ -244,6 +243,9 @@ uninstall-init:
endif # DBUS_INIT_SCRIPTS_RED_HAT
+# This must be added last.
+libvirtd_LDADD += ../gnulib/lib/libgnu.la
+
endif # WITH_LIBVIRTD
CLEANFILES = libvirtd.init
--
1.6.0.4.1044.g77718