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

John Ferlan jferlan at redhat.com
Thu Jul 19 23:38:15 UTC 2018



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.

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.

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.

John

Off to go drown the rest of my frustration ;-)

> diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4
> index 80e1d3ad46..ddb2834705 100644
> --- a/m4/virt-driver-qemu.m4
> +++ b/m4/virt-driver-qemu.m4
> @@ -18,7 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
>  dnl
>  
>  AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [
> -  LIBVIRT_ARG_WITH_FEATURE([QEMU], [QEMU/KVM], [yes])
> +  LIBVIRT_ARG_WITH_FEATURE([QEMU], [QEMU/KVM], [check])
>    LIBVIRT_ARG_WITH([QEMU_USER], [username to run QEMU system instance as],
>                     ['platform dependent'])
>    LIBVIRT_ARG_WITH([QEMU_GROUP], [groupname to run QEMU system instance as],
> @@ -26,6 +26,10 @@ AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [
>  ])
>  
>  AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [
> +  AC_REQUIRE([LIBVIRT_CHECK_JANSSON])
> +  if test "$with_qemu" = "check"; then
> +    with_qemu=$with_jansson
> +  fi
>    if test "$with_qemu" = "yes" ; then
>      AC_DEFINE_UNQUOTED([WITH_QEMU], 1, [whether QEMU driver is enabled])
>    fi
> 




More information about the libvir-list mailing list