qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] configure: Fix build for some versions of glibc (9pfs)
@ 2012-06-07  5:35 Stefan Weil
  2012-06-07 10:21 ` Stefano Stabellini
  2012-06-08 10:15 ` Stefano Stabellini
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Weil @ 2012-06-07  5:35 UTC (permalink / raw)
  To: Anthony Liguori
  Cc: aneesh.kumar, serge.hallyn, Stefan Weil, qemu-devel,
	stefano.stabellini

Some versions declare open_by_handle_at, but don't define AT_EMPTY_PATH.
Extend the check in configure to test both preconditions.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 configure |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index 799ad0f..f737f6c 100755
--- a/configure
+++ b/configure
@@ -2816,7 +2816,11 @@ fi
 open_by_hande_at=no
 cat > $TMPC << EOF
 #include <fcntl.h>
+#if !defined(AT_EMPTY_PATH)
+# error missing definition
+#else
 int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
+#endif
 EOF
 if compile_prog "" "" ; then
     open_by_handle_at=yes
-- 
1.7.10

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

* Re: [Qemu-devel] [PATCH] configure: Fix build for some versions of glibc (9pfs)
  2012-06-07  5:35 [Qemu-devel] [PATCH] configure: Fix build for some versions of glibc (9pfs) Stefan Weil
@ 2012-06-07 10:21 ` Stefano Stabellini
  2012-06-07 14:22   ` Serge Hallyn
  2012-06-08 10:15 ` Stefano Stabellini
  1 sibling, 1 reply; 5+ messages in thread
From: Stefano Stabellini @ 2012-06-07 10:21 UTC (permalink / raw)
  To: Stefan Weil
  Cc: aneesh.kumar@linux.vnet.ibm.com, serge.hallyn@canonical.com,
	Anthony Liguori, qemu-devel@nongnu.org, Stefano Stabellini

On Thu, 7 Jun 2012, Stefan Weil wrote:
> Some versions declare open_by_handle_at, but don't define AT_EMPTY_PATH.
> Extend the check in configure to test both preconditions.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>

It works for me. Also I think it is a better fix than the original
patch.

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

>  configure |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/configure b/configure
> index 799ad0f..f737f6c 100755
> --- a/configure
> +++ b/configure
> @@ -2816,7 +2816,11 @@ fi
>  open_by_hande_at=no
>  cat > $TMPC << EOF
>  #include <fcntl.h>
> +#if !defined(AT_EMPTY_PATH)
> +# error missing definition
> +#else
>  int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
> +#endif
>  EOF
>  if compile_prog "" "" ; then
>      open_by_handle_at=yes
> -- 
> 1.7.10
> 

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

* Re: [Qemu-devel] [PATCH] configure: Fix build for some versions of glibc (9pfs)
  2012-06-07 10:21 ` Stefano Stabellini
@ 2012-06-07 14:22   ` Serge Hallyn
  0 siblings, 0 replies; 5+ messages in thread
From: Serge Hallyn @ 2012-06-07 14:22 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Stefan Weil, Anthony Liguori, qemu-devel@nongnu.org,
	aneesh.kumar@linux.vnet.ibm.com

Quoting Stefano Stabellini (stefano.stabellini@eu.citrix.com):
> On Thu, 7 Jun 2012, Stefan Weil wrote:
> > Some versions declare open_by_handle_at, but don't define AT_EMPTY_PATH.
> > Extend the check in configure to test both preconditions.
> > 
> > Signed-off-by: Stefan Weil <sw@weilnetz.de>
> 
> It works for me. Also I think it is a better fix than the original
> patch.

Well, it works in that it allows compilation to proceed.  It results
in ./libhw64/9pfs/virtio-9p-handle.o not being built, since AT_EMPTY_PATH
can't be found through /usr/include/fcntl.h, even though it can in
/usr/include/linux/fcntl.h.  I guess that is, unfortunately, the right
thing to do.

Oh hey, I think I've found the bug in the debian package causing
that problem.  Grr.

> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>

thanks,
-serge

> 
> >  configure |    4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/configure b/configure
> > index 799ad0f..f737f6c 100755
> > --- a/configure
> > +++ b/configure
> > @@ -2816,7 +2816,11 @@ fi
> >  open_by_hande_at=no
> >  cat > $TMPC << EOF
> >  #include <fcntl.h>
> > +#if !defined(AT_EMPTY_PATH)
> > +# error missing definition
> > +#else
> >  int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
> > +#endif
> >  EOF
> >  if compile_prog "" "" ; then
> >      open_by_handle_at=yes
> > -- 
> > 1.7.10
> > 

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

* Re: [Qemu-devel] [PATCH] configure: Fix build for some versions of glibc (9pfs)
  2012-06-07  5:35 [Qemu-devel] [PATCH] configure: Fix build for some versions of glibc (9pfs) Stefan Weil
  2012-06-07 10:21 ` Stefano Stabellini
@ 2012-06-08 10:15 ` Stefano Stabellini
  2012-06-12 11:53   ` Stefano Stabellini
  1 sibling, 1 reply; 5+ messages in thread
From: Stefano Stabellini @ 2012-06-08 10:15 UTC (permalink / raw)
  To: Stefan Weil
  Cc: aneesh.kumar@linux.vnet.ibm.com, serge.hallyn@canonical.com,
	Anthony Liguori, qemu-devel@nongnu.org, Stefano Stabellini

On Thu, 7 Jun 2012, Stefan Weil wrote:
> Some versions declare open_by_handle_at, but don't define AT_EMPTY_PATH.
> Extend the check in configure to test both preconditions.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>

I have just noticed that this issue also affects QEMU 1.0.x, but we
don't have a check for virtfs there.
Maybe we need the original patch in the QEMU 1.0 stable tree?


>  configure |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/configure b/configure
> index 799ad0f..f737f6c 100755
> --- a/configure
> +++ b/configure
> @@ -2816,7 +2816,11 @@ fi
>  open_by_hande_at=no
>  cat > $TMPC << EOF
>  #include <fcntl.h>
> +#if !defined(AT_EMPTY_PATH)
> +# error missing definition
> +#else
>  int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
> +#endif
>  EOF
>  if compile_prog "" "" ; then
>      open_by_handle_at=yes
> -- 
> 1.7.10
> 

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

* Re: [Qemu-devel] [PATCH] configure: Fix build for some versions of glibc (9pfs)
  2012-06-08 10:15 ` Stefano Stabellini
@ 2012-06-12 11:53   ` Stefano Stabellini
  0 siblings, 0 replies; 5+ messages in thread
From: Stefano Stabellini @ 2012-06-12 11:53 UTC (permalink / raw)
  To: Stefano Stabellini
  Cc: Stefan Weil, Anthony Liguori, qemu-devel@nongnu.org,
	serge.hallyn@canonical.com, aneesh.kumar@linux.vnet.ibm.com

On Fri, 8 Jun 2012, Stefano Stabellini wrote:
> On Thu, 7 Jun 2012, Stefan Weil wrote:
> > Some versions declare open_by_handle_at, but don't define AT_EMPTY_PATH.
> > Extend the check in configure to test both preconditions.
> > 
> > Signed-off-by: Stefan Weil <sw@weilnetz.de>
> 
> I have just noticed that this issue also affects QEMU 1.0.x, but we
> don't have a check for virtfs there.
> Maybe we need the original patch in the QEMU 1.0 stable tree?

ping?

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

end of thread, other threads:[~2012-06-12 11:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07  5:35 [Qemu-devel] [PATCH] configure: Fix build for some versions of glibc (9pfs) Stefan Weil
2012-06-07 10:21 ` Stefano Stabellini
2012-06-07 14:22   ` Serge Hallyn
2012-06-08 10:15 ` Stefano Stabellini
2012-06-12 11:53   ` Stefano Stabellini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).