qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] egl-helpers.h: add a missing X11 include


From: Alexander Kanavin
Subject: Re: [Qemu-devel] [PATCH] egl-helpers.h: add a missing X11 include
Date: Tue, 15 Jan 2019 21:47:08 +0100

On Tue, 15 Jan 2019 at 20:58, Philippe Mathieu-Daudé <address@hidden> wrote:
> Cc'ing Gerd (the maintainer) and Marc-André.
>
> On 1/15/19 12:50 PM, Alexander Kanavin wrote:
> > Otherwise these errors occur, when qemu is built in the Yocto project:
> > | In file included from 
> > /home/alexander/development/poky/build-virgl-gtk-64/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-qemu/3.1.0-r0/qemu-3.1.0/include/ui/egl-context.h:5,
> > |                  from 
> > /home/alexander/development/poky/build-virgl-gtk-64/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-qemu/3.1.0-r0/qemu-3.1.0/ui/egl-context.c:3:
> > | 
> > /home/alexander/development/poky/build-virgl-gtk-64/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-qemu/3.1.0-r0/qemu-3.1.0/include/ui/egl-helpers.h:46:55:
> >  error: unknown type name 'Window'; did you mean 'minor'?
> > |  EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win);
> > |                                                        ^~~~~~
> > |                                                        minor
>
> Can you provide more information to reproduce this failure?
>
> It seems some dependency is missing in your build setup. Missing headers
> would trigger the definition of MESA_EGL_NO_X11_HEADERS and this error.
>
> <epoxy/egl.h> includes <EGL/eglplatform.h> which contains:
>
>   #if defined(MESA_EGL_NO_X11_HEADERS)
>   typedef void            *EGLNativeDisplayType;
>   typedef khronos_uintptr_t EGLNativePixmapType;
>   typedef khronos_uintptr_t EGLNativeWindowType;
>   #else
>   /* X11 (tentative)  */
>   #include <X11/Xlib.h>
>
> So Window should already be declared.

Hello Philippe,

we build mesa explicitly using "--with-platforms='drm surfaceless'"
(x11 is not in the list), which means MESA_EGL_NO_X11_HEADERS is
indeed defined according to [1]. We also enable opengl and gtk in
qemu.
I believe this is a valid configuration, and so should not lead to
compile errors (we're fine if it will cause run-time errors for some
combinations of qemu options). A header should not rely on a
conditional include happening somewhere else.

[1] https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac#n2533

Thanks,
Alex



reply via email to

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