All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ui: dbus-display requires CONFIG_GBM
@ 2022-07-28  6:41 Paolo Bonzini
  2022-07-28  8:46 ` Daniel P. Berrangé
  2022-07-28  9:46 ` Marc-André Lureau
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2022-07-28  6:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau

Without CONFIG_GBM, compiling dbus-display fails with

../ui/dbus.c: In function ‘dbus_create_context’:
../ui/dbus.c:47:20: error: ‘qemu_egl_rn_ctx’ undeclared (first use in this function); did you mean ‘qemu_egl_init_ctx’?
   47 |                    qemu_egl_rn_ctx);
      |                    ^~~~~~~~~~~~~~~
      |                    qemu_egl_init_ctx
../ui/dbus.c:47:20: note: each undeclared identifier is reported only once for each function it appears in

and many other similar errors, because include/ui/egl-helpers.h only has
these declaration if gbm is found on the system.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build    | 4 ++--
 ui/meson.build | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 9b67db0d67..38403d2892 100644
--- a/meson.build
+++ b/meson.build
@@ -1697,8 +1697,8 @@ dbus_display = get_option('dbus_display') \
            error_message: '-display dbus requires glib>=2.64') \
   .require(gdbus_codegen.found(),
            error_message: '-display dbus requires gdbus-codegen') \
-  .require(opengl.found(),
-           error_message: '-display dbus requires epoxy/egl') \
+  .require(opengl.found() and gbm.found(),
+           error_message: '-display dbus requires epoxy/egl and gbm') \
   .allowed()
 
 have_virtfs = get_option('virtfs') \
diff --git a/ui/meson.build b/ui/meson.build
index e9f48c5315..ec13949776 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -81,7 +81,7 @@ if dbus_display
                                           '--interface-prefix', 'org.qemu.',
                                           '--c-namespace', 'QemuDBus',
                                           '--generate-c-code', '@BASENAME@'])
