[libvirt-users] glib2 head file error when build libvirt with wireshark support

I compile the latest libvirt from fedora rawhide, but failed. The version of my software: wireshark-devel-2.0.1-2.fc24.x86_64 glib2-2.47.5-2.fc24.x86_64 gcc-5.1.1-4.fc23.x86_64 binutils-2.26-10.fc24.x86_64 The error as following: # ./autogen.sh --prefix=/usr && make ..... wireshark/src/plugin.c:5:21: fatal error: gmodule.h: No such file or directory compilation terminated. Makefile:2442: recipe for target 'wireshark/src/wireshark_src_libvirt_la-plugin.lo' failed make[3]: *** [wireshark/src/wireshark_src_libvirt_la-plugin.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... In file included from wireshark/src/packet-libvirt.c:27:0: /usr/include/wireshark/epan/proto.h:40:18: fatal error: glib.h: No such file or directory compilation terminated. Makefile:2435: recipe for target 'wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo' failed make[3]: *** [wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo] Error 1 make[3]: Leaving directory '/root/libvirt/tools' Makefile:2104: recipe for target 'all' failed make[2]: *** [all] Error 2 make[2]: Leaving directory '/root/libvirt/tools' Makefile:2002: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/root/libvirt' Makefile:1897: recipe for target 'all' failed make: *** [all] Error 2 When I disable wireshark support, make successfully. # ./configure --without-wireshark-dissector && make But the file gmodule.h and glib.h exist on my system: # locate gmodule.h /usr/include/glib-2.0/gmodule.h # locate glib.h /usr/include/glib-2.0/glib.h /usr/share/gtk-doc/html/glib/glib.html /usr/src/kernels/4.5.0-0.rc0.git1.1.fc24.x86_64/include/config/blk/dev/bsglib.h /usr/src/kernels/4.5.0-0.rc3.git3.1.fc24.x86_64/include/config/blk/dev/bsglib.h

On Mon, Feb 15, 2016 at 03:05:00AM -0500, Han Han wrote:
I compile the latest libvirt from fedora rawhide, but failed. The version of my software: wireshark-devel-2.0.1-2.fc24.x86_64 glib2-2.47.5-2.fc24.x86_64 gcc-5.1.1-4.fc23.x86_64 binutils-2.26-10.fc24.x86_64
Can you post the output of: pkg-config --print-requires wireshark If it does not output glib-2.0 and gmodule-2.0, then it's your wireshark broken. I see they have it fixed upstream (thanks to Michal, BTW), so the next release should be fine. In the meantime, you can just edit your /usr/lib/pkgconfig/wireshark.pc to have the following line in it: Requires: glib-2.0, gmodule-2.0, gthread-2.0 HTH, Martin
The error as following: # ./autogen.sh --prefix=/usr && make ..... wireshark/src/plugin.c:5:21: fatal error: gmodule.h: No such file or directory compilation terminated. Makefile:2442: recipe for target 'wireshark/src/wireshark_src_libvirt_la-plugin.lo' failed make[3]: *** [wireshark/src/wireshark_src_libvirt_la-plugin.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... In file included from wireshark/src/packet-libvirt.c:27:0: /usr/include/wireshark/epan/proto.h:40:18: fatal error: glib.h: No such file or directory compilation terminated. Makefile:2435: recipe for target 'wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo' failed make[3]: *** [wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo] Error 1 make[3]: Leaving directory '/root/libvirt/tools' Makefile:2104: recipe for target 'all' failed make[2]: *** [all] Error 2 make[2]: Leaving directory '/root/libvirt/tools' Makefile:2002: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/root/libvirt' Makefile:1897: recipe for target 'all' failed make: *** [all] Error 2
When I disable wireshark support, make successfully. # ./configure --without-wireshark-dissector && make
But the file gmodule.h and glib.h exist on my system: # locate gmodule.h /usr/include/glib-2.0/gmodule.h # locate glib.h /usr/include/glib-2.0/glib.h /usr/share/gtk-doc/html/glib/glib.html /usr/src/kernels/4.5.0-0.rc0.git1.1.fc24.x86_64/include/config/blk/dev/bsglib.h /usr/src/kernels/4.5.0-0.rc3.git3.1.fc24.x86_64/include/config/blk/dev/bsglib.h
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

