qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] configure: fix detection of gdbus-codegen
@ 2021-05-05 14:24 Paolo Bonzini
  2021-05-05 14:29 ` Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2021-05-05 14:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: thuth, Sebastian Mitterle, elmarco

"pkg-config --variable=gdbus_codegen gio-2.0" returns "gdbus-codegen",
and it does not pass test -x (which does not walk the path).

Meson 0.58.0 notices that something is iffy, as the dbus_vmstate1
assignment in tests/qtest/meson.build uses an empty string as the
command, and fails very eloquently:

../tests/qtest/meson.build:92:2: ERROR: No program name specified.

Use the "has" function instead of test -x, and fix the generation
of config-host.mak since meson.build expects that GDBUS_CODEGEN
is absent, rather than empty, if the tool is unavailable.

Reported-by: Sebastian Mitterle <smitterl@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 54f8475444..5877a6b2bf 100755
--- a/configure
+++ b/configure
@@ -3341,7 +3341,7 @@ if ! test "$gio" = "no"; then
         gio_cflags=$($pkg_config --cflags gio-2.0)
         gio_libs=$($pkg_config --libs gio-2.0)
         gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
-        if [ ! -x "$gdbus_codegen" ]; then
+        if ! has "$gdbus_codegen"; then
             gdbus_codegen=
         fi
         # Check that the libraries actually work -- Ubuntu 18.04 ships
@@ -5704,6 +5704,8 @@ if test "$gio" = "yes" ; then
     echo "CONFIG_GIO=y" >> $config_host_mak
     echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
     echo "GIO_LIBS=$gio_libs" >> $config_host_mak
+fi
+if test "$gdbus_codegen" != "" ; then
     echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak
 fi
 echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] configure: fix detection of gdbus-codegen
  2021-05-05 14:24 [PATCH] configure: fix detection of gdbus-codegen Paolo Bonzini
@ 2021-05-05 14:29 ` Philippe Mathieu-Daudé
  2021-05-05 14:30 ` Marc-André Lureau
  2021-05-28  6:13 ` Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-05 14:29 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: thuth, Sebastian Mitterle, elmarco

On 5/5/21 4:24 PM, Paolo Bonzini wrote:
> "pkg-config --variable=gdbus_codegen gio-2.0" returns "gdbus-codegen",
> and it does not pass test -x (which does not walk the path).
> 
> Meson 0.58.0 notices that something is iffy, as the dbus_vmstate1
> assignment in tests/qtest/meson.build uses an empty string as the
> command, and fails very eloquently:
> 
> ../tests/qtest/meson.build:92:2: ERROR: No program name specified.
> 
> Use the "has" function instead of test -x, and fix the generation
> of config-host.mak since meson.build expects that GDBUS_CODEGEN
> is absent, rather than empty, if the tool is unavailable.
> 
> Reported-by: Sebastian Mitterle <smitterl@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  configure | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] configure: fix detection of gdbus-codegen
  2021-05-05 14:24 [PATCH] configure: fix detection of gdbus-codegen Paolo Bonzini
  2021-05-05 14:29 ` Philippe Mathieu-Daudé
@ 2021-05-05 14:30 ` Marc-André Lureau
  2021-05-28  6:13 ` Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Marc-André Lureau @ 2021-05-05 14:30 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Thomas Huth, Sebastian Mitterle, QEMU, elmarco

[-- Attachment #1: Type: text/plain, Size: 2016 bytes --]

On Wed, May 5, 2021 at 6:25 PM Paolo Bonzini <pbonzini@redhat.com> wrote:

> "pkg-config --variable=gdbus_codegen gio-2.0" returns "gdbus-codegen",
> and it does not pass test -x (which does not walk the path).
>
> Meson 0.58.0 notices that something is iffy, as the dbus_vmstate1
> assignment in tests/qtest/meson.build uses an empty string as the
> command, and fails very eloquently:
>
> ../tests/qtest/meson.build:92:2: ERROR: No program name specified.
>
> Use the "has" function instead of test -x, and fix the generation
> of config-host.mak since meson.build expects that GDBUS_CODEGEN
> is absent, rather than empty, if the tool is unavailable.
>
> Reported-by: Sebastian Mitterle <smitterl@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>

Resolves:
https://gitlab.com/qemu-project/qemu/-/issues/178

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  configure | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index 54f8475444..5877a6b2bf 100755
> --- a/configure
> +++ b/configure
> @@ -3341,7 +3341,7 @@ if ! test "$gio" = "no"; then
>          gio_cflags=$($pkg_config --cflags gio-2.0)
>          gio_libs=$($pkg_config --libs gio-2.0)
>          gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
> -        if [ ! -x "$gdbus_codegen" ]; then
> +        if ! has "$gdbus_codegen"; then
>              gdbus_codegen=
>          fi
>          # Check that the libraries actually work -- Ubuntu 18.04 ships
> @@ -5704,6 +5704,8 @@ if test "$gio" = "yes" ; then
>      echo "CONFIG_GIO=y" >> $config_host_mak
>      echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
>      echo "GIO_LIBS=$gio_libs" >> $config_host_mak
> +fi
> +if test "$gdbus_codegen" != "" ; then
>      echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak
>  fi
>  echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
> --
> 2.26.2
>
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 3187 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] configure: fix detection of gdbus-codegen
  2021-05-05 14:24 [PATCH] configure: fix detection of gdbus-codegen Paolo Bonzini
  2021-05-05 14:29 ` Philippe Mathieu-Daudé
  2021-05-05 14:30 ` Marc-André Lureau
@ 2021-05-28  6:13 ` Thomas Huth
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-05-28  6:13 UTC (permalink / raw)
  To: qemu-stable; +Cc: Paolo Bonzini, qemu-devel

