diff mbox series

[bug#58249] gnu: packages: qt: Fix qtbase-5 not building on gcc 11 or later

Message ID 87fsg671au.fsf@disroot.org
State New
Headers show
Series [bug#58249] gnu: packages: qt: Fix qtbase-5 not building on gcc 11 or later | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

vasilii.smirnov--- via Guix-patches" via Oct. 2, 2022, 2:22 p.m. UTC
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

Maxim Cournoyer Jan. 3, 2023, 10:18 p.m. UTC | #1
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?
vasilii.smirnov--- via Guix-patches" via Jan. 8, 2023, 10:49 p.m. UTC | #2
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
Maxim Cournoyer Jan. 10, 2023, 3:07 p.m. UTC | #3
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).
vasilii.smirnov--- via Guix-patches" via Jan. 25, 2023, 9:03 p.m. UTC | #4
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
Maxim Cournoyer Jan. 26, 2023, 4:40 p.m. UTC | #5
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.
diff mbox series

Patch

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

diff --git a/gnu/packages/patches/qtbase-remove-template.patch b/gnu/packages/patches/qtbase-remove-template.patch
new file mode 100644
index 0000000000..5686ebf4db
--- /dev/null
+++ b/gnu/packages/patches/qtbase-remove-template.patch
@@ -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
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 6e30980505..6d29b6fd09 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -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