[libvirt] libvirt cannot be built with -Werror on RHEL6RC(x86_64)

Eric Blake eblake at redhat.com
Thu May 12 11:58:55 UTC 2011


On 05/12/2011 03:55 AM, Wen Congyang wrote:
> This test program is generated according to gettext.m4.
> It's a bug of old version gettext, and it's fixed in gettext-0.14.4.

Unfortunately, there are several other bugs in m4 files inherited as a
result of our choice of gettext.

> The following patch can fix the problem:
> 
>>From 95a02c3f6c594a623c01183067a1abd0d925d492 Mon Sep 17 00:00:00 2001
> From: Wen Congyang <wency at cn.fujitsu.com>
> Date: Thu, 12 May 2011 17:51:21 +0800
> Subject: [PATCH] build: fix building error with -Werror

-Werror is for development, but not for rpc builds (mainly because once
a tarball is created, we no longer can ensure that updates to the build
toolchain won't introduce new warnings that were not present when the
tarball was created, rendering -Werror on that tarball worthless).  This
may be a case of having to just say 'if it hurts, don't do it'.

> +++ b/configure.ac
> @@ -638,7 +638,10 @@ if test "$with_libvirtd" = "no" ; then
>    with_lxc=no
>  fi
>  if test "$with_lxc" = "yes" || test "$with_lxc" = "check"; then
> -    AC_TRY_LINK([#define _GNU_SOURCE
> +    AC_TRY_LINK([
> +        #ifndef _GNU_SOURCE
> +        #define _GNU_SOURCE
> +        #endif
>          #include <sched.h>

This hunk might be worthwhile; I'll look into it more later today.

>      ], [
>          unshare (1);
> @@ -1981,7 +1984,7 @@ dnl Enable building libvirtd?
>  AM_CONDITIONAL([WITH_LIBVIRTD],[test "x$with_libvirtd" = "xyes"])
>  
>  dnl Check for gettext
> -AM_GNU_GETTEXT_VERSION([0.14.1])
> +AM_GNU_GETTEXT_VERSION([0.14.4])

But this hunk would likely break out-of-the-box building of libvirt on
RHEL 5 and CentOS, if they don't have new enough gettext.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110512/955fdacd/attachment-0001.sig>


More information about the libvir-list mailing list