-  dbus_ss.add(when: [gio, pixman, opengl],
+  dbus_ss.add(when: [gio, pixman, opengl, gbm],
               if_true: [files(
                 'dbus-chardev.c',
                 'dbus-clipboard.c',
-- 
2.36.1



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

* Re: [PATCH] ui: dbus-display requires CONFIG_GBM
  2022-07-28  6:41 [PATCH] ui: dbus-display requires CONFIG_GBM Paolo Bonzini
@ 2022-07-28  8:46 ` Daniel P. Berrangé
  2022-07-28  9:46 ` Marc-André Lureau
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel P. Berrangé @ 2022-07-28  8:46 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, marcandre.lureau

On Thu, Jul 28, 2022 at 08:41:43AM +0200, Paolo Bonzini wrote:
> Without CONFIG_GBM, compiling dbus-display fails with
> 
> ../ui/dbus.c: In function ‘dbus_create_context’:
> ../ui/dbus.c:47:20: error: ‘qemu_egl_rn_ctx’ undeclared (first use in this function); did you mean ‘qemu_egl_init_ctx’?
>    47 |                    qemu_egl_rn_ctx);
>       |                    ^~~~~~~~~~~~~~~
>       |                    qemu_egl_init_ctx
> ../ui/dbus.c:47:20: note: each undeclared identifier is reported only once for each function it appears in
> 
> and many other similar errors, because include/ui/egl-helpers.h only has
> these declaration if gbm is found on the system.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  meson.build    | 4 ++--
>  ui/meson.build | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 9b67db0d67..38403d2892 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1697,8 +1697,8 @@ dbus_display = get_option('dbus_display') \
>             error_message: '-display dbus requires glib>=2.64') \
>    .require(gdbus_codegen.found(),
>             error_message: '-display dbus requires gdbus-codegen') \
> -  .require(opengl.found(),
> -           error_message: '-display dbus requires epoxy/egl') \
> +  .require(opengl.found() and gbm.found(),
> +           error_message: '-display dbus requires epoxy/egl and gbm') \
>    .allowed()
>  
>  have_virtfs = get_option('virtfs') \
> diff --git a/ui/meson.build b/ui/meson.build
> index e9f48c5315..ec13949776 100644
> --- a/ui/meson.build
> +++ b/ui/meson.build
> @@ -81,7 +81,7 @@ if dbus_display
>                                            '--interface-prefix', 'org.qemu.',
>                                            '--c-namespace', 'QemuDBus',
>                                            '--generate-c-code', '@BASENAME@'])
> -  dbus_ss.add(when: [gio, pixman, opengl],
> +  dbus_ss.add(when: [gio, pixman, opengl, gbm],
>                if_true: [files(
>                  'dbus-chardev.c',
>                  'dbus-clipboard.c',

Another fix was already posted a few days ago:

  https://lists.gnu.org/archive/html/qemu-devel/2022-07/msg04420.html


but your patch looks slightly more correct, as it also adds the
gbm lib to dbus_ss.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



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

* Re: [PATCH] ui: dbus-display requires CONFIG_GBM
  2022-07-28  6:41 [PATCH] ui: dbus-display requires CONFIG_GBM Paolo Bonzini
  2022-07-28  8:46 ` Daniel P. Berrangé
@ 2022-07-28  9:46 ` Marc-André Lureau
  1 sibling, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2022-07-28  9:46 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Thu, Jul 28, 2022 at 10:41 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Without CONFIG_GBM, compiling dbus-display fails with
>
> ../ui/dbus.c: In function ‘dbus_create_context’:
> ../ui/dbus.c:47:20: error: ‘qemu_egl_rn_ctx’ undeclared (first use in this function); did you mean ‘qemu_egl_init_ctx’?
>    47 |                    qemu_egl_rn_ctx);
>       |                    ^~~~~~~~~~~~~~~
>       |                    qemu_egl_init_ctx
> ../ui/dbus.c:47:20: note: each undeclared identifier is reported only once for each function it appears in
>
> and many other similar errors, because include/ui/egl-helpers.h only has
> these declaration if gbm is found on the system.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

As Daniel said, wfm:

+ you can mention https://gitlab.com/qemu-project/qemu/-/issues/1108

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


> ---
>  meson.build    | 4 ++--
>  ui/meson.build | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 9b67db0d67..38403d2892 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1697,8 +1697,8 @@ dbus_display = get_option('dbus_display') \
>             error_message: '-display dbus requires glib>=2.64') \
>    .require(gdbus_codegen.found(),
>             error_message: '-display dbus requires gdbus-codegen') \
> -  .require(opengl.found(),
> -           error_message: '-display dbus requires epoxy/egl') \
> +  .require(opengl.found() and gbm.found(),
> +           error_message: '-display dbus requires epoxy/egl and gbm') \
>    .allowed()
>
>  have_virtfs = get_option('virtfs') \
> diff --git a/ui/meson.build b/ui/meson.build
> index e9f48c5315..ec13949776 100644
> --- a/ui/meson.build
> +++ b/ui/meson.build
> @@ -81,7 +81,7 @@ if dbus_display
>                                            '--interface-prefix', 'org.qemu.',
>                                            '--c-namespace', 'QemuDBus',
>                                            '--generate-c-code', '@BASENAME@'])
> -  dbus_ss.add(when: [gio, pixman, opengl],
> +  dbus_ss.add(when: [gio, pixman, opengl, gbm],
>                if_true: [files(
>                  'dbus-chardev.c',
>                  'dbus-clipboard.c',
> --
> 2.36.1
>



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

end of thread, other threads:[~2022-07-28  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28  6:41 [PATCH] ui: dbus-display requires CONFIG_GBM Paolo Bonzini
2022-07-28  8:46 ` Daniel P. Berrangé
2022-07-28  9:46 ` Marc-André Lureau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.