All of lore.kernel.org
 help / color / mirror / Atom feed
* libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] Problem compiling Xen 4.2 from sources)
       [not found] <20121002163136.GA5378@intersect>
@ 2012-10-02 16:46 ` Ian Campbell
  2012-10-02 16:50   ` [Xen-users] libutil.h moved to bsd/libutil.h (Was: " Ian Campbell
  2012-10-03  8:31   ` libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] " Roger Pau Monné
  0 siblings, 2 replies; 6+ messages in thread
From: Ian Campbell @ 2012-10-02 16:46 UTC (permalink / raw)
  To: Giorgio Mossa
  Cc: xen-users@lists.xen.org, Roger Pau Monne, Ian Jackson, xen-devel

(Adding some CCs)
On Tue, 2012-10-02 at 17:31 +0100, Giorgio Mossa wrote:
> Hello everyone,
> I'm working on an Ubuntu 12.04 and I wanted to test
> Xen 4.2 (official repository offer just version 4.1),
> so I've downloaded the source tarball from the site,
> followed the instruction in the readme but when compiling
> I'm getting the following error:
> 
>  In file included from libxl_bootloader.c:21:0:
>  /usr/include/libutil.h:33:2: error: #warning "Deprecated header, use <bsd/libutil.h> or libbsd-overlay.pc instead." [-Werror=cpp]
>  cc1: all warnings being treated as errors
>  make[3]: *** [libxl_bootloader.o] Error 1
> 
> could anyone explain how to solve this problem, without disabling the warning/errors compilation options?

Looks like someone has decided to move this header from /usr/include
to /usr/include/bsd and leave behind a #warning in the old location,
which has broken the way we do things.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640895 seems to relate
to the fallout from this.

I'm not sure when the include of libutil is needed, it's not mentioned
in the Linux man pages and on Linux neither of the functions we purport
to need from it are actually present. Perhaps it's a BSD only thing?

Probably we need to check for bsd/libutil.h in preference to libutil.h
although the resolution of #640895 suggests that what we do now is
correct now that the bug is fixed, in which case a bug against Ubuntu
would be appropriate.

Ian, Royer, What do you guys think?

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xen-users] libutil.h moved to bsd/libutil.h (Was: Re: Problem compiling Xen 4.2 from sources)
  2012-10-02 16:46 ` libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] Problem compiling Xen 4.2 from sources) Ian Campbell
@ 2012-10-02 16:50   ` Ian Campbell
  2012-10-02 19:54     ` Giorgio Mossa
  2012-10-03  8:31   ` libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] " Roger Pau Monné
  1 sibling, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2012-10-02 16:50 UTC (permalink / raw)
  To: Giorgio Mossa
  Cc: xen-users@lists.xen.org, xen-devel, Ian Jackson, Roger Pau Monne

On Tue, 2012-10-02 at 17:46 +0100, Ian Campbell wrote:
> (Adding some CCs)
> On Tue, 2012-10-02 at 17:31 +0100, Giorgio Mossa wrote:
> > Hello everyone,
> > I'm working on an Ubuntu 12.04 and I wanted to test
> > Xen 4.2 (official repository offer just version 4.1),
> > so I've downloaded the source tarball from the site,
> > followed the instruction in the readme but when compiling
> > I'm getting the following error:
> > 
> >  In file included from libxl_bootloader.c:21:0:
> >  /usr/include/libutil.h:33:2: error: #warning "Deprecated header, use <bsd/libutil.h> or libbsd-overlay.pc instead." [-Werror=cpp]
> >  cc1: all warnings being treated as errors
> >  make[3]: *** [libxl_bootloader.o] Error 1
> > 
> > could anyone explain how to solve this problem, without disabling
> the warning/errors compilation options?

Oh, BTW, I expect you could just purge libbsd-dev from your system and
that would workaround the issue.

Ian.

> 
> Looks like someone has decided to move this header from /usr/include
> to /usr/include/bsd and leave behind a #warning in the old location,
> which has broken the way we do things.
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640895 seems to relate
> to the fallout from this.
> 
> I'm not sure when the include of libutil is needed, it's not mentioned
> in the Linux man pages and on Linux neither of the functions we purport
> to need from it are actually present. Perhaps it's a BSD only thing?
> 
> Probably we need to check for bsd/libutil.h in preference to libutil.h
> although the resolution of #640895 suggests that what we do now is
> correct now that the bug is fixed, in which case a bug against Ubuntu
> would be appropriate.
> 
> Ian, Royer, What do you guys think?
> 
> Ian.
> 
> 
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xen.org
> http://lists.xen.org/xen-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xen-users] libutil.h moved to bsd/libutil.h (Was: Re: Problem compiling Xen 4.2 from sources)
  2012-10-02 16:50   ` [Xen-users] libutil.h moved to bsd/libutil.h (Was: " Ian Campbell
@ 2012-10-02 19:54     ` Giorgio Mossa
  0 siblings, 0 replies; 6+ messages in thread
From: Giorgio Mossa @ 2012-10-02 19:54 UTC (permalink / raw)
  To: Ian Campbell
  Cc: xen-users@lists.xen.org, xen-devel, Ian Jackson, Roger Pau Monne

On Tue, Oct 02, 2012 at 05:50:03PM +0100, Ian Campbell wrote:
> On Tue, 2012-10-02 at 17:46 +0100, Ian Campbell wrote:
> 
> Oh, BTW, I expect you could just purge libbsd-dev from your system and
> that would workaround the issue.
> 
> Ian.
> 

Sadly I can't because I've other packages which depend on it......

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] Problem compiling Xen 4.2 from sources)
  2012-10-02 16:46 ` libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] Problem compiling Xen 4.2 from sources) Ian Campbell
  2012-10-02 16:50   ` [Xen-users] libutil.h moved to bsd/libutil.h (Was: " Ian Campbell
@ 2012-10-03  8:31   ` Roger Pau Monné
  2012-10-03 10:01     ` Giorgio Mossa
  2012-10-08 11:19     ` Ian Campbell
  1 sibling, 2 replies; 6+ messages in thread
