[libvirt] [PATCH] wireshark dissector compile fix

Michal Privoznik mprivozn at redhat.com
Mon Aug 1 08:25:48 UTC 2016


On 29.07.2016 18:28, Benedikt Spranger wrote:
> Am Fri, 29 Jul 2016 12:27:16 +0100
> schrieb "Daniel P. Berrange" <berrange at redhat.com>:
> 
>> On Fri, Jul 29, 2016 at 12:43:41PM +0200, Benedikt Spranger wrote:
>>> Compiling libvirt wireshark dissector on a debian based system
>>> failed: CC
>>> wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo In file
>>> included
>>> from ../../libvirt/tools/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:2595: recipe for target
>>> 'wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo' failed
>>>
>>> Add an explicit dependency to glib.  
>>
>> This is a bug in wireshark packages in debian that they should fix
>> there.
> see debian bug #832926
> 
> But IMHO this is half of the truth.
> 
>> Libvirt shouldn't be hardcoding knowledge about what other libs
>> wireshark may happen to depend on.
> I disagree here. libvirt explicit includes "glib.h" here. Therfore it
> has a direct dependency to glib and this dependency should be checked.
> Implicit dependencies tend to be a can of worms.

Ah, you're right. Looks like the only glib function that the dissector
actually uses is g_sprintf(), which in this case provides no added value
to plain sprintf(). I've posted the patch here:

https://www.redhat.com/archives/libvir-list/2016-August/msg00011.html

Michal




More information about the libvir-list mailing list