Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 675874 - media-sound/teamspeak-client-3.2.3 breaks with Qt >=5.12
Summary: media-sound/teamspeak-client-3.2.3 breaks with Qt >=5.12
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Conrad Kostecki
URL: https://forum.teamspeak.com/threads/1...
Whiteboard:
Keywords: PullRequest
: 684318 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-01-19 19:57 UTC by N. Andrew Walsh
Modified: 2019-04-30 16:49 UTC (History)
5 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 N. Andrew Walsh 2019-01-19 19:57:31 UTC
Trying to run ts3client with Qt at 5.12 results in the following error:

 $ ts3client 
/opt/teamspeak3-client/ts3client: relocation error: /opt/teamspeak3-client/ts3client: symbol calloc version Qt_5 not defined in file libQt5WebEngineCore.so.5 with link time reference

This is apparently an upstream problem with a broken ABI, but until upstream issues a fix, it apparently requires Qt < 5.11 to run.
Comment 1 Andreas Sturmlechner gentoo-dev 2019-01-19 20:04:18 UTC
You're sending mixed messages here. Qt 5.11 has been stable and the only available version in tree for a while, so this comes a bit late. Is it now broken with 5.12 or with 5.11?
Comment 2 N. Andrew Walsh 2019-01-19 20:13:28 UTC
I know it breaks on my system, with Qt-5.12, but the Arch page for the package claims it only runs with Qt <5.11 (which I can't test). 

So I'm uncertain as to the exact point of failure myself.
Comment 3 N. Andrew Walsh 2019-01-19 20:15:36 UTC
Addendum: However, I know I had it working last week, before I ran an emerge that updated Qt-5.11 to Qt-5.12. So purely from my own experience, the break appears to occur going Qt-5.11 → Qt.5.12. But again, I can't confirm for certain myself.
Comment 4 Conrad Kostecki gentoo-dev 2019-01-19 20:26:29 UTC
I can confirm, that TS3 Client works with QT 5.11, as its so running on my local gentoo.

So this should be only an >= QT 5.12 issue, as I don't have currently installed QT 5.12..

Will ask upstream.
Comment 5 N. Andrew Walsh 2019-02-01 11:19:52 UTC
Turns out there was a posting to the teamspeak forums about this issue, and the reply from the devs is as follows:

"TeamSpeak uses Qt 5.6.2, any other version may fail due to changes in the API. The TeamSpeak client includes the required Qt libraries and you're supposed to use those rather than system provided ones."

So, as a workaround, how does one invoke the ts3client binary such that it uses teamspeak's own Qt libraries and not the system ones?
Comment 6 Conrad Kostecki gentoo-dev 2019-02-01 12:54:07 UTC
(In reply to N. Andrew Walsh from comment #5)
> So, as a workaround, how does one invoke the ts3client binary such that it
> uses teamspeak's own Qt libraries and not the system ones?

LD_LIBRARY_PATH ;-)
Add the needed path into /opt/bin/ts3client (a wrapper script)

But I don't think, we want to install teamspeaks qt libs, since this is against what the gentoo policy wants.

I still haven't received on my created ticket at teamspeak :(
Comment 7 N. Andrew Walsh 2019-02-01 15:42:57 UTC
Well, here's the thing: according to equery, the file /opt/teamspeak3-client/QtWebEngineProcess is a link to /usr/lib64/qt5/libexec/QtWebEngineProcess, which belongs to system Qt. That suggests to me that the link was made at build time. The wrapper script already has an export function for an LD_LIBRARY_PATH variable; what should the new one be? Will this link to system Qt cause problems regardless?
Comment 8 Conrad Kostecki gentoo-dev 2019-02-02 15:27:25 UTC
(In reply to N. Andrew Walsh from comment #7)
> Well, here's the thing: according to equery, the file
> /opt/teamspeak3-client/QtWebEngineProcess is a link to
> /usr/lib64/qt5/libexec/QtWebEngineProcess, which belongs to system Qt. That
> suggests to me that the link was made at build time. The wrapper script
> already has an export function for an LD_LIBRARY_PATH variable; what should
> the new one be? Will this link to system Qt cause problems regardless?

Yes, you are right. The symlink is needed to use the system qt.
Instead, if you want to use the shipped qt libs, you have to replace the symlink with the binary, which is shipped in the archive.
Comment 9 Andreas Sturmlechner gentoo-dev 2019-02-02 15:47:11 UTC
(In reply to N. Andrew Walsh from comment #5)
> "TeamSpeak uses Qt 5.6.2, any other version may fail due to changes in the
> API. The TeamSpeak client includes the required Qt libraries and you're
> supposed to use those rather than system provided ones."
That's really sad to hear.
Comment 10 N. Andrew Walsh 2019-02-02 16:49:43 UTC
Well, of the files belonging to the ebuild, these are the only ones that appear to involve Qt:

/opt/teamspeak3-client/resources/qtwebengine_resources.pak
/opt/teamspeak3-client/resources/qtwebengine_resources_100p.pak
/opt/teamspeak3-client/resources/qtwebengine_resources_200p.pak

So, to what do I change the symlink?

Also, I assume this is a temporary workaround, but teamspeak upstream has said that we should always use the shipped Qt, and the client clearly doesn't work with Qt-5.12. Is this something the ebuild could address?
Comment 11 Conrad Kostecki gentoo-dev 2019-02-10 13:16:33 UTC
(In reply to N. Andrew Walsh from comment #10)
> Well, of the files belonging to the ebuild, these are the only ones that
> appear to involve Qt:
> 
> /opt/teamspeak3-client/resources/qtwebengine_resources.pak
> /opt/teamspeak3-client/resources/qtwebengine_resources_100p.pak
> /opt/teamspeak3-client/resources/qtwebengine_resources_200p.pak
> 
> So, to what do I change the symlink?

Just use the binary "QtWebEngineProcess", which is in the shipped archive instead of the symlink.

> Also, I assume this is a temporary workaround, but teamspeak upstream has
> said that we should always use the shipped Qt, and the client clearly
> doesn't work with Qt-5.12. Is this something the ebuild could address?

As I said, since the shipped Qt is an old version, I don't think, it's a good idea to use said, if looking in terms of vulnerabilities of those old libs.

@asturm: What do you think?
Comment 12 N. Andrew Walsh 2019-02-13 18:27:39 UTC
(In reply to Conrad Kostecki from comment #11)
> 
> Just use the binary "QtWebEngineProcess", which is in the shipped archive
> instead of the symlink.

The TeamSpeak package is a .run file. How do I unpack that to get the Qt file?

> 
> As I said, since the shipped Qt is an old version, I don't think, it's a
> good idea to use said, if looking in terms of vulnerabilities of those old
> libs.
> 
> @asturm: What do you think?

Teamspeak won't run with Qt > 5.11, so if you've already upgraded you don't really have a choice. Unless upstream fixes their client to work with newer Qt, either you use the shipped QtWebEngineProcess, or you can't start the client.
Comment 13 N. Andrew Walsh 2019-02-13 18:35:14 UTC
Update: I unpacked the .run file, replaced the symlink with the QtWebEngineProcess that got unpacked, set permissions, and it still wouldn't run, with the same error I got in the top comment.

So it's not just QtWebEngineProcess, apparently?
Comment 14 Andreas Sturmlechner gentoo-dev 2019-02-14 16:12:01 UTC
(In reply to Conrad Kostecki from comment #11)
> As I said, since the shipped Qt is an old version, I don't think, it's a
> good idea to use said, if looking in terms of vulnerabilities of those old
> libs.
> 
> @asturm: What do you think?

You're exactly right, 5.6 is ancient and relying on such an old version is a very bad idea.
Comment 15 N. Andrew Walsh 2019-02-16 04:45:25 UTC
(In reply to Andreas Sturmlechner from comment #14)
> You're exactly right, 5.6 is ancient and relying on such an old version is a
> very bad idea.

I don't disagree, but the client won't start with >=Qt-5.12, and upstream has said to use their shipped libraries. So either the package should use the shipped libraries (how does one do that? Is that something that needs to be done at compile-time?), or needs to have <Qt-5.12 as a dependency. There's a post on the teamspeak forum about this issue that's weeks old and the only thing the devs said was "use the shipped Qt."
Comment 16 Conrad Kostecki gentoo-dev 2019-02-19 20:38:29 UTC
(In reply to N. Andrew Walsh from comment #13)
> Update: I unpacked the .run file, replaced the symlink with the
> QtWebEngineProcess that got unpacked, set permissions, and it still wouldn't
> run, with the same error I got in the top comment.
> 
> So it's not just QtWebEngineProcess, apparently?

Yes. Easisted way is just to extract conents of *.run into /opt/teamspeak-client and you should be running on shiped qt libs.

(In reply to Andreas Sturmlechner from comment #14)
> (In reply to Conrad Kostecki from comment #11)
> > As I said, since the shipped Qt is an old version, I don't think, it's a
> > good idea to use said, if looking in terms of vulnerabilities of those old
> > libs.
> > 
> > @asturm: What do you think?
> 
> You're exactly right, 5.6 is ancient and relying on such an old version is a
> very bad idea.

Thanks, I've subbmited a PR for a Qt 5.12 blocker, even, it's currently not in portage..

(In reply to N. Andrew Walsh from comment #15)
> There's a post on the teamspeak forum about this issue that's weeks old and
> the only thing the devs said was "use the shipped Qt."

That said by teamspeak is just being lazy. If they would update those shipped qt libs at least. With that old libs, there is always a possibility, to get some vulnerabilities.
Comment 17 Larry the Git Cow gentoo-dev 2019-02-21 22:31:35 UTC
The bug has been referenced in the following commit(s):

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

commit ff56c95853f4db266af987bc0885a1a49737cfee
Author:     Conrad Kostecki <conrad@kostecki.com>
AuthorDate: 2019-02-21 14:31:30 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-02-21 22:31:17 +0000

    media-sound/teamspeak-client: add blocker against qt-5.12
    
    Current version of the teamspeak-client is not compatible with Qt 5.12.
    
    Bug: https://bugs.gentoo.org/675874
    Package-Manager: Portage-2.3.60, Repoman-2.3.12
    Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
    Closes: https://github.com/gentoo/gentoo/pull/11110
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../teamspeak-client-3.2.3-r1.ebuild               | 95 ++++++++++++++++++++++
 1 file changed, 95 insertions(+)
Comment 18 Conrad Kostecki gentoo-dev 2019-02-28 08:36:32 UTC
According to the server changelog, TeamSpeak 5.0 Client is on it's way to be released soon.
Comment 19 haarp 2019-03-23 16:25:22 UTC
In the meantime, I found the following to work. Run the the TS3 client extractor from

https://files.teamspeak-services.com/releases/client/3.2.3/TeamSpeak3-Client-linux_amd64-3.2.3.run

then from the resulting install dir, copy the following files into /opt/teamspeak3-client/ and make them readable by all users:

libQt5WebEngineCore.so.5
libQt5WebEngineWidgets.so.5
libsrtp.so.0

That's all.
Comment 20 Denis Lisov 2019-03-24 16:29:06 UTC
The fix Qt had for these symbols before 5.12 is quite localized and can be reproduced with LD_PRELOAD rather cleanly, but I'm not sure whether such hacks are appropriate for the main Gentoo repository. Should I open a PR?
Comment 21 Conrad Kostecki gentoo-dev 2019-03-30 13:22:09 UTC
Hi guys,
sorry for my silence, I was pretty busy.

(In reply to haarp from comment #19)
> then from the resulting install dir, copy the following files into
> /opt/teamspeak3-client/ and make them readable by all users:
> 
> libQt5WebEngineCore.so.5
> libQt5WebEngineWidgets.so.5

This looks good. I've updated my local ebuild and ts3 starts with Qt5 >= 5.12.

> libsrtp.so.0

It's also possible to use systems libsrtp.so.1 and symlink as libsrtp.so.0. Works for me also fine.

(In reply to Denis Lisov from comment #20)
> The fix Qt had for these symbols before 5.12 is quite localized and can be
> reproduced with LD_PRELOAD rather cleanly, but I'm not sure whether such
> hacks are appropriate for the main Gentoo repository. Should I open a PR?

Yep, that's why it works directly. I will push a PR now. Please have a look, it that's okay for you, since it works for me.

FWICS, teamspeak-5.0 will take much more time, until some public beta will be available.

Conrad
Comment 22 Denis Lisov 2019-03-30 19:46:56 UTC
(In reply to Conrad Kostecki from comment #21)
> (In reply to Denis Lisov from comment #20)
> > The fix Qt had for these symbols before 5.12 is quite localized and can be
> > reproduced with LD_PRELOAD rather cleanly, but I'm not sure whether such
> > hacks are appropriate for the main Gentoo repository. Should I open a PR?
> 
> Yep, that's why it works directly. I will push a PR now. Please have a look,
> it that's okay for you, since it works for me.

Do I understand correctly that this solution is based on using some weird mix of the bundled libQt5WebEngine{Core,Widgets}.so.5 (presumably 5.6.1) and system QtWebEngineProcess (5.12.2 as of now)? This does not look reliable to me.

I've successfully tried a different fix for this problem. The fix builds a special library `overrides.so` that's loaded with LD_PRELOAD. The library just reexports calloc and a few other symbols with the `Qt_5` version that teamspeak requires.

Still, I've tested the PR and it seems to start successfully, so I'm not gonna argue over details.
Comment 23 Conrad Kostecki gentoo-dev 2019-03-30 21:35:22 UTC
(In reply to Denis Lisov from comment #22)
> (In reply to Conrad Kostecki from comment #21)
> > (In reply to Denis Lisov from comment #20)
> > > The fix Qt had for these symbols before 5.12 is quite localized and can be
> > > reproduced with LD_PRELOAD rather cleanly, but I'm not sure whether such
> > > hacks are appropriate for the main Gentoo repository. Should I open a PR?
> > 
> > Yep, that's why it works directly. I will push a PR now. Please have a look,
> > it that's okay for you, since it works for me.
> 
> Do I understand correctly that this solution is based on using some weird
> mix of the bundled libQt5WebEngine{Core,Widgets}.so.5 (presumably 5.6.1) and
> system QtWebEngineProcess (5.12.2 as of now)? This does not look reliable to
> me.

Yes, you did unterstand correctly. I also see the problem that this could be not reliable.

> I've successfully tried a different fix for this problem. The fix builds a
> special library `overrides.so` that's loaded with LD_PRELOAD. The library
> just reexports calloc and a few other symbols with the `Qt_5` version that
> teamspeak requires.

That sounds like a very good solution. Would you share this with me, so I can update my PR? Do I wouldn't need to pull teamspeaks ancient Qt5 libs?

Conrad
Comment 24 Conrad Kostecki gentoo-dev 2019-04-09 07:04:42 UTC
Thanks for you PR, I've left a review for you.
Comment 25 Conrad Kostecki gentoo-dev 2019-04-25 08:37:17 UTC
*** Bug 684318 has been marked as a duplicate of this bug. ***
Comment 26 Larry the Git Cow gentoo-dev 2019-04-30 16:49:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=378f1d8be411fc8f8a6dba202813c8f565a9dca0

commit 378f1d8be411fc8f8a6dba202813c8f565a9dca0
Author:     Denis Lisov <dennis.lissov@gmail.com>
AuthorDate: 2019-04-08 21:27:09 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-04-30 16:49:35 +0000

    media-sound/teamspeak-client: add workaround for Qt 5.12
    
    QtWebEngine versions before 5.12 used to reexport a few symbols like
    calloc with version Qt_5 that were exported by mistake once. These are
    no longer exported in 5.12 (probably a Qt bug), and teamspeak-client
    does not officially support it (only the bundled QtWebEngine 5.6.1 is
    supported).
    
    Add a `overrides.so` shared library that reexports them by taking this
    code from Qt under (L)GPL and preload it using LD_PRELOAD to make the
    symbols available.
    
    Closes: https://bugs.gentoo.org/675874
    Signed-off-by: Denis Lisov <dennis.lissov@gmail.com>
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 ...eak-client-3.2.3-qt-5.12-symbol-reexports.patch | 141 +++++++++++++++++++++
 .../teamspeak-client/files/ts3client-bin-r1        |  13 ++
 .../teamspeak-client-3.2.3-r2.ebuild               | 102 +++++++++++++++
 3 files changed, 256 insertions(+)