The wireshark requirement: # pkg-config --print-requires wireshark Qt It works after changing the pc file as you said. Thanks you!!! ----- Original Message ----- From: "Martin Kletzander" <mkletzan@redhat.com> To: "Han Han" <hhan@redhat.com> Cc: libvirt-users@redhat.com, "Luyao Huang" <lhuang@redhat.com> Sent: Monday, February 15, 2016 4:40:11 AM Subject: Re: [libvirt-users] glib2 head file error when build libvirt with wireshark support On Mon, Feb 15, 2016 at 03:05:00AM -0500, Han Han wrote:
I compile the latest libvirt from fedora rawhide, but failed. The version of my software: wireshark-devel-2.0.1-2.fc24.x86_64 glib2-2.47.5-2.fc24.x86_64 gcc-5.1.1-4.fc23.x86_64 binutils-2.26-10.fc24.x86_64
Can you post the output of: pkg-config --print-requires wireshark If it does not output glib-2.0 and gmodule-2.0, then it's your wireshark broken. I see they have it fixed upstream (thanks to Michal, BTW), so the next release should be fine. In the meantime, you can just edit your /usr/lib/pkgconfig/wireshark.pc to have the following line in it: Requires: glib-2.0, gmodule-2.0, gthread-2.0 HTH, Martin
The error as following: # ./autogen.sh --prefix=/usr && make ..... wireshark/src/plugin.c:5:21: fatal error: gmodule.h: No such file or directory compilation terminated. Makefile:2442: recipe for target 'wireshark/src/wireshark_src_libvirt_la-plugin.lo' failed make[3]: *** [wireshark/src/wireshark_src_libvirt_la-plugin.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... In file included from wireshark/src/packet-libvirt.c:27:0: /usr/include/wireshark/epan/proto.h:40:18: fatal error: glib.h: No such file or directory compilation terminated. Makefile:2435: recipe for target 'wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo' failed make[3]: *** [wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo] Error 1 make[3]: Leaving directory '/root/libvirt/tools' Makefile:2104: recipe for target 'all' failed make[2]: *** [all] Error 2 make[2]: Leaving directory '/root/libvirt/tools' Makefile:2002: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/root/libvirt' Makefile:1897: recipe for target 'all' failed make: *** [all] Error 2
When I disable wireshark support, make successfully. # ./configure --without-wireshark-dissector && make
But the file gmodule.h and glib.h exist on my system: # locate gmodule.h /usr/include/glib-2.0/gmodule.h # locate glib.h /usr/include/glib-2.0/glib.h /usr/share/gtk-doc/html/glib/glib.html /usr/src/kernels/4.5.0-0.rc0.git1.1.fc24.x86_64/include/config/blk/dev/bsglib.h /usr/src/kernels/4.5.0-0.rc3.git3.1.fc24.x86_64/include/config/blk/dev/bsglib.h
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

