Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 752012 - dev-qt/qtcore fails to build gcc11
Summary: dev-qt/qtcore fails to build gcc11
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2020-10-31 09:23 UTC by andy
Modified: 2021-12-24 13:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,343.05 KB, text/x-log)
2020-10-31 09:23 UTC, andy
Details
qtbase-gcc11.patch (file_752012.txt,5.41 KB, patch)
2020-10-31 09:28 UTC, andy
Details | Diff
qtbase-gcc112.patch (file_752012.txt,5.85 KB, patch)
2021-01-06 08:15 UTC, andy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description andy 2020-10-31 09:23:15 UTC
Created attachment 669419 [details]
build.log

dev-qt/qtcore fails to build gcc11 with errors like this:

/usr/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/g++-v11/bits/random.tcc:1283:15: error: ‘std::numeric_limits’ is not a template
 1283 |               std::numeric_limits<_IntType>::max() + __naf;
      |               ^~~
se the full build log for more.
Comment 1 andy 2020-10-31 09:28:54 UTC
Created attachment 669422 [details, diff]
qtbase-gcc11.patch
Comment 2 Geoff Leach 2021-01-06 06:50:31 UTC
Patch works for me.

Similar issue for qtgui (will open a separate bug)
Comment 3 andy 2021-01-06 08:15:38 UTC
Created attachment 681397 [details, diff]
qtbase-gcc112.patch

