Yet another xcb issue with deployment



  • I've not been working with Qt long. However, I've had enough time to build a working application, package working deployment packages on both Windows and Mac in both 32 and 64 bits, however, Linux is destroying me. I'm building the application within Ubuntu, 64 bit, and trying to test that out on Fedora 64 bit.

    The error I'm getting:
    This application failed to start because it could not find or load the Qt platform plugin "xcb".

    I've tested on a clean Ubuntu VM, and it worked fine, no issues.

    Here's how I've packaged it so far.
    I've built the app within Qt creator, and used chrpath on it to set the new RPATH to by libs directory that houses the Qt5 libs.

    Directory tree looks like this:

    @libs
    libQt5Widgets.so.5
    libQt5Gui.so.5
    libQt5Widgets.so.5
    libQt5DBus.so.5
    libicudata.so.52
    libicui18n.so.52
    libicuuc.so.52

    platforms
    libqxcb.so

    myapp@

    I've even followed "this tutorial:":http://www.tripleboot.org/?p=138 however I'm still receiving this error. Should I drum up a dev environment on Fedora in order to do this? Or should the one compiled on Ubuntu work?

    I've been at this for days, read a dozen or more posts here and stackoverflow on the subject, and still stumped. Any help would be most welcome!



  • Hi, haven't tested on Fedora myself but the problem could be that even though libqxcb.so is found by your app, an .so file it depends could not be found. And then you'll get the same error message, i.e. "Qt platform plugin failed". I've written about it in another "blog post ":http://www.tripleboot.org/?p=536
    (look for "Another gotcha..")

    So, two .so files that I know libqxcb.so needs to load successfully are libQt5DBus.so (which you have included) and libxcb.so. Perhaps the latter one is missing, on my Debian system it's /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0.

    What you also can do, is to run lsof on your Ubuntu VM where everything is fine and dandy, and see if there are some other files that Fedora doesn't have.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You should try starting your application with QT_DEBUG_PLUGINS=1 defined. It should show you more information about what is happening.



  • Thanks SGaist, I'll give that a shot, see what comes up.

    hskoglund, I found out about the DBus .so from running ldd on libqxcb.so, so I added that into the project as well. Also, I didn't think about the libxcb.so file. I'll look into that for Fedora. As I said it works well on Ubuntu and even on other Debian based OSs as I've tested on several. It's the Red Hat deviations that are giving me trouble, Fedora being one of them. I'll look into this as well.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.