On Mon, Feb 15, 2016 at 10:40:11AM +0100, Martin Kletzander wrote:
On Mon, Feb 15, 2016 at 03:05:00AM -0500, Han Han wrote:
I compile the latest libvirt from fedora rawhide, but failed. The version of my software: wireshark-devel-2.0.1-2.fc24.x86_64 glib2-2.47.5-2.fc24.x86_64 gcc-5.1.1-4.fc23.x86_64 binutils-2.26-10.fc24.x86_64
Can you post the output of:
pkg-config --print-requires wireshark
If it does not output glib-2.0 and gmodule-2.0, then it's your wireshark broken. I see they have it fixed upstream (thanks to Michal, BTW), so the next release should be fine. In the meantime, you can just edit your /usr/lib/pkgconfig/wireshark.pc to have the following line in it:
Requires: glib-2.0, gmodule-2.0, gthread-2.0
Where do you see it fixed upstream ? The pkg-config file is patched in locally by Fedora RPM spec file and it was the Fedora wireshark maintainer who broke it AFAICT https://bugzilla.redhat.com/show_bug.cgi?id=1300002 Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 16.02.2016 18:47, Daniel P. Berrange wrote:
On Mon, Feb 15, 2016 at 10:40:11AM +0100, Martin Kletzander wrote:
On Mon, Feb 15, 2016 at 03:05:00AM -0500, Han Han wrote:
I compile the latest libvirt from fedora rawhide, but failed. The version of my software: wireshark-devel-2.0.1-2.fc24.x86_64 glib2-2.47.5-2.fc24.x86_64 gcc-5.1.1-4.fc23.x86_64 binutils-2.26-10.fc24.x86_64
Can you post the output of:
pkg-config --print-requires wireshark
If it does not output glib-2.0 and gmodule-2.0, then it's your wireshark broken. I see they have it fixed upstream (thanks to Michal, BTW), so the next release should be fine. In the meantime, you can just edit your /usr/lib/pkgconfig/wireshark.pc to have the following line in it:
Requires: glib-2.0, gmodule-2.0, gthread-2.0
Where do you see it fixed upstream ? The pkg-config file is patched in locally by Fedora RPM spec file and it was the Fedora wireshark maintainer who broke it AFAICT
I guess Martin was referring to my wireshark upstream commit: commit ea16a84ef51b0e50a40789adcfbe71b6f3c60ed1 Author: Michal Privoznik <miso.privoznik@gmail.com> AuthorDate: Sat Dec 26 17:13:00 2015 +0100 Commit: Anders Broman <a.broman58@gmail.com> CommitDate: Mon Jan 4 08:15:29 2016 +0000 Generate better pkg-config file Firstly, when building with autogen.sh and configure script, the wireshark.pc is not generated at all. Then, due to not matching names some variables are not being replaced as they should be. Bug: 11069 Change-Id: Iefa7a9b536f3fee7f9ad78803aaacc5bb64a9c8d Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-on: https://code.wireshark.org/review/13005 Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com> https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ea16a84e... Yes, fedora's broken because it used to generate it's own pkg-config file as those before my patch were unusable. The commit still waits for next wireshark release though. Michal

On Tue, Feb 16, 2016 at 05:47:08PM +0000, Daniel P. Berrange wrote:
On Mon, Feb 15, 2016 at 10:40:11AM +0100, Martin Kletzander wrote:
On Mon, Feb 15, 2016 at 03:05:00AM -0500, Han Han wrote:
I compile the latest libvirt from fedora rawhide, but failed. The version of my software: wireshark-devel-2.0.1-2.fc24.x86_64 glib2-2.47.5-2.fc24.x86_64 gcc-5.1.1-4.fc23.x86_64 binutils-2.26-10.fc24.x86_64
Can you post the output of:
pkg-config --print-requires wireshark
If it does not output glib-2.0 and gmodule-2.0, then it's your wireshark broken. I see they have it fixed upstream (thanks to Michal, BTW), so the next release should be fine. In the meantime, you can just edit your /usr/lib/pkgconfig/wireshark.pc to have the following line in it:
Requires: glib-2.0, gmodule-2.0, gthread-2.0
Where do you see it fixed upstream ? The pkg-config file is patched
Here: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commitdiff;h=ea16...
in locally by Fedora RPM spec file and it was the Fedora wireshark maintainer who broke it AFAICT
I didn't know about how that's done in Fedora. I know it was patched in there in some old release, but I stopped keeping track when my patch fixing this was rejected some time ago.
https://bugzilla.redhat.com/show_bug.cgi?id=1300002
Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (4)
-
Daniel P. Berrange
-
Han Han
-
Martin Kletzander
-
Michal Privoznik