more patching for dev-qt/qtbluetooth
Comment 4 andy 2021-01-06 08:24:36 UTC
i have almost all patches for dev-qt/* but it is quite time killing 
to remove all of my patches to make build logs for bug reports. i can open bugs 
and provide my patches without build logs.
Comment 5 Andreas Sturmlechner gentoo-dev 2021-01-10 16:47:38 UTC
Is this reported upstream anywhere?
Comment 6 andy 2021-01-10 18:26:24 UTC
(In reply to Andreas Sturmlechner from comment #5)
> Is this reported upstream anywhere?

nope.. do you want me to do it ? . there are quite allot to be done with 
dev-qt/* as packages that builds against them fails to with :   

error: invalid declarator before ‘*’ token 

I dont know if it is something new in gcc-11 or a bug.
Comment 7 Andreas Sturmlechner gentoo-dev 2021-01-10 19:24:34 UTC
Well, it would be good to have a reference, but I guess in terms of having to carry more and more patches indefinitely, that ship has sailed with Qt5 already.
Comment 8 andy 2021-01-10 19:37:06 UTC
(In reply to Andreas Sturmlechner from comment #7)
> Well, it would be good to have a reference, but I guess in terms of having
> to carry more and more patches indefinitely, that ship has sailed with Qt5
> already.

i think you are quite right with qt5 as qt6 is released .not to make this like the libreoffice-7x bug . is there some place to take this up ?.
Comment 9 Andreas Sturmlechner gentoo-dev 2021-01-11 17:03:45 UTC
*** Bug 764977 has been marked as a duplicate of this bug. ***
Comment 10 Larry the Git Cow gentoo-dev 2021-01-24 13:03:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=608616191dce3dca8e059a86bd960c2ab0e44c39

commit 608616191dce3dca8e059a86bd960c2ab0e44c39
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-01-11 00:20:19 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-01-24 13:03:14 +0000

    dev-qt: Fix build for QT5_MODULE=qtbase w/ GCC-11
    
    Closes: https://bugs.gentoo.org/752012
    Closes: https://bugs.gentoo.org/764038
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtconcurrent/Manifest                       | 1 +
 dev-qt/qtconcurrent/qtconcurrent-5.15.2.ebuild     | 4 ++++
 dev-qt/qtcore/Manifest                             | 1 +
 dev-qt/qtcore/qtcore-5.15.2-r2.ebuild              | 3 +++
 dev-qt/qtdbus/Manifest                             | 1 +
 dev-qt/qtdbus/qtdbus-5.15.2.ebuild                 | 4 ++++
 dev-qt/qtgui/Manifest                              | 1 +
 dev-qt/qtgui/qtgui-5.15.2-r1.ebuild                | 4 +++-
 dev-qt/qtnetwork/Manifest                          | 1 +
 dev-qt/qtnetwork/qtnetwork-5.15.2-r1.ebuild        | 2 ++
 dev-qt/qtopengl/Manifest                           | 1 +
 dev-qt/qtopengl/qtopengl-5.15.2.ebuild             | 4 ++++
 dev-qt/qtprintsupport/Manifest                     | 1 +
 dev-qt/qtprintsupport/qtprintsupport-5.15.2.ebuild | 4 ++++
 dev-qt/qtsql/Manifest                              | 1 +
 dev-qt/qtsql/qtsql-5.15.2.ebuild                   | 5 +++++
 dev-qt/qttest/Manifest                             | 1 +
 dev-qt/qttest/qttest-5.15.2.ebuild                 | 4 ++++
 dev-qt/qtwidgets/Manifest                          | 1 +
 dev-qt/qtwidgets/qtwidgets-5.15.2.ebuild           | 3 +++
 dev-qt/qtxml/Manifest                              | 1 +
 dev-qt/qtxml/qtxml-5.15.2.ebuild                   | 4 ++++
 22 files changed, 51 insertions(+), 1 deletion(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=478e273889d822398fe7e36860fbddd04729ec04

commit 478e273889d822398fe7e36860fbddd04729ec04
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-01-11 00:14:25 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-01-24 13:03:13 +0000

    dev-qt/qtbluetooth: Fix build with GCC-11
    
    Bug: https://bugs.gentoo.org/752012
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../qtbluetooth/files/qtbluetooth-5.15.2-gcc11.patch  | 19 +++++++++++++++++++
 dev-qt/qtbluetooth/qtbluetooth-5.15.2.ebuild          |  3 +++
 2 files changed, 22 insertions(+)
Comment 11 Andreas Sturmlechner gentoo-dev 2021-09-30 11:25:23 UTC
Having switched to GCC-11 I can no longer reproduce the build failure both with dev-qt/qtbluetooth-5.15.2-r1 (and the patch commented out) and dev-qt/qtbluetooth-5.15.2.9999 from qt overlay (which never got it in the first place). Fedora are still keeping the patch from the early days of GCC-11 porting, but openSUSE never applied it fwiw.

So, not only am I not going to look into upstreaming the patch, I think we can drop it downstream as being superfluous (and consider it fixed by one of the qtbase GCC-11 commits instead).

I'd appreciate someone previously getting the build failure try and reproduce without the patch as well though.
Comment 12 Larry the Git Cow gentoo-dev 2021-12-24 13:27:00 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=431dd59ddd10d9c89c59d224cee93630e187b34c

commit 431dd59ddd10d9c89c59d224cee93630e187b34c
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-12-24 12:13:38 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-12-24 13:26:47 +0000

    dev-qt/qtbluetooth: 5.15.2-r10 version bump at KDE 5e9ca5d3
    
    Dropping superfluous GCC-11 patch.
    
    "Always call setOpenMode before setSocketState"
    Upstream commit 5e9ca5d36d65dadb98ef90013a1dcf15fbd7ae26
    
    "Add server role to BlueZ service registration"
    Upstream commit 46708bf1c3cc0235665d13d38fb894422d5ce379
    
    "Fix error handling in BlueZ connectToServiceHelper"
    QTBUG: https://bugreports.qt.io/browse/QTBUG-82407
    Upstream commit ad2959eb185dedc4def73d5d471c732c0a39e3c6
    
    "Correct error handling in QLowEnergyControllerPrivateBluezDBUS"
    Upstream commit a0b4eb19770325ecb388cf84fca98bbbed5cc294
    
    Bug: https://bugs.gentoo.org/752012
    Package-Manager: Portage-3.0.30, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtbluetooth/Manifest                      |  1 +
 dev-qt/qtbluetooth/qtbluetooth-5.15.2-r10.ebuild | 35 ++++++++++++++++++++++++
 2 files changed, 36 insertions(+)