All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/qt5/qt5base: fix icu detection in Qt 5.6.3
@ 2019-09-13 12:47 Andrey Skvortsov
  2019-09-21 11:42 ` Arnout Vandecappelle
  0 siblings, 1 reply; 5+ messages in thread
From: Andrey Skvortsov @ 2019-09-13 12:47 UTC (permalink / raw)
  To: buildroot

icu is required to build Q5tWebkit.
When UChar is defined as char16_t in ICU, then qtbase fails to detect ICU.
The issue is described https://bugreports.qt.io/browse/QTBUG-49586

Build fails with following error messages:
...
ustring.h:473:20: error: ?UChar? does not name a type
 u_strCompare(const UChar *s1, int32_t length1,
                    ^
          ^
make[2]: *** [Makefile:195: icu.o] Error 1
ICU disabled.
The ICU library support cannot be enabled.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
---
 .../0004-fix-icu-build-for-qt5webkit.patch    | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch

diff --git a/package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch b/package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch
new file mode 100644
index 0000000000..849770e2e0
--- /dev/null
+++ b/package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch
@@ -0,0 +1,39 @@
+diff -purN qt5base-5.6.3.orig/config.tests/unix/compile.test qt5base-5.6.3/config.tests/unix/compile.test
+--- qt5base-5.6.3.orig/config.tests/unix/compile.test	2019-08-11 00:35:33.181545706 +0300
++++ qt5base-5.6.3/config.tests/unix/compile.test	2017-09-06 15:13:54.000000000 +0300
+@@ -47,7 +47,7 @@ while [ "$#" -gt 0 ]; do
+         INC=`echo $PARAM | sed -e 's/^-I//'`
+         INCLUDEPATH="$INCLUDEPATH \"$INC\""
+         ;;
+-    -f*|-D*)
++    -f*|-D*|-std=*)
+         CFLAGS="$CFLAGS \"$PARAM\""
+         CXXFLAGS="$CXXFLAGS \"$PARAM\""
+         ;;
+diff -purN qt5base-5.6.3.orig/configure qt5base-5.6.3/configure
+--- qt5base-5.6.3.orig/configure	2019-08-11 00:57:45.488214036 +0300
++++ qt5base-5.6.3/configure	2017-09-06 15:13:54.000000000 +0300
+@@ -5183,8 +5183,10 @@ fi
+ 
+ # auto-detect libicu support
+ if [ "$CFG_ICU" != "no" ]; then
++    QT_CXXFLAGS_ICU="-std=c++11"
++    if compileTest unix/icu "ICU" $QT_CXXFLAGS_ICU; then
+-    if compileTest unix/icu "ICU"; then
+         [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
++        QMakeVar set QT_CXXFLAGS_ICU "$QT_CXXFLAGS_ICU"
+     else
+         if [ "$CFG_ICU" = "auto" ]; then
+             CFG_ICU=no
+diff -purN qt5base-5.6.3.orig/doc/Makefile qt5base-5.6.3/doc/Makefile
+diff -purN qt5base-5.6.3.orig/src/corelib/tools/tools.pri qt5base-5.6.3/src/corelib/tools/tools.pri
+--- qt5base-5.6.3.orig/src/corelib/tools/tools.pri	2019-08-11 00:45:45.073818635 +0300
++++ qt5base-5.6.3/src/corelib/tools/tools.pri	2017-09-06 15:13:54.000000000 +0300
+@@ -169,6 +169,7 @@ contains(QT_CONFIG,icu) {
+                tools/qcollator_icu.cpp \
+                tools/qtimezoneprivate_icu.cpp
+     DEFINES += QT_USE_ICU
++    QMAKE_CXXFLAGS += $$QT_CXXFLAGS_ICU
+ } else: win32 {
+     SOURCES += tools/qcollator_win.cpp
+ } else: macx {
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/1] package/qt5/qt5base: fix icu detection in Qt 5.6.3
  2019-09-13 12:47 [Buildroot] [PATCH 1/1] package/qt5/qt5base: fix icu detection in Qt 5.6.3 Andrey Skvortsov
@ 2019-09-21 11:42 ` Arnout Vandecappelle
  2019-09-30 13:51   ` [Buildroot] [PATCH v2] " Andrey Skvortsov
  0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2019-09-21 11:42 UTC (permalink / raw)
  To: buildroot

 Hi Andrey,

On 13/09/2019 14:47, Andrey Skvortsov wrote:
> icu is required to build Q5tWebkit.
> When UChar is defined as char16_t in ICU, then qtbase fails to detect ICU.
> The issue is described https://bugreports.qt.io/browse/QTBUG-49586
> 
> Build fails with following error messages:
> ...
> ustring.h:473:20: error: ?UChar? does not name a type
>  u_strCompare(const UChar *s1, int32_t length1,
>                     ^
>           ^
> make[2]: *** [Makefile:195: icu.o] Error 1
> ICU disabled.
> The ICU library support cannot be enabled.
> 
> Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
> ---
>  .../0004-fix-icu-build-for-qt5webkit.patch    | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch
> 
> diff --git a/package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch b/package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch
> new file mode 100644
> index 0000000000..849770e2e0
> --- /dev/null
> +++ b/package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch
> @@ -0,0 +1,39 @@
> +diff -purN qt5base-5.6.3.orig/config.tests/unix/compile.test qt5base-5.6.3/config.tests/unix/compile.test
> +--- qt5base-5.6.3.orig/config.tests/unix/compile.test	2019-08-11 00:35:33.181545706 +0300
> ++++ qt5base-5.6.3/config.tests/unix/compile.test	2017-09-06 15:13:54.000000000 +0300

 Patches must have a description (like a commit message), including a
signed-off-by. You should also specify the upstream status of the patch. And
since qt5base is a git project, preferably it should be a git formatted patch. See

 https://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches


 Regards,
 Arnout


> +@@ -47,7 +47,7 @@ while [ "$#" -gt 0 ]; do
> +         INC=`echo $PARAM | sed -e 's/^-I//'`
> +         INCLUDEPATH="$INCLUDEPATH \"$INC\""
> +         ;;
> +-    -f*|-D*)
> ++    -f*|-D*|-std=*)
> +         CFLAGS="$CFLAGS \"$PARAM\""
> +         CXXFLAGS="$CXXFLAGS \"$PARAM\""
> +         ;;
> +diff -purN qt5base-5.6.3.orig/configure qt5base-5.6.3/configure
> +--- qt5base-5.6.3.orig/configure	2019-08-11 00:57:45.488214036 +0300
> ++++ qt5base-5.6.3/configure	2017-09-06 15:13:54.000000000 +0300
> +@@ -5183,8 +5183,10 @@ fi
> + 
> + # auto-detect libicu support
> + if [ "$CFG_ICU" != "no" ]; then
> ++    QT_CXXFLAGS_ICU="-std=c++11"
> ++    if compileTest unix/icu "ICU" $QT_CXXFLAGS_ICU; then
> +-    if compileTest unix/icu "ICU"; then
> +         [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
> ++        QMakeVar set QT_CXXFLAGS_ICU "$QT_CXXFLAGS_ICU"
> +     else
> +         if [ "$CFG_ICU" = "auto" ]; then
> +             CFG_ICU=no
> +diff -purN qt5base-5.6.3.orig/doc/Makefile qt5base-5.6.3/doc/Makefile
> +diff -purN qt5base-5.6.3.orig/src/corelib/tools/tools.pri qt5base-5.6.3/src/corelib/tools/tools.pri
> +--- qt5base-5.6.3.orig/src/corelib/tools/tools.pri	2019-08-11 00:45:45.073818635 +0300
> ++++ qt5base-5.6.3/src/corelib/tools/tools.pri	2017-09-06 15:13:54.000000000 +0300
> +@@ -169,6 +169,7 @@ contains(QT_CONFIG,icu) {
> +                tools/qcollator_icu.cpp \
> +                tools/qtimezoneprivate_icu.cpp
> +     DEFINES += QT_USE_ICU
> ++    QMAKE_CXXFLAGS += $$QT_CXXFLAGS_ICU
> + } else: win32 {
> +     SOURCES += tools/qcollator_win.cpp
> + } else: macx {
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2] package/qt5/qt5base: fix icu detection in Qt 5.6.3
  2019-09-21 11:42 ` Arnout Vandecappelle
