* [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1
@ 2019-01-24 1:36 Philippe Mathieu-Daudé
2019-01-24 2:00 ` Kamil Rytarowski
2019-01-24 2:03 ` Brad Smith
0 siblings, 2 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-24 1:36 UTC (permalink / raw)
To: qemu-devel
Cc: Eric Blake, Brad Smith, Peter Maydell,
Philippe Mathieu-Daudé
OpenBSD display various warnings about the use of an undefined __HAIKU__:
CC ui/egl-context.o
In file included from /usr/X11R6/include/epoxy/egl_generated.h:10:0,
from /usr/X11R6/include/epoxy/egl.h:46,
from include/ui/egl-helpers.h:5,
from include/ui/egl-context.h:5,
from ui/egl-context.c:3:
/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
#elif __HAIKU__
^
CC ui/egl-helpers.o
/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
CC ui/egl-headless.o
/usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
This is due to a old <epoxy/egl_generated.h>:
70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
...
108 #elif defined(__unix__) || defined(__APPLE__)
128 #elif __HAIKU__
134 #else
135 #error "Platform not recognized"
136 #endif
Kludge this by adding a check to ./configure: if this warning occurs,
define __HAIKU__ from the CFLAGS.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
This is ugly, hopefully someone can come with a clever idea :)
configure | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/configure b/configure
index 8f312ac3e2..7c7eee44da 100755
--- a/configure
+++ b/configure
@@ -4036,6 +4036,17 @@ EOF
if compile_prog "" "" ; then
opengl_dmabuf=yes
fi
+ cat > $TMPC << EOF
+#include <epoxy/egl.h>
+int main(void) { return 0; }
+EOF
+ if test "$targetos" = "OpenBSD" ; then
+ if ! compile_prog "-Wundef -Werror" "" ; then
+ if compile_prog "-Wundef -Werror -D__HAIKU__=0" "" ; then
+ QEMU_CFLAGS="$QEMU_CFLAGS -D__HAIKU__=0"
+ fi
+ fi
+ fi
fi
##########################################
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1
2019-01-24 1:36 [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1 Philippe Mathieu-Daudé
@ 2019-01-24 2:00 ` Kamil Rytarowski
2019-01-24 10:39 ` Philippe Mathieu-Daudé
2019-01-24 2:03 ` Brad Smith
1 sibling, 1 reply; 6+ messages in thread
From: Kamil Rytarowski @ 2019-01-24 2:00 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Peter Maydell, Brad Smith
[-- Attachment #1: Type: text/plain, Size: 2284 bytes --]
On 24.01.2019 02:36, Philippe Mathieu-Daudé wrote:
> OpenBSD display various warnings about the use of an undefined __HAIKU__:
>
Please report it to OpenBSD and/or 3rd party libs. It's just a warning
in public headers, not an issue on the qemu side.
> CC ui/egl-context.o
> In file included from /usr/X11R6/include/epoxy/egl_generated.h:10:0,
> from /usr/X11R6/include/epoxy/egl.h:46,
> from include/ui/egl-helpers.h:5,
> from include/ui/egl-context.h:5,
> from ui/egl-context.c:3:
> /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
> #elif __HAIKU__
> ^
> CC ui/egl-helpers.o
> /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
> CC ui/egl-headless.o
> /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
>
> This is due to a old <epoxy/egl_generated.h>:
>
> 70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
> ...
> 108 #elif defined(__unix__) || defined(__APPLE__)
> 128 #elif __HAIKU__
> 134 #else
> 135 #error "Platform not recognized"
> 136 #endif
>
> Kludge this by adding a check to ./configure: if this warning occurs,
> define __HAIKU__ from the CFLAGS.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> This is ugly, hopefully someone can come with a clever idea :)
>
> configure | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/configure b/configure
> index 8f312ac3e2..7c7eee44da 100755
> --- a/configure
> +++ b/configure
> @@ -4036,6 +4036,17 @@ EOF
> if compile_prog "" "" ; then
> opengl_dmabuf=yes
> fi
> + cat > $TMPC << EOF
> +#include <epoxy/egl.h>
> +int main(void) { return 0; }
> +EOF
> + if test "$targetos" = "OpenBSD" ; then
> + if ! compile_prog "-Wundef -Werror" "" ; then
> + if compile_prog "-Wundef -Werror -D__HAIKU__=0" "" ; then
> + QEMU_CFLAGS="$QEMU_CFLAGS -D__HAIKU__=0"
> + fi
> + fi
> + fi
> fi
>
> ##########################################
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 850 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1
2019-01-24 2:00 ` Kamil Rytarowski
@ 2019-01-24 10:39 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-24 10:39 UTC (permalink / raw)
To: Kamil Rytarowski, qemu-devel; +Cc: Peter Maydell, Brad Smith
[-- Attachment #1: Type: text/plain, Size: 2565 bytes --]
On 1/24/19 3:00 AM, Kamil Rytarowski wrote:
> On 24.01.2019 02:36, Philippe Mathieu-Daudé wrote:
>> OpenBSD display various warnings about the use of an undefined __HAIKU__:
>>
>
> Please report it to OpenBSD and/or 3rd party libs. It's just a warning
> in public headers, not an issue on the qemu side.
Brad said it should be fixed in OpenBSD 6.5:
https://cgit.freedesktop.org/mesa/mesa/commit/include/EGL/eglplatform.h?id=f744c6c1e28fe363474550b94af42a8b7fc1c755
>
>> CC ui/egl-context.o
>> In file included from /usr/X11R6/include/epoxy/egl_generated.h:10:0,
>> from /usr/X11R6/include/epoxy/egl.h:46,
>> from include/ui/egl-helpers.h:5,
>> from include/ui/egl-context.h:5,
>> from ui/egl-context.c:3:
>> /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
>> #elif __HAIKU__
>> ^
>> CC ui/egl-helpers.o
>> /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
>> CC ui/egl-headless.o
>> /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
>>
>> This is due to a old <epoxy/egl_generated.h>:
>>
>> 70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
>> ...
>> 108 #elif defined(__unix__) || defined(__APPLE__)
>> 128 #elif __HAIKU__
>> 134 #else
>> 135 #error "Platform not recognized"
>> 136 #endif
>>
>> Kludge this by adding a check to ./configure: if this warning occurs,
>> define __HAIKU__ from the CFLAGS.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> This is ugly, hopefully someone can come with a clever idea :)
>>
>> configure | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/configure b/configure
>> index 8f312ac3e2..7c7eee44da 100755
>> --- a/configure
>> +++ b/configure
>> @@ -4036,6 +4036,17 @@ EOF
>> if compile_prog "" "" ; then
>> opengl_dmabuf=yes
>> fi
>> + cat > $TMPC << EOF
>> +#include <epoxy/egl.h>
>> +int main(void) { return 0; }
>> +EOF
>> + if test "$targetos" = "OpenBSD" ; then
>> + if ! compile_prog "-Wundef -Werror" "" ; then
>> + if compile_prog "-Wundef -Werror -D__HAIKU__=0" "" ; then
>> + QEMU_CFLAGS="$QEMU_CFLAGS -D__HAIKU__=0"
>> + fi
>> + fi
>> + fi
>> fi
>>
>> ##########################################
>>
>
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1
2019-01-24 1:36 [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1 Philippe Mathieu-Daudé
2019-01-24 2:00 ` Kamil Rytarowski
@ 2019-01-24 2:03 ` Brad Smith
2019-01-24 10:11 ` Peter Maydell
1 sibling, 1 reply; 6+ messages in thread
From: Brad Smith @ 2019-01-24 2:03 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Eric Blake, Peter Maydell
https://cgit.freedesktop.org/mesa/mesa/commit/include/EGL/eglplatform.h?id=f744c6c1e28fe363474550b94af42a8b7fc1c755
Unfortunately that issue has only been fixed very recently.
There is a possibility of us updating from Mesa 17.3.9 to 18.3.x which
would bring in this header fix, but I don't know how long that will be
and it's currently held up on us switching i386 from bfd ld to lld.
So this header exists as is from 6.0 to the latest, most likely next release
(6.5) too.
Honestly I think it would be better to just ignore this particular
issue. It's
an issue with a header outside of QEMU and it will go away in time when
Mesa is eventually updated.
On 1/23/2019 8:36 PM, Philippe Mathieu-Daudé wrote:
> OpenBSD display various warnings about the use of an undefined __HAIKU__:
>
> CC ui/egl-context.o
> In file included from /usr/X11R6/include/epoxy/egl_generated.h:10:0,
> from /usr/X11R6/include/epoxy/egl.h:46,
> from include/ui/egl-helpers.h:5,
> from include/ui/egl-context.h:5,
> from ui/egl-context.c:3:
> /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
> #elif __HAIKU__
> ^
> CC ui/egl-helpers.o
> /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
> CC ui/egl-headless.o
> /usr/X11R6/include/EGL/eglplatform.h:128:7: warning: "__HAIKU__" is not defined [-Wundef]
>
> This is due to a old <epoxy/egl_generated.h>:
>
> 70 #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
> ...
> 108 #elif defined(__unix__) || defined(__APPLE__)
> 128 #elif __HAIKU__
> 134 #else
> 135 #error "Platform not recognized"
> 136 #endif
>
> Kludge this by adding a check to ./configure: if this warning occurs,
> define __HAIKU__ from the CFLAGS.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> This is ugly, hopefully someone can come with a clever idea :)
>
> configure | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/configure b/configure
> index 8f312ac3e2..7c7eee44da 100755
> --- a/configure
> +++ b/configure
> @@ -4036,6 +4036,17 @@ EOF
> if compile_prog "" "" ; then
> opengl_dmabuf=yes
> fi
> + cat > $TMPC << EOF
> +#include <epoxy/egl.h>
> +int main(void) { return 0; }
> +EOF
> + if test "$targetos" = "OpenBSD" ; then
> + if ! compile_prog "-Wundef -Werror" "" ; then
> + if compile_prog "-Wundef -Werror -D__HAIKU__=0" "" ; then
> + QEMU_CFLAGS="$QEMU_CFLAGS -D__HAIKU__=0"
> + fi
> + fi
> + fi
> fi
>
> ##########################################
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1
2019-01-24 2:03 ` Brad Smith
@ 2019-01-24 10:11 ` Peter Maydell
2019-01-24 10:38 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2019-01-24 10:11 UTC (permalink / raw)
To: Brad Smith; +Cc: Philippe Mathieu-Daudé, QEMU Developers, Eric Blake
On Thu, 24 Jan 2019 at 02:03, Brad Smith <brad@comstyle.com> wrote:
>
> https://cgit.freedesktop.org/mesa/mesa/commit/include/EGL/eglplatform.h?id=f744c6c1e28fe363474550b94af42a8b7fc1c755
>
> Unfortunately that issue has only been fixed very recently.
>
> There is a possibility of us updating from Mesa 17.3.9 to 18.3.x which
> would bring in this header fix, but I don't know how long that will be
> and it's currently held up on us switching i386 from bfd ld to lld.
>
> So this header exists as is from 6.0 to the latest, most likely next release
> (6.5) too.
>
> Honestly I think it would be better to just ignore this particular
> issue. It's
> an issue with a header outside of QEMU and it will go away in time when
> Mesa is eventually updated.
Yes; I have been ignoring this warning for a while now
in my scripts that handle looking for warnings in build logs:
https://git.linaro.org/people/peter.maydell/misc-scripts.git/commit/greplogs?id=951983351baa2f27da4f4fe432fb55bf911d17e5
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1
2019-01-24 10:11 ` Peter Maydell
@ 2019-01-24 10:38 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-24 10:38 UTC (permalink / raw)
To: Peter Maydell, Brad Smith; +Cc: QEMU Developers, Eric Blake
On 1/24/19 11:11 AM, Peter Maydell wrote:
> On Thu, 24 Jan 2019 at 02:03, Brad Smith <brad@comstyle.com> wrote:
>>
>> https://cgit.freedesktop.org/mesa/mesa/commit/include/EGL/eglplatform.h?id=f744c6c1e28fe363474550b94af42a8b7fc1c755
>>
>> Unfortunately that issue has only been fixed very recently.
>>
>> There is a possibility of us updating from Mesa 17.3.9 to 18.3.x which
>> would bring in this header fix, but I don't know how long that will be
>> and it's currently held up on us switching i386 from bfd ld to lld.
>>
>> So this header exists as is from 6.0 to the latest, most likely next release
>> (6.5) too.
>>
>> Honestly I think it would be better to just ignore this particular
>> issue. It's
>> an issue with a header outside of QEMU and it will go away in time when
>> Mesa is eventually updated.
Yeah, fine by me.
>
> Yes; I have been ignoring this warning for a while now
> in my scripts that handle looking for warnings in build logs:
>
> https://git.linaro.org/people/peter.maydell/misc-scripts.git/commit/greplogs?id=951983351baa2f27da4f4fe432fb55bf911d17e5
Thanks, useful tip.
I liked:
+ grep -v 'is almost always misused' | \
+ grep -v 'is often misused' | \
+ grep -v 'is dangerous; do not use it' | \
:)
>
> thanks
> -- PMM
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-01-24 10:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-24 1:36 [Qemu-devel] [RFC PATCH] ui/egl: Silent '__HAIKU__ undefined' warnings on OpenBSD 6.1 Philippe Mathieu-Daudé
2019-01-24 2:00 ` Kamil Rytarowski
2019-01-24 10:39 ` Philippe Mathieu-Daudé
2019-01-24 2:03 ` Brad Smith
2019-01-24 10:11 ` Peter Maydell
2019-01-24 10:38 ` Philippe Mathieu-Daudé
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).