Re: [libvirt] [PATCH] build: avoid libvirtd link failure with CFLAGS=-g

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 11, 2008 at 06:46:16PM +0100, Jim Meyering wrote:
> 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@xxxxxxxxxx>
> 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.

ACK

> ---
>  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
> +

Can you mention why this need to be added last in the comment so I don't
accidentally revert it again in the future.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]