Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Deploying A Project

Deploying A Project

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 2.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shahriar25
    wrote on last edited by shahriar25
    #1

    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?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      well you seem to use the RPATH way
      maybe try with export script
      https://lemirep.wordpress.com/2013/06/01/deploying-qt-applications-on-linux-and-windows-3/

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

      1 Reply Last reply
      0
      • hskoglundH Offline
        hskoglundH Offline
        hskoglund
        wrote on last edited by
        #3

        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 libqxcb.so needs next to it. So a minimal Hello World setup for Linux Qt 5.6 would look like this:

        YourApp
        libicudata.so.56
        libicui18n.so.56
        libicuuc.so.56
        libQt5Core.so.5
        libQt5Gui.so.5
        libQtWidgets.so.5
        platforms
        

        and in the platforms subdirectory:

        libqxcb.so
        libQt5DBus.so.5
        libQt5XcbQpa.so.5
        

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

        1 Reply Last reply
        1
        • S Offline
          S Offline
          shahriar25
          wrote on last edited by
          #4

          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?

          mrjjM 1 Reply Last reply
          0
          • S shahriar25

            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?

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi
            Not sure u can get it smaller if u really need those libs
            https://forum.qt.io/topic/37891/minimal-icudt51-dll-icudt52-dll-icudt53-dll-icudt54-dll-and-icudt55-dll/16

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

            1 Reply Last reply
            0
            • S Offline
              S Offline
              shahriar25
              wrote on last edited by
              #6

              @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?

              mrjjM 1 Reply Last reply
              0
              • S shahriar25

                @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?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @shahriar25
                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.??

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  shahriar25
                  wrote on last edited by
                  #8

                  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

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved