All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Müller" <schnitzeltony@googlemail.com>
To: "Noor, Ahsan" <noor_ahsan@mentor.com>
Cc: "meta-freescale@yoctoproject.org" <meta-freescale@yoctoproject.org>
Subject: Re: [PATCH] qtbase: Fix qeglplatformscreen.c compilation issue due refinition on None.
Date: Sun, 13 Sep 2015 22:56:42 +0200	[thread overview]
Message-ID: <CALbNGRQpaMKM-GYdEnciRHCFaON6Dii7etMddz=qEdi08D0JBA@mail.gmail.com> (raw)
In-Reply-To: <1441964543-1042-1-git-send-email-noor_ahsan@mentor.com>

On Fri, Sep 11, 2015 at 11:42 AM, Noor, Ahsan <noor_ahsan@mentor.com> wrote:
> From: Noor <noor_ahsan@mentor.com>
>
> * In Qt5.5 qeglplatformscreen.c includes qurl.h and X.h (via eglvivante.h). X.h
>   define None to 0L but qurl.h set None to 0 in enum. Due to this do_compile task
>   fails saying "qurl.h:131:9: error: expected identifier before numeric constant".
>   This patch undefine None in qurl.h if it is define earlier.
>
> Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
> ---
>  .../qtbase/fix_multiple_definition_of_None.patch   |   41 ++++++++++++++++++++
>  qt5-layer/recipes-qt/qt5/qtbase_%.bbappend         |    4 +-
>  2 files changed, 44 insertions(+), 1 deletion(-)
>
> diff --git a/qt5-layer/recipes-qt/qt5/qtbase/fix_multiple_definition_of_None.patch b/qt5-layer/recipes-qt/qt5/qtbase/fix_multiple_definition_of_None.patch
> new file mode 100644
> index 0000000..f5b2abf
> --- /dev/null
> +++ b/qt5-layer/recipes-qt/qt5/qtbase/fix_multiple_definition_of_None.patch
> @@ -0,0 +1,41 @@
> +Workaround qeglplatformscreen.c failure in Qt5.5 due to inclusion of qurl.h and X.h. X.h define None to 0L and qurl.h set None to 0 in enum. Due to this following error occur. Undef None in qurl.h if it is defined.
> +
> +In file included from /home/noor/SB/release_2015.12/build/tmp/sysroots/imx6qsabresd/usr/include/X11/Xlib.h:44:0,
> +                 from /home/noor/SB/release_2015.12/build/tmp/sysroots/imx6qsabresd/usr/include/EGL/eglvivante.h:244,
> +                 from /home/noor/SB/release_2015.12/build/tmp/sysroots/imx6qsabresd/usr/include/EGL/eglplatform.h:38,
> +                 from /home/noor/SB/release_2015.12/build/tmp/sysroots/imx6qsabresd/usr/include/EGL/egl.h:39,
> +                 from /home/noor/SB/release_2015.12/build/tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/qtbase/5.5.0+gitAUTOINC+2fde9f59ee-r0/git/src/platformsupport/eglconvenience/qeglplatformscreen_p.h:52,
> +                 from /home/noor/SB/release_2015.12/build/tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/qtbase/5.5.0+gitAUTOINC+2fde9f59ee-r0/git/src/platformsupport/eglconvenience/qeglplatformscreen.cpp:34:
> +../../include/QtCore/../../../git/src/corelib/io/qurl.h:131:9: error: expected identifier before numeric constant
> +         None = 0x0,
> +         ^
> +../../include/QtCore/../../../git/src/corelib/io/qurl.h:131:9: error: expected '}' before numeric constant
> +../../include/QtCore/../../../git/src/corelib/io/qurl.h:131:9: error: expected unqualified-id before numeric constant
> +In file included from ../../include/QtCore/qurl.h:1:0,
> +                 from ../../include/QtGui/../../../git/src/gui/kernel/qevent.h:48,
> +                 from ../../include/QtGui/qevent.h:1,
> +                 from ../../include/QtGui/QTouchEvent:1,
> +                 from ../../include/QtGui/5.5.0/QtGui/qpa/../../../../../../git/src/gui/kernel/qwindowsysteminterface.h:53,
> +                 from ../../include/QtGui/5.5.0/QtGui/qpa/qwindowsysteminterface.h:1,
> +                 from /home/noor/SB/release_2015.12/build/tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/qtbase/5.5.0+gitAUTOINC+2fde9f59ee-r0/git/src/platformsupport/eglconvenience/qeglplatformscreen.cpp:37:
> +../../include/QtCore/../../../git/src/corelib/io/qurl.h:163:26: error: 'UrlFormattingOption' was not declared in this scope
> +     typedef QUrlTwoFlags<UrlFormattingOption, ComponentFormattingOption> FormattingOptions;
> +....
> +
> +
> +Upstream-Status: Inappropriate [workaround]
> +
> +diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
> +index e6c570d..06de3af 100644
> +--- a/src/corelib/io/qurl.h
> ++++ b/src/corelib/io/qurl.h
> +@@ -128,6 +128,9 @@ public:
> +
> +     // encoding / toString values
> +     enum UrlFormattingOption {
> ++#ifdef None
> ++#undef None
> ++#endif
> +         None = 0x0,
> +         RemoveScheme = 0x1,
> +         RemovePassword = 0x2,
> diff --git a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
> index e0979bf..4ad4c5c 100644
> --- a/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
> +++ b/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
> @@ -2,7 +2,9 @@
>
>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>
> -SRC_URI += "file://Force_egl_visual_ID_33.patch"
> +SRC_URI += "file://Force_egl_visual_ID_33.patch \
> +            file://fix_multiple_definition_of_None.patch \
> +"
>
>  HAS_X11 = "${@base_contains('DISTRO_FEATURES', 'x11', 1, 0, d)}"
>
> --
> 1.7.9.5
>
> --
FYI: I've sent a patch to meta-qt5 - which just changes the sequence
of files included in qeglplatformscreen.cpp (QT 5.5!). Result is same
but approach is more simple I think.

Andreas


  reply	other threads:[~2015-09-13 20:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11  9:42 [PATCH] qtbase: Fix qeglplatformscreen.c compilation issue due refinition on None Noor, Ahsan
2015-09-13 20:56 ` Andreas Müller [this message]
2015-09-14 13:10   ` Otavio Salvador
  -- strict thread matches above, loose matches on Subject: below --
2015-09-10 11:30 Noor, Ahsan
2015-09-11  6:34 ` Ahsan, Noor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALbNGRQpaMKM-GYdEnciRHCFaON6Dii7etMddz=qEdi08D0JBA@mail.gmail.com' \
    --to=schnitzeltony@googlemail.com \
    --cc=meta-freescale@yoctoproject.org \
    --cc=noor_ahsan@mentor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.