qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 17/33] ui/dbus: win32 support


From: Philippe Mathieu-Daudé
Subject: Re: [PULL 17/33] ui/dbus: win32 support
Date: Sat, 1 Jul 2023 01:51:39 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 30/6/23 23:41, Marc-André Lureau wrote:
Hi

On Thu, Jun 29, 2023 at 7:55 PM Bernhard Beschow <shentey@gmail.com <mailto:shentey@gmail.com>> wrote:



    Am 27. Juni 2023 13:02:14 UTC schrieb marcandre.lureau@redhat.com
    <mailto:marcandre.lureau@redhat.com>:
     >From: Marc-André Lureau <marcandre.lureau@redhat.com
    <mailto:marcandre.lureau@redhat.com>>
     >
     >D-Bus doesn't support fd-passing on Windows (AF_UNIX doesn't have
     >SCM_RIGHTS yet, but there are other means to share objects. I have
     >proposed various solutions upstream, but none seem fitting enough
    atm).
     >
     >To make the "-display dbus" work on Windows, implement an alternative
     >D-Bus interface where all the 'h' (FDs) arguments are replaced with
     >'ay' (WSASocketW data), and sockets are passed to the other end via
     >WSADuplicateSocket().
     >
     >Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com
    <mailto:marcandre.lureau@redhat.com>>
     >Message-Id: <20230606115658.677673-6-marcandre.lureau@redhat.com
    <20230606115658.677673-6-marcandre.lureau@redhat.com">mailto:20230606115658.677673-6-marcandre.lureau@redhat.com>>
     >---
     > meson.build          |  4 +--
     > ui/dbus.h            |  6 +++++
     > audio/dbusaudio.c    | 44 +++++++++++++++++++++++++++------
     > ui/dbus-chardev.c    | 22 +++++++++++++----
     > ui/dbus-console.c    | 59
    ++++++++++++++++++++++++++++++++++++++------
     > ui/dbus-display1.xml | 28 +++++++++++++++++++++
     > ui/meson.build       |  9 ++++++-
     > 7 files changed, 149 insertions(+), 23 deletions(-)
     >
     >diff --git a/meson.build b/meson.build
     >index b409788832..9a1ce43471 100644
     >--- a/meson.build
     >+++ b/meson.build
     >@@ -838,6 +838,8 @@ if gdbus_codegen.found() and get_option('cfi')
     >   gdbus_codegen_error = '@0@ uses gdbus-codegen, which does not
    support control flow integrity'
     > endif
     >
     >+xml_pp = find_program('scripts/xml-preprocess.py')
     >+
     > lttng = not_found
     > if 'ust' in get_option('trace_backends')
     >   lttng = dependency('lttng-ust', required: true, version: '>= 2.1',
     >@@ -1985,8 +1987,6 @@ dbus_display = get_option('dbus_display') \
     >            error_message: '-display dbus requires glib>=2.64') \
     >   .require(gdbus_codegen.found(),
     >            error_message: gdbus_codegen_error.format('-display
    dbus')) \
     >-  .require(targetos != 'windows',
     >-           error_message: '-display dbus is not available on
    Windows') \
     >   .allowed()
     >
     > have_virtfs = get_option('virtfs') \
     >diff --git a/ui/dbus.h b/ui/dbus.h
     >index 9c149e7b41..1e8c24a48e 100644
     >--- a/ui/dbus.h
     >+++ b/ui/dbus.h
     >@@ -62,6 +62,12 @@ struct DBusDisplay {
     >     Notifier notifier;
     > };
     >
     >+#ifdef WIN32
     >+bool
     >+dbus_win32_import_socket(GDBusMethodInvocation *invocation,
     >+                         GVariant *arg_listener, int *socket);
     >+#endif
     >+
     > #define TYPE_DBUS_DISPLAY "dbus-display"
     > OBJECT_DECLARE_SIMPLE_TYPE(DBusDisplay, DBUS_DISPLAY)
     >
     >diff --git a/audio/dbusaudio.c b/audio/dbusaudio.c
     >index de59467d9e..7a11fbfb42 100644
     >--- a/audio/dbusaudio.c
     >+++ b/audio/dbusaudio.c
     >@@ -33,6 +33,7 @@
     > #include <gio/gunixfdlist.h>
     > #endif
     >
     >+#include "ui/dbus.h"

    This patch causes below compile error since pixman.h isn't found. It
    seems as if the pixman include path is missing. Since pixman.h is
    found elsewhere in the same build I suspect that the DBUS audio
    module now needs a pixman dependency -- which sounds a little bit
    weired.

    FAILED: libaudio-dbus.a.p/audio_dbusaudio.c.o
    cc -m64 -mcx16 -Ilibaudio-dbus.a.p -I. -I../src -Iqapi -Itrace -Iui
    -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
    -I/usr/include/sysprof-4 -I/usr/include/libmount
    -I/usr/include/blkid -I/usr/include/gio-unix-2.0
    -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O0
    -g -fstack-protector-strong -Wundef -Wwrite-strings
    -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls
    -Wold-style-declaration -Wold-style-definition -Wtype-limits
    -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
    -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined
    -Wimplicit-fallthrough=2 -Wmissing-format-attribute
    -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi
    -isystem qemu/src/linux-headers -isystem linux-headers -iquote .
    -iquote qemu/src -iquote qemu/src/include -iquote
    qemu/src/host/include/x86_64 -iquote qemu/src/host/include/generic
    -iquote qemu/src/tcg/i386 -Wno-unused-function -pthread
    -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
    -fno-strict-aliasing -fno-common -fwrapv -march=x86-64
    -mtune=generic -O2 -pipe -fno-plt -fexceptions
    -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
    -fstack-clash-protection -fcf-protection -fPIC -DBUILD_DSO -MD -MQ
    libaudio-dbus.a.p/audio_dbusaudio.c.o -MF
    libaudio-dbus.a.p/audio_dbusaudio.c.o.d -o
    libaudio-dbus.a.p/audio_dbusaudio.c.o -c ../src/audio/dbusaudio.c
    In file included from qemu/src/include/ui/console.h:4,
                      from qemu/src/ui/dbus.h:31,
                      from ../src/audio/dbusaudio.c:36:
    qemu/src/include/ui/qemu-pixman.h:12:10: fatal error: pixman.h: No
    such file or directory
        12 | #include <pixman.h>
           |          ^~~~~~~~~~


This is reported here:
https://gitlab.com/qemu-project/qemu/-/issues/1739 <https://gitlab.com/qemu-project/qemu/-/issues/1739>

I am going to send the patch.

I just send a patch fixing this error, see:
20230630234839.14716-1-philmd@linaro.org/">https://lore.kernel.org/qemu-devel/20230630234839.14716-1-philmd@linaro.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]