Nixpkgs: ts3client is missing a library?

Created on 1 Jan 2018  Â·  8Comments  Â·  Source: NixOS/nixpkgs

Issue description

Recently ts3client broke. Maybe related to my moving from 17.09 to unstable.
Is there anything I can do to work around this?

Steps to reproduce

 % ts3client
QCoreApplication::applicationDirPath: Please instantiate the QApplication object first
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: xcb.

Reinstalling the application may fix this problem.
[1]    9294 abort      ts3client

Technical details

 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.8, NixOS, 18.03pre123588.ade98dc442e (Impala)`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 1.11.16`
 - channels(root): `"nixos-18.03pre123588.ade98dc442e"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`

All 8 comments

To add some info, the very same version of teamspeak_client runs on another PC with nixos, and the only difference seems to be:

$ find /nix/store -name libqxcb.so
/nix/store/phscfzkf1h0p3p325rn22m4avv82yxgs-qtbase-5.6.3-bin/lib/qt-5.6/plugins/platforms/libqxcb.so
/nix/store/0ixf7xg759kfr3pbamcpbn438rzi6vqz-qtbase-5.9.3-bin/lib/qt-5.9/plugins/platforms/libqxcb.so
/nix/store/xcl0243lnpix1sdg0adbf69x963akrmp-teamspeak-client-3.1.6/lib/teamspeak/platforms/libqxcb.so

qtbase versions are more recent on the current machine where it doesn't work (on my other machine there are on version 5.9.1 and 5.6.2). Maybe ts3client is using a libqxcb.so from qtbase and breaks when they are not compatible anymore?

