From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: David Gibson <dwg@au1.ibm.com>
Cc: stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org,
jvrao@us.ibm.com, qemu-devel@nongnu.org, zwu.kernel@gmail.com,
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Subject: Re: [PATCH] virtio-9p: fix QEMU build break
Date: Tue, 18 Oct 2011 10:29:40 +0530 [thread overview]
Message-ID: <87lisi7v43.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20111018034625.GC6655@truffala.fritz.box>
On Tue, 18 Oct 2011 14:46:25 +1100, David Gibson <dwg@au1.ibm.com> wrote:
> On Mon, Oct 10, 2011 at 10:19:31PM +0530, Aneesh Kumar K.V wrote:
> > On Mon, 10 Oct 2011 22:05:21 +0530, "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
> > > On Mon, 10 Oct 2011 18:30:28 +0800, Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> wrote:
> > > > qemu build break due to the redefinition of struct file_handle. My qemu.git/HEAD is 8acbc9b21d757a6be4f8492e547b8159703a0547
> > > >
> > > > Below is the log:
> > > > [root@f15 qemu]# make
> > > > CC qapi-generated/qga-qapi-types.o
> > > > LINK qemu-ga
> > > > CC libhw64/9pfs/virtio-9p-handle.o
> > > > /home/zwu/work/virt/qemu/hw/9pfs/virtio-9p-handle.c:31:8: error: redefinition of "struct file_handle"
> > > > /usr/include/bits/fcntl.h:254:8: note: originally defined here
> > > > make[1]: *** [9pfs/virtio-9p-handle.o] Error 1
> > > > make: *** [subdir-libhw64] Error 2
> > > >
> > > > [root@f15 qemu]# rpm -qf /usr/include/bits/fcntl.h
> > > > glibc-headers-2.13.90-9.x86_64
> > > >
> > >
> > > Is this a backported glibc ? On my ubuntu system glibc 2.13 doesn't
> > > provide struct file_handle. I also checked glib repo at
> > > http://repo.or.cz/w/glibc.git. The commit introducing struct file_handle
> > > is
> > >
> > > $ git describe --contains 158648c0bdda281e252a27c0200dd0ea6f4e0215
> > > glibc-2.14~200
> > >
> > >
> >
> > How about the below patch. This means that handle driver will only work
> > with latest glibc. Even if i have latest kernel, with an older glibc
> > handle fs driver backed will be disabled.
>
> This looks like the right approach to me, but at least with my
> compiler / libc combinations, the test program isn't quite right:
> because the file_handle pointer is never dereferenced, gcc doesn't
> complain even if it is undefined.
>
>
> > diff --git a/configure b/configure
> > index 24b8df4..0216c53 100755
> > --- a/configure
> > +++ b/configure
> > @@ -2551,6 +2551,18 @@ EOF
> > fi
> >
> > ##########################################
> > +# check if we have open_by_handle_at
> > +
> > +open_by_hande_at=no
> > +cat > $TMPC << EOF
> > +#include <fcntl.h>
> > +int main(void) { struct file_handle *fh; open_by_handle_at(0, fh, 0); }
>
> Instead, try this:
>
> int main(void) { struct file_handle fh; open_by_handle_at(0, &fh, 0); }
>
>
> I'd really like to see a patch along these lines merged, so I don't
> have to keep hacking it up manually just to get qemu to compile.
I did send a pull request with the patch
http://article.gmane.org/gmane.comp.emulators.qemu/120990
I will do a patch on top which will change the configure to what you
suggested above.
-aneesh
WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: David Gibson <dwg@au1.ibm.com>
Cc: stefanha@linux.vnet.ibm.com, kvm@vger.kernel.org,
jvrao@us.ibm.com, qemu-devel@nongnu.org, zwu.kernel@gmail.com,
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-9p: fix QEMU build break
Date: Tue, 18 Oct 2011 10:29:40 +0530 [thread overview]
Message-ID: <87lisi7v43.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <20111018034625.GC6655@truffala.fritz.box>
On Tue, 18 Oct 2011 14:46:25 +1100, David Gibson <dwg@au1.ibm.com> wrote:
> On Mon, Oct 10, 2011 at 10:19:31PM +0530, Aneesh Kumar K.V wrote:
> > On Mon, 10 Oct 2011 22:05:21 +0530, "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
> > > On Mon, 10 Oct 2011 18:30:28 +0800, Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> wrote:
> > > > qemu build break due to the redefinition of struct file_handle. My qemu.git/HEAD is 8acbc9b21d757a6be4f8492e547b8159703a0547
> > > >
> > > > Below is the log:
> > > > [root@f15 qemu]# make
> > > > CC qapi-generated/qga-qapi-types.o
> > > > LINK qemu-ga
> > > > CC libhw64/9pfs/virtio-9p-handle.o
> > > > /home/zwu/work/virt/qemu/hw/9pfs/virtio-9p-handle.c:31:8: error: redefinition of "struct file_handle"
> > > > /usr/include/bits/fcntl.h:254:8: note: originally defined here
> > > > make[1]: *** [9pfs/virtio-9p-handle.o] Error 1
> > > > make: *** [subdir-libhw64] Error 2
> > > >
> > > > [root@f15 qemu]# rpm -qf /usr/include/bits/fcntl.h
> > > > glibc-headers-2.13.90-9.x86_64
> > > >
> > >
> > > Is this a backported glibc ? On my ubuntu system glibc 2.13 doesn't
> > > provide struct file_handle. I also checked glib repo at
> > > http://repo.or.cz/w/glibc.git. The commit introducing struct file_handle
> > > is
> > >
> > > $ git describe --contains 158648c0bdda281e252a27c0200dd0ea6f4e0215
> > > glibc-2.14~200
> > >
> > >
> >
> > How about the below patch. This means that handle driver will only work
> > with latest glibc. Even if i have latest kernel, with an older glibc
> > handle fs driver backed will be disabled.
>
> This looks like the right approach to me, but at least with my
> compiler / libc combinations, the test program isn't quite right:
> because the file_handle pointer is never dereferenced, gcc doesn't
> complain even if it is undefined.
>
>
> > diff --git a/configure b/configure
> > index 24b8df4..0216c53 100755
> > --- a/configure
> > +++ b/configure
> > @@ -2551,6 +2551,18 @@ EOF
> > fi
> >
> > ##########################################
> > +# check if we have open_by_handle_at
> > +
> > +open_by_hande_at=no
> > +cat > $TMPC << EOF
> > +#include <fcntl.h>
> > +int main(void) { struct file_handle *fh; open_by_handle_at(0, fh, 0); }
>
> Instead, try this:
>
> int main(void) { struct file_handle fh; open_by_handle_at(0, &fh, 0); }
>
>
> I'd really like to see a patch along these lines merged, so I don't
> have to keep hacking it up manually just to get qemu to compile.
I did send a pull request with the patch
http://article.gmane.org/gmane.comp.emulators.qemu/120990
I will do a patch on top which will change the configure to what you
suggested above.
-aneesh
next prev parent reply other threads:[~2011-10-18 4:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 10:30 [PATCH] virtio-9p: fix QEMU build break Zhi Yong Wu
2011-10-10 10:30 ` [Qemu-devel] " Zhi Yong Wu
2011-10-10 16:35 ` Aneesh Kumar K.V
2011-10-10 16:35 ` [Qemu-devel] " Aneesh Kumar K.V
2011-10-10 16:49 ` Aneesh Kumar K.V
2011-10-10 16:49 ` [Qemu-devel] " Aneesh Kumar K.V
2011-10-11 6:09 ` Zhi Yong Wu
2011-10-11 6:09 ` [Qemu-devel] " Zhi Yong Wu
2011-10-18 3:46 ` David Gibson
2011-10-18 3:46 ` David Gibson
2011-10-18 4:59 ` Aneesh Kumar K.V [this message]
2011-10-18 4:59 ` Aneesh Kumar K.V
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lisi7v43.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=dwg@au1.ibm.com \
--cc=jvrao@us.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
--cc=wuzhy@linux.vnet.ibm.com \
--cc=zwu.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.