[libvirt] [PATCHv4 13/15] build: switch --with-qemu default from yes to check

Ján Tomko jtomko at redhat.com
Fri Jul 20 10:24:50 UTC 2018


On Thu, Jul 19, 2018 at 07:38:15PM -0400, John Ferlan wrote:
>
>
>On 07/18/2018 10:44 AM, Ján Tomko wrote:
>> Unless explicitly requested, enable the QEMU driver
>> only if the Jansson library is present.
>>
>> Signed-off-by: Ján Tomko <jtomko at redhat.com>
>> ---
>>  m4/virt-driver-qemu.m4 | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>
>Perhaps it's obvious for someone else, but I think there some sort of
>dependency missing.
>Starting with this patch I found that my with-qemu
>"went away".
>
>I have:
>
>jansson.x86_64                           2.11-1.fc28
>@fedora
>
>
>But not:
>
> jansson-devel         x86_64         2.11-1.fc28          fedora
>  15 k
>
>If I explicitly add --with-jansson onto the command line, then I get:
>
>checking for JANSSON... no
>configure: error: You must install the jansson >= 2.5 pkg-config module
>to compile libvirt
>error: configure failed
>
>If I then install jansson-devel, the build succeeds.
>
>Honestly I think we need to be much more in your face in this instance -
>something isn't quite right and it eventually leads to some really
>strange results because nothing in/for qemu is built, but you are left
>with old build bits in your tree.  Eventually something fails.
>

There was not that much discussion about it:
https://www.redhat.com/archives/libvir-list/2018-May/msg01321.html

I do not oppose reverting this bit and failing by default if we don't
have a JSON library (as Andrea mentioned, more drivers might possibly
require a working JSON implementation).

However after dropping old QEMU support, building QEMU driver without
JSON makes no sense. (There was some logic in virt-yajl.m4 that tried
to figure out whether lack of yajl should be fatal based on the version
of the QEMU executable present on the system).

>This whole build/config system is a generally a mystery to me, so I have
>zero suggestions.  Ironically if I had to build from source, I'd know
>from libvirt.spec that jansson-devel was required, although there's no
>>= version check so that probably should be fixed.

Right, the specfile still has:
%define min_rhel 6

>
>Suffice to say digging into the config.log trying to figure why one's
>QEMU is disabled is not an enjoyable or easy experience.
>
>Yeah, yeah, we're developers we're supposed to be smart, we get what we
>get... I'll bet some qemu devel will hit this some day and wonder how to
>actually build libvirt with qemu because it's not obvious and it "used
>to be" a default=yes.
>

I expected that people surprised by the lack of QEMU driver would pass
--with-qemu, which should have the proper error.

Jano

>John
>
>Off to go drown the rest of my frustration ;-)
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180720/e22eed14/attachment-0001.sig>


More information about the libvir-list mailing list