From: Roger Pau Monné @ 2012-10-03  8:31 UTC (permalink / raw)
  To: Ian Campbell
  Cc: xen-users@lists.xen.org, Ian Jackson, Giorgio Mossa, xen-devel

On 02/10/12 18:46, Ian Campbell wrote:
> (Adding some CCs)
> On Tue, 2012-10-02 at 17:31 +0100, Giorgio Mossa wrote:
>> Hello everyone,
>> I'm working on an Ubuntu 12.04 and I wanted to test
>> Xen 4.2 (official repository offer just version 4.1),
>> so I've downloaded the source tarball from the site,
>> followed the instruction in the readme but when compiling
>> I'm getting the following error:
>>
>>  In file included from libxl_bootloader.c:21:0:
>>  /usr/include/libutil.h:33:2: error: #warning "Deprecated header, use <bsd/libutil.h> or libbsd-overlay.pc instead." [-Werror=cpp]
>>  cc1: all warnings being treated as errors
>>  make[3]: *** [libxl_bootloader.o] Error 1
>>
>> could anyone explain how to solve this problem, without disabling the warning/errors compilation options?
> 
> Looks like someone has decided to move this header from /usr/include
> to /usr/include/bsd and leave behind a #warning in the old location,
> which has broken the way we do things.
> 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640895 seems to relate
> to the fallout from this.
> 
> I'm not sure when the include of libutil is needed, it's not mentioned
> in the Linux man pages and on Linux neither of the functions we purport
> to need from it are actually present. Perhaps it's a BSD only thing?
> 
> Probably we need to check for bsd/libutil.h in preference to libutil.h
> although the resolution of #640895 suggests that what we do now is
> correct now that the bug is fixed, in which case a bug against Ubuntu
> would be appropriate.
> 
> Ian, Royer, What do you guys think?

According to the man pages <libutil.h> is only needed on BSDs to be able
to use openpty et al. Linux should not have this file, could you please
try the following patch? It should prevent configure (and thus libxl)
from including the bogus libutil.h header.

---
>From 250c0d533bab3c9705ade8e4bffed54abcb53b1c Mon Sep 17 00:00:00 2001
From: Roger Pau Monne <roger.pau@citrix.com>
Date: Wed, 3 Oct 2012 10:22:21 +0200
Subject: [PATCH] autoconf: add -Werror to libutil.h header check

libutil.h is only needed on BSDs, but not in Linux. Debian package
libbsd-dev-0.3.0-1 installed a libutil.h overlay that contains a
#warning, thus making libxl compilation broken due to -Werror.

Perform the libutil.h check with -Werror, so we don't include this
bogus header.

Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
---
Please rerun autoconf after applying this patch
---
 tools/m4/ptyfuncs.m4 |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tools/m4/ptyfuncs.m4 b/tools/m4/ptyfuncs.m4