@ 2019-09-30 13:51   ` Andrey Skvortsov
  2019-10-26 10:31     ` Thomas Petazzoni
  2019-10-31  8:21     ` Peter Korsgaard
  0 siblings, 2 replies; 5+ messages in thread
From: Andrey Skvortsov @ 2019-09-30 13:51 UTC (permalink / raw)
  To: buildroot

icu is required to build Q5tWebkit.
When UChar is defined as char16_t in ICU, then qtbase fails to detect ICU.
The issue is described https://bugreports.qt.io/browse/QTBUG-49586

Build fails with following error messages:
...
ustring.h:473:20: error: ?UChar? does not name a type
 u_strCompare(const UChar *s1, int32_t length1,
                    ^
          ^
make[2]: *** [Makefile:195: icu.o] Error 1
ICU disabled.
The ICU library support cannot be enabled.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
---

v2: formated Qt patch according to buildroot rules
    added information about upstream stage of the patch
    (Arnout Vandecappelle)

 .../0004-fix-icu-build-for-qt5webkit.patch    | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch

diff --git a/package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch b/package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch
new file mode 100644
index 0000000000..0d166b848a
--- /dev/null
+++ b/package/qt5/qt5base/5.6.3/0004-fix-icu-build-for-qt5webkit.patch
@@ -0,0 +1,74 @@
+From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
+Date: Mon, 23 Nov 2015 03:54:00 +0000
+Subject: [PATCH 1/1] When UChar is defined as char16_t in ICU, then qtbase fails to detect ICU.
+
+Build fails with following error:
+
+ICU auto-detection... ()
+x86_64-pc-linux-gnu-g++ -c -march=core2 -O2 -fno-ident \
+ -frecord-gcc-switches -pipe -Wall -O2 -Wall -W -fPIC  -I. \
+ -I/var/tmp/portage/dev-qt/qtcore-5.5.1/work/qtbase-opensource-src-5.5.1/mkspecs/linux-g++ -o icu.o icu.cpp
+In file included from /usr/include/unicode/utypes.h:36:0,
+                 from icu.cpp:34:
+/usr/include/unicode/umachine.h:306:13: error: 'char16_t' does not name a type
+     typedef char16_t UChar;
+             ^
+In file included from /usr/include/unicode/utypes.h:37:0,
+                 from icu.cpp:34:
+/usr/include/unicode/uversion.h:165:55: error: 'UChar' does not name a type
+ u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
+                                                       ^
+...
+Makefile:177: recipe for target 'icu.o' failed
+gmake: *** [icu.o] Error 1
+ICU disabled.
+The ICU library support cannot be enabled.
+
+This change isn't needed for new Qt versions, because c++11 is mandatory since 5.7.
+Upstream desided not to merge this change into old branches, like 5.6.
+Original patch was slightly modified to apply cleanly on Qt 5.6.3.
+
+Fetch from: https://bugreports.qt.io/secure/attachment/52478/qtbase-5.5.1-icu.patch
+Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
+Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
+
+---
+diff -purN qt5base-5.6.3.orig/config.tests/unix/compile.test qt5base-5.6.3/config.tests/unix/compile.test
+--- qt5base-5.6.3.orig/config.tests/unix/compile.test	2019-08-11 00:35:33.181545706 +0300
++++ qt5base-5.6.3/config.tests/unix/compile.test	2017-09-06 15:13:54.000000000 +0300
+@@ -47,7 +47,7 @@ while [ "$#" -gt 0 ]; do
+         INC=`echo $PARAM | sed -e 's/^-I//'`
+         INCLUDEPATH="$INCLUDEPATH \"$INC\""
+         ;;
+-    -f*|-D*)
++    -f*|-D*|-std=*)
+         CFLAGS="$CFLAGS \"$PARAM\""
+         CXXFLAGS="$CXXFLAGS \"$PARAM\""
+         ;;
+diff -purN qt5base-5.6.3.orig/configure qt5base-5.6.3/configure
+--- qt5base-5.6.3.orig/configure	2019-08-11 00:57:45.488214036 +0300
++++ qt5base-5.6.3/configure	2017-09-06 15:13:54.000000000 +0300
+@@ -5183,8 +5183,10 @@ fi
+ 
+ # auto-detect libicu support
+ if [ "$CFG_ICU" != "no" ]; then
+-    if compileTest unix/icu "ICU"; then
++    QT_CXXFLAGS_ICU=`icu-config --cxxflags 2>/dev/null`
++    if compileTest unix/icu "ICU" $QT_CXXFLAGS_ICU; then
+         [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
++        QMakeVar set QT_CXXFLAGS_ICU "$QT_CXXFLAGS_ICU"
+     else
+         if [ "$CFG_ICU" = "auto" ]; then
+             CFG_ICU=no
+diff -purN qt5base-5.6.3.orig/doc/Makefile qt5base-5.6.3/doc/Makefile
+diff -purN qt5base-5.6.3.orig/src/corelib/tools/tools.pri qt5base-5.6.3/src/corelib/tools/tools.pri
+--- qt5base-5.6.3.orig/src/corelib/tools/tools.pri	2019-08-11 00:45:45.073818635 +0300
++++ qt5base-5.6.3/src/corelib/tools/tools.pri	2017-09-06 15:13:54.000000000 +0300
+@@ -169,6 +169,7 @@ contains(QT_CONFIG,icu) {
+                tools/qcollator_icu.cpp \
+                tools/qtimezoneprivate_icu.cpp
+     DEFINES += QT_USE_ICU
++    QMAKE_CXXFLAGS += $$QT_CXXFLAGS_ICU
+ } else: win32 {
+     SOURCES += tools/qcollator_win.cpp
+ } else: macx {
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2] package/qt5/qt5base: fix icu detection in Qt 5.6.3
  2019-09-30 13:51   ` [Buildroot] [PATCH v2] " Andrey Skvortsov
