Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 807646 - dev-qt/qtnetwork: error building with musl + clang
Summary: dev-qt/qtnetwork: error building with musl + clang
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: https://invent.kde.org/qt/qt/qtbase/-...
Whiteboard:
Keywords: PullRequest, UPSTREAM
Depends on: 806797
Blocks:
  Show dependency tree
 
Reported: 2021-08-11 06:08 UTC by Leonardo Neumann
Modified: 2021-08-25 14:40 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo Neumann 2021-08-11 06:08:39 UTC
QtNetwork fails to compile with musl + clang. There is a fix upstream but only for Qt 6.

Reproducible: Always
Comment 1 Andreas Sturmlechner gentoo-dev 2021-08-12 18:21:22 UTC
You should ask KDE to include it into their Qt5PatchCollection.
Comment 3 Anthony Basile gentoo-dev 2021-08-22 20:50:23 UTC
(In reply to Leonardo Neumann from comment #0)
> QtNetwork fails to compile with musl + clang. There is a fix upstream but
> only for Qt 6.
> 
> Reproducible: Always

Have you tried musl + gcc because I had some real world applications that used dev-qt/qtnetwork and there was no problem.  So I'm wondering if its the clang that's the issue here.
Comment 4 Jannik Glückert 2021-08-22 20:56:38 UTC
It's not a clang issue specifically.

This is due to a bad #define that got fixed for g++ 5 years ago, but for clang only last year and thus hasn't made it into releases
Comment 5 Leonardo Neumann 2021-08-22 20:58:39 UTC
(In reply to Anthony Basile from comment #3)
> (In reply to Leonardo Neumann from comment #0)
> > QtNetwork fails to compile with musl + clang. There is a fix upstream but
> > only for Qt 6.
> > 
> > Reproducible: Always
> 
> Have you tried musl + gcc because I had some real world applications that
> used dev-qt/qtnetwork and there was no problem.  So I'm wondering if its the
> clang that's the issue here.

This bug was solved for Musl + GCC a while ago, but the person who fixed this bug forgot to replicate the changes for other compilers like Clang. I'm currently using the same patches sent by Andreas, but it would be better if those patches were upstream.
Comment 6 Anthony Basile gentoo-dev 2021-08-24 20:01:22 UTC
(In reply to Leonardo Neumann from comment #5)
> (In reply to Anthony Basile from comment #3)
> > (In reply to Leonardo Neumann from comment #0)
> > > QtNetwork fails to compile with musl + clang. There is a fix upstream but
> > > only for Qt 6.
> > > 
> > > Reproducible: Always
> > 
> > Have you tried musl + gcc because I had some real world applications that
> > used dev-qt/qtnetwork and there was no problem.  So I'm wondering if its the
> > clang that's the issue here.
> 
> This bug was solved for Musl + GCC a while ago, but the person who fixed
> this bug forgot to replicate the changes for other compilers like Clang. I'm
> currently using the same patches sent by Andreas, but it would be better if
> those patches were upstream.

I'm not sure what patch you're talking about.  dev-qt/qtnetwork is not on the musl overlay, so it must be one of the patches pulled in by dev-qt/qtnetwork::gentoo?
Comment 7 Leonardo Neumann 2021-08-24 20:42:47 UTC
(In reply to Anthony Basile from comment #6)
> I'm not sure what patch you're talking about.  dev-qt/qtnetwork is not on
> the musl overlay, so it must be one of the patches pulled in by
> dev-qt/qtnetwork::gentoo?

I'm talking about the patches which are linked in comment #2. They replicate an already upstream fix for musl + gcc, but for musl + clang.
Comment 8 Anthony Basile gentoo-dev 2021-08-25 12:13:34 UTC
(In reply to Leonardo Neumann from comment #7)
> (In reply to Anthony Basile from comment #6)
> > I'm not sure what patch you're talking about.  dev-qt/qtnetwork is not on
> > the musl overlay, so it must be one of the patches pulled in by
> > dev-qt/qtnetwork::gentoo?
> 
> I'm talking about the patches which are linked in comment #2. They replicate
> an already upstream fix for musl + gcc, but for musl + clang.

Ah yes, now I see what's going on here.  Thanks.
Comment 9 Larry the Git Cow gentoo-dev 2021-08-25 14:36:39 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=528bd877e2184a58633e7ddd26890f40da131df8

commit 528bd877e2184a58633e7ddd26890f40da131df8
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-08-15 22:27:29 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-08-25 14:35:49 +0000

    dev-qt/qtnetwork: 5.15.2-r10 version bump at KDE c2ea67ec
    
    EAPI-8
    
    Bug: https://bugs.gentoo.org/807646
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtnetwork/Manifest                    |  1 +
 dev-qt/qtnetwork/qtnetwork-5.15.2-r10.ebuild | 73 ++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ce60f03caee7e996cb8dcec37d2a61e05f4c57a

commit 4ce60f03caee7e996cb8dcec37d2a61e05f4c57a
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-08-15 22:27:01 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-08-25 14:35:48 +0000

    dev-qt/qtcore: 5.15.2-r10 version bump at KDE c2ea67ec
    
    - EAPI-8
    - Retain fallback RDEPEND on dev-qt/qtchooser in place of other dev-qt/
    - Raise minimum version to >=dev-qt/qtchooser-66-r1 for smooth upgrade
    - Fix build with musl and clang
    
    Bug: https://bugs.gentoo.org/807646
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtcore/Manifest                 |   1 +
 dev-qt/qtcore/qtcore-5.15.2-r10.ebuild | 104 +++++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+)