index bfea3e1..3e37b5a 100644
--- a/tools/m4/ptyfuncs.m4
+++ b/tools/m4/ptyfuncs.m4
@@ -1,7 +1,14 @@
 AC_DEFUN([AX_CHECK_PTYFUNCS], [
+    dnl This is a workaround for a bug in Debian package
+    dnl libbsd-dev-0.3.0-1. Once we no longer support that
+    dnl package we can remove the addition of -Werror to
+    dnl CPPFLAGS.
+    AX_SAVEVAR_SAVE(CPPFLAGS)
+    CPPFLAGS="$CPPFLAGS -Werror"
     AC_CHECK_HEADER([libutil.h],[
       AC_DEFINE([INCLUDE_LIBUTIL_H],[<libutil.h>],[libutil header file name])
     ])
+    AX_SAVEVAR_RESTORE(CPPFLAGS)
     AC_CACHE_CHECK([for openpty et al], [ax_cv_ptyfuncs_libs], [
         for ax_cv_ptyfuncs_libs in -lutil "" NOT_FOUND; do
             if test "x$ax_cv_ptyfuncs_libs" = "xNOT_FOUND"; then
-- 
1.7.7.5 (Apple Git-26)

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] Problem compiling Xen 4.2 from sources)
  2012-10-03  8:31   ` libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] " Roger Pau Monné
@ 2012-10-03 10:01     ` Giorgio Mossa
  2012-10-08 11:19     ` Ian Campbell
  1 sibling, 0 replies; 6+ messages in thread
From: Giorgio Mossa @ 2012-10-03 10:01 UTC (permalink / raw)
  To: Roger Pau Monné
  Cc: xen-users@lists.xen.org, Ian Jackson, Ian Campbell, xen-devel

It seems the patch worked,
thank you very much!!!


On Wed, Oct 03, 2012 at 10:31:57AM +0200, Roger Pau Monné wrote:
> 
> According to the man pages <libutil.h> is only needed on BSDs to be able
> to use openpty et al. Linux should not have this file, could you please
> try the following patch? It should prevent configure (and thus libxl)
> from including the bogus libutil.h header.
> 
> ---
> >From 250c0d533bab3c9705ade8e4bffed54abcb53b1c Mon Sep 17 00:00:00 2001
> From: Roger Pau Monne <roger.pau@citrix.com>
> Date: Wed, 3 Oct 2012 10:22:21 +0200
> Subject: [PATCH] autoconf: add -Werror to libutil.h header check
> 
> libutil.h is only needed on BSDs, but not in Linux. Debian package
> libbsd-dev-0.3.0-1 installed a libutil.h overlay that contains a
> #warning, thus making libxl compilation broken due to -Werror.
> 
> Perform the libutil.h check with -Werror, so we don't include this
> bogus header.
> 
> Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
> ---
> Please rerun autoconf after applying this patch
> ---
>  tools/m4/ptyfuncs.m4 |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/m4/ptyfuncs.m4 b/tools/m4/ptyfuncs.m4
> index bfea3e1..3e37b5a 100644
> --- a/tools/m4/ptyfuncs.m4
> +++ b/tools/m4/ptyfuncs.m4
> @@ -1,7 +1,14 @@
>  AC_DEFUN([AX_CHECK_PTYFUNCS], [
> +    dnl This is a workaround for a bug in Debian package
> +    dnl libbsd-dev-0.3.0-1. Once we no longer support that
> +    dnl package we can remove the addition of -Werror to
> +    dnl CPPFLAGS.
> +    AX_SAVEVAR_SAVE(CPPFLAGS)
> +    CPPFLAGS="$CPPFLAGS -Werror"
>      AC_CHECK_HEADER([libutil.h],[
>        AC_DEFINE([INCLUDE_LIBUTIL_H],[<libutil.h>],[libutil header file name])
>      ])
> +    AX_SAVEVAR_RESTORE(CPPFLAGS)
>      AC_CACHE_CHECK([for openpty et al], [ax_cv_ptyfuncs_libs], [
>          for ax_cv_ptyfuncs_libs in -lutil "" NOT_FOUND; do
>              if test "x$ax_cv_ptyfuncs_libs" = "xNOT_FOUND"; then
> -- 
> 1.7.7.5 (Apple Git-26)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] Problem compiling Xen 4.2 from sources)
  2012-10-03  8:31   ` libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] " Roger Pau Monné
  2012-10-03 10:01     ` Giorgio Mossa
@ 2012-10-08 11:19     ` Ian Campbell
  1 sibling, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2012-10-08 11:19 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: xen-users@lists.xen.org, Ian Jackson, Giorgio Mossa, xen-devel

On Wed, 2012-10-03 at 09:31 +0100, Roger Pau Monne wrote:
> From 250c0d533bab3c9705ade8e4bffed54abcb53b1c Mon Sep 17 00:00:00 2001
> From: Roger Pau Monne <roger.pau@citrix.com>
> Date: Wed, 3 Oct 2012 10:22:21 +0200
> Subject: [PATCH] autoconf: add -Werror to libutil.h header check
> 
> libutil.h is only needed on BSDs, but not in Linux. Debian package
> libbsd-dev-0.3.0-1 installed a libutil.h overlay that contains a
> #warning, thus making libxl compilation broken due to -Werror.
> 
> Perform the libutil.h check with -Werror, so we don't include this
> bogus header.
> 
> Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

and applied.

Arguably, since we compile with -Werror we should run configure with it
too -- but I bet the fallout from doing that would be horrific though!

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-08 11:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20121002163136.GA5378@intersect>
2012-10-02 16:46 ` libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] Problem compiling Xen 4.2 from sources) Ian Campbell
2012-10-02 16:50   ` [Xen-users] libutil.h moved to bsd/libutil.h (Was: " Ian Campbell
2012-10-02 19:54     ` Giorgio Mossa
2012-10-03  8:31   ` libutil.h moved to bsd/libutil.h (Was: Re: [Xen-users] " Roger Pau Monné
2012-10-03 10:01     ` Giorgio Mossa
2012-10-08 11:19     ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.