@ 2019-10-26 10:31     ` Thomas Petazzoni
  2019-10-31  8:21     ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2019-10-26 10:31 UTC (permalink / raw)
  To: buildroot

On Mon, 30 Sep 2019 16:51:57 +0300
Andrey Skvortsov <andrej.skvortzov@gmail.com> wrote:

> icu is required to build Q5tWebkit.
> When UChar is defined as char16_t in ICU, then qtbase fails to detect ICU.
> The issue is described https://bugreports.qt.io/browse/QTBUG-49586
> 
> Build fails with following error messages:
> ...
> ustring.h:473:20: error: ?UChar? does not name a type
>  u_strCompare(const UChar *s1, int32_t length1,
>                     ^
>           ^
> make[2]: *** [Makefile:195: icu.o] Error 1
> ICU disabled.
> The ICU library support cannot be enabled.
> 
> Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
> ---

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2] package/qt5/qt5base: fix icu detection in Qt 5.6.3
  2019-09-30 13:51   ` [Buildroot] [PATCH v2] " Andrey Skvortsov
  2019-10-26 10:31     ` Thomas Petazzoni
@ 2019-10-31  8:21     ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2019-10-31  8:21 UTC (permalink / raw)
  To: buildroot

>>>>> "Andrey" == Andrey Skvortsov <andrej.skvortzov@gmail.com> writes:

 > icu is required to build Q5tWebkit.
 > When UChar is defined as char16_t in ICU, then qtbase fails to detect ICU.
 > The issue is described https://bugreports.qt.io/browse/QTBUG-49586

 > Build fails with following error messages:
 > ...
 > ustring.h:473:20: error: ?UChar? does not name a type
 >  u_strCompare(const UChar *s1, int32_t length1,
 >                     ^
 >           ^
 > make[2]: *** [Makefile:195: icu.o] Error 1
 > ICU disabled.
 > The ICU library support cannot be enabled.

 > Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
 > ---

 > v2: formated Qt patch according to buildroot rules
 >     added information about upstream stage of the patch
 >     (Arnout Vandecappelle)

Committed to 2019.02.x and 2019.08.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-31  8:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-13 12:47 [Buildroot] [PATCH 1/1] package/qt5/qt5base: fix icu detection in Qt 5.6.3 Andrey Skvortsov
2019-09-21 11:42 ` Arnout Vandecappelle
2019-09-30 13:51   ` [Buildroot] [PATCH v2] " Andrey Skvortsov
2019-10-26 10:31     ` Thomas Petazzoni
2019-10-31  8:21     ` Peter Korsgaard

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.