From 7f3214ecc54e9c9890b8dc203641fb4c1a058028af9a25c5d4472a6541d0d20e Mon Sep 17 00:00:00 2001 From: Yuchen Lin Date: Wed, 13 Jun 2018 13:38:21 +0000 Subject: [PATCH] Accepting request 615217 from KDE:Qt5 - Add patch to fix building on 32-bit architectures (boo#1092425): * workaround-qdoc-failure.patch - BuildRequire clang, this is needed since 5.11 to properly build the docs OBS-URL: https://build.opensuse.org/request/show/615217 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtdoc?expand=0&rev=26 --- libqt5-qtdoc.changes | 12 ++++++++++++ libqt5-qtdoc.spec | 4 ++++ workaround-qdoc-failure.patch | 30 ++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 workaround-qdoc-failure.patch diff --git a/libqt5-qtdoc.changes b/libqt5-qtdoc.changes index e04a2f5..4a259e0 100644 --- a/libqt5-qtdoc.changes +++ b/libqt5-qtdoc.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Jun 8 09:23:43 UTC 2018 - fabian@ritter-vogt.de + +- Add patch to fix building on 32-bit architectures (boo#1092425): + * workaround-qdoc-failure.patch + +------------------------------------------------------------------- +Sun Jun 3 10:47:04 UTC 2018 - wbauer@tmo.at + +- BuildRequire clang, this is needed since 5.11 to properly build + the docs + ------------------------------------------------------------------- Tue May 22 16:01:37 CEST 2018 - fabian@ritter-vogt.de diff --git a/libqt5-qtdoc.spec b/libqt5-qtdoc.spec index fefc5bc..a1929e3 100644 --- a/libqt5-qtdoc.spec +++ b/libqt5-qtdoc.spec @@ -27,7 +27,10 @@ License: LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only Group: Documentation/Other URL: https://www.qt.io Source: https://download.qt.io/official_releases/qt/5.11/%{real_version}/single/%{tar_version}.tar.xz +# PATCH-FIX-OPENSUSE +Patch100: workaround-qdoc-failure.patch BuildRequires: alsa-devel +BuildRequires: clang BuildRequires: cups-devel BuildRequires: double-conversion-devel BuildRequires: gcc-c++ @@ -115,6 +118,7 @@ required. %prep %setup -q -n %{tar_version} +%autopatch -p1 %build # We need to link to some of the programs used as that the source assumes they were just build. diff --git a/workaround-qdoc-failure.patch b/workaround-qdoc-failure.patch new file mode 100644 index 0000000..687551f --- /dev/null +++ b/workaround-qdoc-failure.patch @@ -0,0 +1,30 @@ +From: Michal Srb +Subject: Assertion failure in libclang on i586 (when building qtdoc) +References: boo#1092425 + +I have found that the issue is caused by `qfloat::operator float()` in qtbase/src/corelib/global/qfloat16.h. + +For some reason the declaration is omitted when building the documentation using `#ifndef Q_QDOC`, but its definition is there unconditionally. Omitting the definition prevents the qdoc failure. See the attached patch. + +I don't know yet why it behaves differently on x86 and x86_64, perhaps it has something to do with the body of the method, which is different depending on the architecture. + +Also, even with broken code, it should not crash with assertion failure. So there must be something broken in either libclang or qdoc, but I did not yet find what. Perhaps we could use this patch for the time being. + +--- qt-everywhere-src-5.11.0-rc.out/qtbase/src/corelib/global/qfloat16.h 2018-05-30 08:12:03.405142221 +0000 ++++ qt-everywhere-src-5.11.0-rc/qtbase/src/corelib/global/qfloat16.h 2018-05-30 07:59:19.637190880 +0000 +@@ -144,6 +144,7 @@ + } + QT_WARNING_POP + ++#ifndef Q_QDOC + inline qfloat16::operator float() const Q_DECL_NOTHROW + { + #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__F16C__) +@@ -162,6 +163,7 @@ + return f; + #endif + } ++#endif + + inline qfloat16 operator-(qfloat16 a) Q_DECL_NOTHROW + {