[bug#58249] gnu: packages: qt: Fix qtbase-5 not building on gcc 11 or later
Commit Message
This fixes a bug that makes qtbase-5 unbuildable with gcc 11 and later
The QT issue https://bugreports.qt.io/browse/QTBUG-91909
This patch is based on conversation from
https://github.com/RPCS3/rpcs3/issues/10349
Comments
Hi,
Mája Tomášek <maya.tomasek@disroot.org> writes:
> This fixes a bug that makes qtbase-5 unbuildable with gcc 11 and later
>
> The QT issue https://bugreports.qt.io/browse/QTBUG-91909
>
> This patch is based on conversation from
> https://github.com/RPCS3/rpcs3/issues/10349
That's good to know, but Guix is currently using GCC 10.3.0, so it is
not currently a concern. Have you encountered a situation where it
caused an issue? Perhaps our Qt 6 doesn't have this problem. I'd
suggest we do nothing for now.
What do you think?
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hi,
>
> Mája Tomášek <maya.tomasek@disroot.org> writes:
>
>> This fixes a bug that makes qtbase-5 unbuildable with gcc 11 and later
>>
>> The QT issue https://bugreports.qt.io/browse/QTBUG-91909
>>
>> This patch is based on conversation from
>> https://github.com/RPCS3/rpcs3/issues/10349
>
> That's good to know, but Guix is currently using GCC 10.3.0, so it is
> not currently a concern. Have you encountered a situation where it
> caused an issue?
I have. I have written a recipe for a package (namely yuzu emulator),
which depends on GCC 12. And it was actually an issue, I had to wrap
qtbase with a wrapper that goes over this problem.
> Perhaps our Qt 6 doesn't have this problem. I'd
> suggest we do nothing for now.
It was actually fixed in later versions of qtbase-5, but I'm not sure
how this exactly works and if they are elegible for use in Guix.
> What do you think?
I don't know, it is a hidden bug that is likely to cause quite a big
problem once Guix moves to GCC 11 or later, as many apps probably won't update to
Qt 6.
Kind regards,
Maya
Hello,
Mája Tomášek <maya.tomasek@disroot.org> writes:
[...]
> I don't know, it is a hidden bug that is likely to cause quite a big
> problem once Guix moves to GCC 11 or later, as many apps probably won't update to
> Qt 6.
The best solution may be to update our Qt 5 version; would you like to
give it a try? Other than being a lot of new hashes to update (for each
qt5 component), it should be relatively low risk (with regards to
breaking existing Qt 5 packages).
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hello,
>
> Mája Tomášek <maya.tomasek@disroot.org> writes:
>
> [...]
>
>> I don't know, it is a hidden bug that is likely to cause quite a big
>> problem once Guix moves to GCC 11 or later, as many apps probably won't update to
>> Qt 6.
>
> The best solution may be to update our Qt 5 version; would you like to
> give it a try? Other than being a lot of new hashes to update (for each
> qt5 component), it should be relatively low risk (with regards to
> breaking existing Qt 5 packages).
>
> --
> Thanks,
> Maxim
I haved looked into it, and guix has already shipped a patched version
:)
This can be closed now.
Maya
Hi,
Mája Tomášek <maya.tomasek@disroot.org> writes:
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> Hello,
>>
>> Mája Tomášek <maya.tomasek@disroot.org> writes:
>>
>> [...]
>>
>>> I don't know, it is a hidden bug that is likely to cause quite a big
>>> problem once Guix moves to GCC 11 or later, as many apps probably won't update to
>>> Qt 6.
>>
>> The best solution may be to update our Qt 5 version; would you like to
>> give it a try? Other than being a lot of new hashes to update (for each
>> qt5 component), it should be relatively low risk (with regards to
>> breaking existing Qt 5 packages).
>>
>> --
>> Thanks,
>> Maxim
>
> I haved looked into it, and guix has already shipped a patched version
> :)
>
> This can be closed now.
> Maya
Great, thanks for the follow-up.
I'm closing this by replying to 58249-done@debbugs.gnu.org in CC.
From d7467ebe3169d45a5f9500e2c8a4a992cb108f20 Mon Sep 17 00:00:00 2001
From: Maya Tomasek <maya.omase@protonmail.com>
Date: Sun, 2 Oct 2022 16:12:57 +0200
Subject: [PATCH 1/1] gnu: packages: qt: Fix qtbase-5 not building on gcc >= 11
---
.../patches/qtbase-remove-template.patch | 18 ++++++++++++++++++
gnu/packages/qt.scm | 4 +++-
2 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/qtbase-remove-template.patch
new file mode 100644
@@ -0,0 +1,18 @@
+Remove template <void> from ThreadEngineStarter, this causes gcc >= 11 to emit error,
+and not compile the header. See https://bugreports.qt.io/browse/QTBUG-91909
+
+Based on a conversation from https://github.com/RPCS3/rpcs3/issues/10349
+===============================================================
+--- a/src/concurrent/qtconcurrentthreadengine.h
++++ b/src/concurrent/qtconcurrentthreadengine.h
+@@ -247,7 +247,7 @@ template <>
+ class ThreadEngineStarter<void> : public ThreadEngineStarterBase<void>
+ {
+ public:
+- ThreadEngineStarter<void>(ThreadEngine<void> *_threadEngine)
++ ThreadEngineStarter(ThreadEngine<void> *_threadEngine)
+ :ThreadEngineStarterBase<void>(_threadEngine) {}
+
+ void startBlocking()
+--
+2.37.3
\ No newline at end of file
@@ -294,7 +294,9 @@ (define-public qtbase-5
;; Use TZDIR to avoid depending on package "tzdata".
(patches (search-patches "qtbase-use-TZDIR.patch"
"qtbase-moc-ignore-gcc-macro.patch"
- "qtbase-absolute-runpath.patch"))
+ "qtbase-absolute-runpath.patch"
+ ;; fix qtbase-5 not building on gcc >= 11
+ "qtbase-remove-template.patch"))
(modules '((guix build utils)))
(snippet
;; corelib uses bundled harfbuzz, md4, md5, sha3
--
2.37.3