* [Qemu-devel] QEMU fails to configure on non-x86 hosts with recent SDL2
@ 2018-03-05 10:24 Peter Maydell
2018-03-05 10:33 ` Daniel P. Berrangé
0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2018-03-05 10:24 UTC (permalink / raw)
To: QEMU Developers, Gerd Hoffmann
On non-x86 hosts with SDL2 2.0.8, configure fails:
config-host.mak is out-of-date, running configure
ERROR: configure test passed without -Werror but failed with -Werror.
This is probably a bug in the configure script. The failing command
will be at the bottom of config.log.
You can run configure with --disable-werror to bypass this check.
The relevant configure test is the SDL one:
#include <SDL.h>
#undef main /* We don't want SDL to override our main() */
int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
and it fails because on non-x86 platforms one of the SDL headers
triggers a -Wundef warning:
cc -Wundef -o zz9.o -I /usr/include/SDL2 -c qemu-conf.c
In file included from /usr/include/SDL2/SDL.h:38:0,
from qemu-conf.c:1:
/usr/include/SDL2/SDL_cpuinfo.h:63:5: warning: "HAVE_IMMINTRIN_H" is
not defined, evaluates to 0 [-Wundef]
#if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
^~~~~~~~~~~~~~~~
I've reported the bug to debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892087
(who will probably forward it upstream), but since this version
of SDL is already released, I guess we need to work around it it
QEMU...
Any suggestions for how to do a workaround?
thanks
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] QEMU fails to configure on non-x86 hosts with recent SDL2
2018-03-05 10:24 [Qemu-devel] QEMU fails to configure on non-x86 hosts with recent SDL2 Peter Maydell
@ 2018-03-05 10:33 ` Daniel P. Berrangé
2018-03-07 14:11 ` Gerd Hoffmann
0 siblings, 1 reply; 5+ messages in thread
From: Daniel P. Berrangé @ 2018-03-05 10:33 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers, Gerd Hoffmann
On Mon, Mar 05, 2018 at 10:24:41AM +0000, Peter Maydell wrote:
> On non-x86 hosts with SDL2 2.0.8, configure fails:
>
>
> config-host.mak is out-of-date, running configure
>
> ERROR: configure test passed without -Werror but failed with -Werror.
> This is probably a bug in the configure script. The failing command
> will be at the bottom of config.log.
> You can run configure with --disable-werror to bypass this check.
>
> The relevant configure test is the SDL one:
> #include <SDL.h>
> #undef main /* We don't want SDL to override our main() */
> int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
>
> and it fails because on non-x86 platforms one of the SDL headers
> triggers a -Wundef warning:
>
> cc -Wundef -o zz9.o -I /usr/include/SDL2 -c qemu-conf.c
> In file included from /usr/include/SDL2/SDL.h:38:0,
> from qemu-conf.c:1:
> /usr/include/SDL2/SDL_cpuinfo.h:63:5: warning: "HAVE_IMMINTRIN_H" is
> not defined, evaluates to 0 [-Wundef]
> #if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
> ^~~~~~~~~~~~~~~~
Ewwww, even ignoring the -Wundef issue, this is a really unpleasant
approach from SDL. All these HAVE_* symbols SDL2 tests & defines
are polluting the global header namespace and could easily clash
with symbols defined by QEMU / $APP's own configure.ac script :-(
> Any suggestions for how to do a workaround?
Drop -Wundef when running the configiure test, or override it with -Wno-undef
If the actual ui/sdl* files fail for same reason, we could use a gcc
pragma top disable -Wundef in just those files, or set -Wno-undef in
CFLAGS on a per-.o file basis in Makefile.objs
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] 5+ messages in thread
* Re: [Qemu-devel] QEMU fails to configure on non-x86 hosts with recent SDL2
2018-03-05 10:33 ` Daniel P. Berrangé
@ 2018-03-07 14:11 ` Gerd Hoffmann
2018-03-07 14:18 ` Peter Maydell
0 siblings, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2018-03-07 14:11 UTC (permalink / raw)
To: Daniel P. Berrangé; +Cc: Peter Maydell, QEMU Developers
Hi,
> > Any suggestions for how to do a workaround?
>
> Drop -Wundef when running the configiure test, or override it with -Wno-undef
>
> If the actual ui/sdl* files fail for same reason, we could use a gcc
> pragma top disable -Wundef in just those files, or set -Wno-undef in
> CFLAGS on a per-.o file basis in Makefile.objs
What is the status here? Could you try this peter? Don't have a test
box with SDL 2.0.8 at hand ...
Any reaction from debian/upstream? Given that this probably affects
pretty much any SDL user and 2.0.8 is a few days old only a quick 2.0.9
bugfix release would be the best solution I guess.
cheers,
Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] QEMU fails to configure on non-x86 hosts with recent SDL2
2018-03-07 14:11 ` Gerd Hoffmann
@ 2018-03-07 14:18 ` Peter Maydell
2018-03-07 15:42 ` Gerd Hoffmann
0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2018-03-07 14:18 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: Daniel P. Berrangé, QEMU Developers
On 7 March 2018 at 14:11, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
>> > Any suggestions for how to do a workaround?
>>
>> Drop -Wundef when running the configiure test, or override it with -Wno-undef
>>
>> If the actual ui/sdl* files fail for same reason, we could use a gcc
>> pragma top disable -Wundef in just those files, or set -Wno-undef in
>> CFLAGS on a per-.o file basis in Makefile.objs
>
> What is the status here? Could you try this peter? Don't have a test
> box with SDL 2.0.8 at hand ...
Haven't tried it, but I'm pretty sure it would work. For the
moment I just passed --disable-sdl to configure...
> Any reaction from debian/upstream? Given that this probably affects
> pretty much any SDL user and 2.0.8 is a few days old only a quick 2.0.9
> bugfix release would be the best solution I guess.
Nothing from Debian yet; haven't tried to contact upstream
(feel free to do that yourself).
thanks
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] QEMU fails to configure on non-x86 hosts with recent SDL2
2018-03-07 14:18 ` Peter Maydell
@ 2018-03-07 15:42 ` Gerd Hoffmann
0 siblings, 0 replies; 5+ messages in thread
From: Gerd Hoffmann @ 2018-03-07 15:42 UTC (permalink / raw)
To: Peter Maydell; +Cc: Daniel P. Berrangé, QEMU Developers
On Wed, Mar 07, 2018 at 02:18:02PM +0000, Peter Maydell wrote:
> On 7 March 2018 at 14:11, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > Hi,
> >
> >> Drop -Wundef when running the configiure test, or override it with -Wno-undef
> >>
> >> If the actual ui/sdl* files fail for same reason, we could use a gcc
> >> pragma top disable -Wundef in just those files, or set -Wno-undef in
> >> CFLAGS on a per-.o file basis in Makefile.objs
> >
> > What is the status here? Could you try this peter? Don't have a test
> > box with SDL 2.0.8 at hand ...
>
> Haven't tried it, but I'm pretty sure it would work. For the
> moment I just passed --disable-sdl to configure...
Ok, fedora rawhide has updated packages too. With that recompiled I can
reproduce the issue. The workaround is a one-liner, for both configure
and the sdl object builds.
cheers,
Gerd
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-03-07 15:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-05 10:24 [Qemu-devel] QEMU fails to configure on non-x86 hosts with recent SDL2 Peter Maydell
2018-03-05 10:33 ` Daniel P. Berrangé
2018-03-07 14:11 ` Gerd Hoffmann
2018-03-07 14:18 ` Peter Maydell
2018-03-07 15:42 ` Gerd Hoffmann
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).