Ok, seems that my previous hypothesis is wrong:
```
% QT_DEBUG_PLUGINS=1 ts3client
QCoreApplication::applicationDirPath: Please instantiate the QApplication object first
QFactoryLoader::QFactoryLoader() checking directory path "/nix/store/ql93xakdkxr4yf65pxbdir2bzy9rq1hg-kitty-0.5.0/lib/qt-5.6/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/nix/store/p0ljc7gk9l0phd13war9l4wd458bv2gx-imagemagick-6.9.9-26/lib/qt-5.6/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/nix/store/21jkxacqk7raayg9w932qsjbdmlc4h56-xsel-unstable-2016-09-02/lib/qt-5.6/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/home/eeva/lib/qt-5.6/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/run/wrappers/lib/qt-5.6/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/etc/profiles/per-user/eeva/lib/qt-5.6/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/home/eeva/.nix-profile/lib/qt-5.6/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/nix/var/nix/profiles/default/lib/qt-5.6/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/run/current-system/sw/lib/qt-5.6/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/nix/store/xcl0243lnpix1sdg0adbf69x963akrmp-teamspeak-client-3.1.6/lib/teamspeak/platforms/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/nix/store/xcl0243lnpix1sdg0adbf69x963akrmp-teamspeak-client-3.1.6/lib/teamspeak/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/nix/store/xcl0243lnpix1sdg0adbf69x963akrmp-teamspeak-client-3.1.6/lib/teamspeak/platforms/libqxcb.so"
Found metadata in lib /nix/store/xcl0243lnpix1sdg0adbf69x963akrmp-teamspeak-client-3.1.6/lib/teamspeak/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 329217
}

Got keys from plugin meta data ("xcb")
loaded library "/nix/store/xcl0243lnpix1sdg0adbf69x963akrmp-teamspeak-client-3.1.6/lib/teamspeak/platforms/libqxcb.so"
QLibraryPrivate::loadPlugin failed on "/nix/store/xcl0243lnpix1sdg0adbf69x963akrmp-teamspeak-client-3.1.6/lib/teamspeak/platforms/libqxcb.so" : "Cannot load library /nix/store/xcl0243lnpix1sdg0adbf69x963akrmp-teamspeak-client-3.1.6/lib/teamspeak/platforms/libqxcb.so: "
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: xcb.

Reinstalling the application may fix this problem.
[1] 13921 abort QT_DEBUG_PLUGINS=1 ts3client

https://github.com/Studio3T/robomongo/issues/1384

If we're in the same case, looks like it could be linked to an incompatible libc? Problem is, there are no details in the error message…

@nathanielbaxter any idea? (I think you are the maintainer of this package)

Turns out, building with libsForQt59 instead of libsForQt56 makes it work again. This should be fixed in nixpkgs, right? That may mean that a dependency was not caught and qt is relying on what it finds in the environment.

I notice this issue for some weeks ago, and i solved it by rebuild it locally..

Yeah you are probably right about the qt version dependency problem.

Not related, probably, but noticed that the path for gcc libraries is wrong:

$ readelf -d /nix/store/xncpmad2d09vav32dbfs57ci40phgpgz-teamspeak-client-3.1.7/bin/.ts3client-wrapped|grep RPATH
 0x000000000000000f (RPATH)              Library rpath: [/nix/store/la2xxf4grdyf37a94ak28m7a61yjqzr9-zlib-1.2.11/lib:/nix/store/kqnvjj5vbcwd9d79m86s90f8hb9vali1-glib-2.54.2/lib:/nix/store/58gwbbsgql835943vgxqikny5wbpr4zx-libpng-apng-1.6.34/lib:/nix/store/ik0wyn7pzd93s2mz921crnhqg6i4pfah-freetype-2.7.1/lib:/nix/store/s05c5s040vvs82a4nb0vacsjv247s0av-libSM-1.2.2/lib:/nix/store/4fqm6rb4wnl3lbi9ahkhbcb66ghdfw40-libICE-1.0.9/lib:/nix/store/gfnhf30106lqf4dwvr9hxnyvlkznj1my-libXrender-0.9.10/lib:/nix/store/v8z56hjwli0yxqczzajg5fhi4n6vm65f-openssl-1.0.2n/lib:/nix/store/7xs3vrg1gwcx5wq47nvgsn5vii3qs4nx-libXrandr-1.5.1/lib:/nix/store/cmsyqmp9lsr835g74199y60cn6qkkmc7-libXfixes-5.0.2/lib:/nix/store/an1ms8xjr01pinw7dg836lbv24gmsdgv-libXcursor-1.1.15/lib:/nix/store/s3slry6yqs92slf1kwrz33n3ngwym30i-libXinerama-1.1.3/lib:/nix/store/lnx8y5dz42bzgarl0wwdbwsnl2xq5xfh-libxcb-1.12/lib:/nix/store/jh3apbkm9iiwfkjfl0agpr8x69wdy111-fontconfig-2.12.1-lib/lib:/nix/store/w7nbvpgaqfvdw3i1383agl5yw72fc8g1-libXext-1.3.3/lib:/nix/store/697dh7g650f1qd4aqpkn3zing0g1qgx7-libX11-1.6.5/lib:/nix/store/jbcka9davr83db817s9k5f6n2n5rcran-alsa-lib-1.1.5/lib:/nix/store/ac3qsx12i0jvm6wcam8yizar31kbdkv9-qtbase-5.6.3/lib:/nix/store/bv12bzcci35zni4ch0dj1bnfr9l4cvkh-qtwebengine-5.6.3/lib:/nix/store/sfa7i5pbpmz2s3bx7dabayqh5yi47i4j-qtwebchannel-5.6.3/lib:/nix/store/j0wqpjgywkmc15309cz306y5gvvyrazl-qtsvg-5.6.3/lib:/nix/store/ndnsk78mbl33bzap25mfgnm1wr5ch2dq-libpulseaudio-11.0/lib:/nix/store/8bzg1vgp6qwbs7jmh9wjgiflzjyvm2ig-quazip-0.7.1/lib:/nix/store/06kdww949mfp9pn84al4lmba6iybnr6s-libc++-4.0.1/lib:/nix/store/khvlmyz617vx229kv02qg7pljr9cldla-libc++abi-4.0.1/lib:/nix/store/yhbp3fy8bmkqziawl78srgzjwqyy91s1-gcc-6.4.0/lib64]

Look at the last path, which is /nix/store/yhbp3fy8bmkqziawl78srgzjwqyy91s1-gcc-6.4.0/lib64-- a rather unhelpful path to search for shared libraries:

$ ls /nix/store/yhbp3fy8bmkqziawl78srgzjwqyy91s1-gcc-6.4.0/lib64
gcc                libcilkrts.spec  libmpx.a           libssp_nonshared.a
libasan.a          libgomp.a        libmpx.spec        libstdc++.a
libasan_preinit.o  libgomp.spec     libmpxwrappers.a   libstdc++fs.a
libatomic.a        libitm.a         libquadmath.a      libsupc++.a
libcc1.a           libitm.spec      libsanitizer.spec  libtsan.a
libcilkrts.a       liblsan.a        libssp.a           libubsan.a

This is because of the way the path is constructed; instead it should just add stdenv.cc.cc to deps (or gcc.cc if using gcc's libraries is important). This also lets us drop the libDir bit.

Doing this yields ...::/nix/store/yfkvvnp2ak44nlhfm4xq82i52kzrj4cc-gcc-6.4.0-lib/lib, much better.

@dtzWill will you be proposing a PR for this?

I have just opened a PR https://github.com/NixOS/nixpkgs/pull/41137 hopefully fixing this.
For future reference:
LD_DEBUG=libs QT_DEBUG_PLUGINS=1 result/bin/ts3client gives reasonably useful debugging information.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomberek picture tomberek  Â·  3Comments

sid-kap picture sid-kap  Â·  3Comments

lverns picture lverns  Â·  3Comments

ghost picture ghost  Â·  3Comments

domenkozar picture domenkozar  Â·  3Comments