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

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

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

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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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