On 05/05/2021 16.24, Paolo Bonzini wrote:
> "pkg-config --variable=gdbus_codegen gio-2.0" returns "gdbus-codegen",
> and it does not pass test -x (which does not walk the path).
> 
> Meson 0.58.0 notices that something is iffy, as the dbus_vmstate1
> assignment in tests/qtest/meson.build uses an empty string as the
> command, and fails very eloquently:
> 
> ../tests/qtest/meson.build:92:2: ERROR: No program name specified.
> 
> Use the "has" function instead of test -x, and fix the generation
> of config-host.mak since meson.build expects that GDBUS_CODEGEN
> is absent, rather than empty, if the tool is unavailable.
> 
> Reported-by: Sebastian Mitterle <smitterl@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 54f8475444..5877a6b2bf 100755
> --- a/configure
> +++ b/configure
> @@ -3341,7 +3341,7 @@ if ! test "$gio" = "no"; then
>           gio_cflags=$($pkg_config --cflags gio-2.0)
>           gio_libs=$($pkg_config --libs gio-2.0)
>           gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
> -        if [ ! -x "$gdbus_codegen" ]; then
> +        if ! has "$gdbus_codegen"; then
>               gdbus_codegen=
>           fi
>           # Check that the libraries actually work -- Ubuntu 18.04 ships
> @@ -5704,6 +5704,8 @@ if test "$gio" = "yes" ; then
>       echo "CONFIG_GIO=y" >> $config_host_mak
>       echo "GIO_CFLAGS=$gio_cflags" >> $config_host_mak
>       echo "GIO_LIBS=$gio_libs" >> $config_host_mak
> +fi
> +if test "$gdbus_codegen" != "" ; then
>       echo "GDBUS_CODEGEN=$gdbus_codegen" >> $config_host_mak
>   fi
>   echo "CONFIG_TLS_PRIORITY=\"$tls_priority\"" >> $config_host_mak
> 

I think we should include this in the next stable release, too!

  Thomas



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-28  6:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 14:24 [PATCH] configure: fix detection of gdbus-codegen Paolo Bonzini
2021-05-05 14:29 ` Philippe Mathieu-Daudé
2021-05-05 14:30 ` Marc-André Lureau
2021-05-28  6:13 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).