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

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Mája Tomášek
Owner
unassigned
Submitted by
Mája Tomášek
Severity
normal

Debbugs page

M
M
Mája Tomášek wrote on 2 Oct 2022 07:22
(address . guix-patches@gnu.org)
87fsg671au.fsf@disroot.org
This fixes a bug that makes qtbase-5 unbuildable with gcc 11 and later


This patch is based on conversation from
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

Toggle diff (42 lines)
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
M
M
Maxim Cournoyer wrote on 3 Jan 2023 14:18
(name . Mája Tomášek)(address . maya.tomasek@disroot.org)(address . 58249@debbugs.gnu.org)
87fscrz2gd.fsf@gmail.com
Hi,

Mája Tomášek <maya.tomasek@disroot.org> writes:

Toggle quote (7 lines)
> 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?

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 3 Jan 2023 14:19
control message for bug #58249
(address . control@debbugs.gnu.org)
87edsbz2g8.fsf@gmail.com
tags 58249 + moreinfo
quit
M
M
Mája Tomášek wrote on 8 Jan 2023 14:49
Re: bug#58249: [PATCH] gnu: packages: qt: Fix qtbase-5 not building on gcc 11 or later
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 58249@debbugs.gnu.org)
874jt0lk0m.fsf@disroot.org
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (15 lines)
> 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.

Toggle quote (3 lines)
> 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.

Toggle quote (2 lines)
> 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
M
M
Maxim Cournoyer wrote on 10 Jan 2023 07:07
(name . Mája Tomášek)(address . maya.tomasek@disroot.org)(address . 58249@debbugs.gnu.org)
87lemal97i.fsf@gmail.com
Hello,

Mája Tomášek <maya.tomasek@disroot.org> writes:

[...]

Toggle quote (4 lines)
> 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
M
M
Mája Tomášek wrote on 25 Jan 2023 13:03
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 58249@debbugs.gnu.org)
87mt662uo1.fsf@disroot.org
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (19 lines)
> 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
M
M
Maxim Cournoyer wrote on 26 Jan 2023 08:40
(name . Mája Tomášek)(address . maya.tomasek@disroot.org)(address . 58249-done@debbugs.gnu.org)
87fsbxxn9d.fsf@gmail.com
Hi,

Mája Tomášek <maya.tomasek@disroot.org> writes:

Toggle quote (27 lines)
> 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.

--
Thanks,
Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 58249@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58249
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch