Important: Please read the Qt Code of Conduct -

Deploying A Project

  • Hi
    Qt 5.6.0
    I'm trying to deploy a project an linux (currently fedora). I'm using QuickWidgets in my application. so I built qt static and made the project with that static kit and I ran it on a live fedora (with no qt installed) but it gave me the quick libs not installed error. I searched it and found out it's a bug and there is a problem with static linking and fedora. so I tried the shared libs and built the project with the default compiler and used this in the .pro file:

    QMAKE_LFLAGS += -Wl,-rpath,"'$$ORIGIN'"

    and put the shared libs beside the executable but it also didn't run on a live fedora and it told me that it couldn't find or load the platform plugin xcb and the available plugins was xcb !!! (I but the xcb lib file in platforms path in the executable path).

    I searched the internet and found out that this is a bug in Qt 5.6.0 and I had to build the project with -no-ulibs command and I did that and put the shared libs beside the exe and I ran it and it gave me the same xcb error.

    the deploying part of qt seems impossible to me and it has driven me crazy. What should I do?

  • Lifetime Qt Champion

    well you seem to use the RPATH way
    maybe try with export script

    i never used fedora but this worked in old ubuntu and newer ones.
    using EXPORT for ld.

  • Hi, avoiding that infamous "... failed to start ... xcb" error in Linux I think is actually easier with 5.6 than it was in 5.5.1 or earlier.
    You don't need to do any chrpath -r fiddling or create an extra lib directory, just put the 2 .so files that needs next to it. So a minimal Hello World setup for Linux Qt 5.6 would look like this:


    and in the platforms subdirectory:

    (To understand more, you can use the chrpath and ldd commands on the libqxcb.file)

  • Hi @hskoglund @mrjj
    Both of your ways mixed together helped me do it. but there is a problem. I could reduce the size of the files to 20 mb and it runs on fedora 23 but in previous versions of fedora libicu is at the previous version and the program requires the latest one and the size of the icu libs are 30 mb !!!
    is there a way to reduce the size and get it to work at the same time?

  • Lifetime Qt Champion

    Not sure u can get it smaller if u really need those libs

    I was under the impression that one could leave them out but
    not in all cases it seems.

  • @mrjj
    I don't realy need the libs and these are dll files but I need the linux libs. I built qt with -no-icu and when I use ldd on my own fedora it doesn't show the icu libs but when I do the same thing on a same file in a live fedora it shows the icu libs. Am I doing something wrong?

  • Lifetime Qt Champion

    It all sounds good.
    Maybe the live fedora have other version of Qt that uses/build with icu?
    Else it sounds really strange as ".exe" should have same dependencies
    if same file.??

  • Hi
    Thank you @mrjj and everyone who helped. I built qt staticand with -no-icu and there was no icu libs in ldd and I ran the app on pure fedora

Log in to reply