qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 04/18] ui: avoid warnings about directdb on Alpine / musl


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v4 04/18] ui: avoid warnings about directdb on Alpine / musl libc
Date: Wed, 15 Dec 2021 12:59:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 11/24/21 14:42, Daniel P. Berrangé wrote:
> On Wed, Nov 24, 2021 at 02:32:56PM +0100, Thomas Huth wrote:
>> On 24/11/2021 14.01, Daniel P. Berrangé wrote:
>>> On Alpine, SDL is built with directfb support and this triggers warnings
>>> during QEMU build
>>>
>>> In file included from /usr/include/directfb/direct/thread.h:38,
>>>                   from /usr/include/directfb/direct/debug.h:43,
>>>                   from /usr/include/directfb/direct/interface.h:36,
>>>                   from /usr/include/directfb/directfb.h:49,
>>>                   from /usr/include/SDL2/SDL_syswm.h:80,
>>>                   from /builds/berrange/qemu/include/ui/sdl2.h:8,
>>>                   from ../ui/sdl2-gl.c:31:
>>> /usr/include/directfb/direct/os/waitqueue.h:41:25: error: redundant 
>>> redeclaration of 'direct_waitqueue_init' [-Werror=redundant-decls]
>>>     41 | DirectResult DIRECT_API direct_waitqueue_init        ( 
>>> DirectWaitQueue *queue );
>>>        |                         ^~~~~~~~~~~~~~~~~~~~~
>>
>> I think that's a bug in the SDL2 package of Alpine. I've had trouble with
>> that one in the past already ... so not sure whether it's our job now to
>> work around bugs in that crappy Alpine package... I'd prefer if we simply do
>> not compile-test SDL on Alpine instead.
> 
> It is a harmless bug in directfb headers, which has no ill
> effects other than producing a warning when some app uses
> -Wredundant-decls.  Of course Alpine would ideally get this
> patched, but at the same time it is reasonable for Alpine
> users to want SDL and if someone has this package installed
> already we don't want QEMU build to break due to -Werror.

We should avoid adding #pragma directives in generic header,
but I agree -Wredundant-decls is harmless here, so:

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

> Case in point, as we auto-generate dockerfiles to ensure
> all pre-requisites are installed in all dockerfiles,  the
> Alpine dockerfile gains SDL and exposes this bug. We could
> turn off -Werror but that's a overly big hammer compared
> to this targetted fix.
> 
> Regards,
> Daniel
> 




reply via email to

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