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. Qt Package Dependency Issue on Linux
Forum Updated to NodeBB v4.3 + New Features

Qt Package Dependency Issue on Linux

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 1.2k 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.
  • A Offline
    A Offline
    anshah
    wrote on 31 Jul 2022, 22:29 last edited by anshah
    #1

    Hello,
    I'm building my application which uses the Qt GUI framework on Ubuntu 20.04. When I try to install (using apt-get) the Debian file the 20.04 build produces on Ubuntu 18.04 I encounter package dependency issues.

    [MyApp]: /usr/lib/x86_64-linux-gnu/libQt5WebKit.so.5: no version information available (required by [MyApp])
    [MyApp]: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.12' not found (required by [MyApp])
    

    Mainly because Ubuntu 18.04 provides Qt 5.9 in the repository and my application is built with Qt 5.12 which Ubuntu 20.04 repository provides.

    Is there any solution to this issue? Is it possible for Qt to install from the focal (20.04) repository.
    Any help would be most appreciated.

    J 1 Reply Last reply 1 Aug 2022, 06:16
    0
    • A anshah
      31 Jul 2022, 22:29

      Hello,
      I'm building my application which uses the Qt GUI framework on Ubuntu 20.04. When I try to install (using apt-get) the Debian file the 20.04 build produces on Ubuntu 18.04 I encounter package dependency issues.

      [MyApp]: /usr/lib/x86_64-linux-gnu/libQt5WebKit.so.5: no version information available (required by [MyApp])
      [MyApp]: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.12' not found (required by [MyApp])
      

      Mainly because Ubuntu 18.04 provides Qt 5.9 in the repository and my application is built with Qt 5.12 which Ubuntu 20.04 repository provides.

      Is there any solution to this issue? Is it possible for Qt to install from the focal (20.04) repository.
      Any help would be most appreciated.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 1 Aug 2022, 06:16 last edited by
      #2

      @anshah said in Qt Package Dependency Issue on Linux:

      Is there any solution to this issue?

      Yes, deploy your application to create a package which also contains all needed Qt libraries.
      See https://doc.qt.io/qt-6/linux-deployment.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 2 Replies Last reply 13 Aug 2022, 19:42
      1
      • A Offline
        A Offline
        anshah
        wrote on 2 Aug 2022, 16:07 last edited by anshah 8 Feb 2022, 21:35
        #3

        Thank you for your reply.
        Few Questions:

        • list itemDoes this have a significant impact on the size of the package since the libraries are included?

        • list itemOur build generates Debian and RPM from an Ubuntu 20.04 Container. So we deploy on Ubuntu and RHEL. If I statically build my application with Qt you are saying the Distro/Version should not matter?

        J 1 Reply Last reply 3 Aug 2022, 06:28
        0
        • A anshah
          2 Aug 2022, 16:07

          Thank you for your reply.
          Few Questions:

          • list itemDoes this have a significant impact on the size of the package since the libraries are included?

          • list itemOur build generates Debian and RPM from an Ubuntu 20.04 Container. So we deploy on Ubuntu and RHEL. If I statically build my application with Qt you are saying the Distro/Version should not matter?

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 3 Aug 2022, 06:28 last edited by
          #4

          @anshah

          • Yes, it has impact on the size, but if the libraries are required by your application you have to deliver them
          • Well, whether it will run on any Linux distribution or not depends I would say. You would need to build ALL dependencies statically to reduce dependencies to distribution provided libraries. Static linking can also reduce the overall size of your package because linker removes parts of libraries (functions for example) which are not used by your application. But on the other side your application will bring its own versions (statically linked) of all the needed libraries which would be otherwise provided by the Linux distribution in case of dynamic linking.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          A 1 Reply Last reply 13 Aug 2022, 18:33
          0
          • J jsulm
            3 Aug 2022, 06:28

            @anshah

            • Yes, it has impact on the size, but if the libraries are required by your application you have to deliver them
            • Well, whether it will run on any Linux distribution or not depends I would say. You would need to build ALL dependencies statically to reduce dependencies to distribution provided libraries. Static linking can also reduce the overall size of your package because linker removes parts of libraries (functions for example) which are not used by your application. But on the other side your application will bring its own versions (statically linked) of all the needed libraries which would be otherwise provided by the Linux distribution in case of dynamic linking.
            A Offline
            A Offline
            anshah
            wrote on 13 Aug 2022, 18:33 last edited by
            #5

            @jsulm This was very helpful. I'm trying to implement this...I may have a few more questions on the Makefile. Much appreciated.

            1 Reply Last reply
            0
            • J jsulm
              1 Aug 2022, 06:16

              @anshah said in Qt Package Dependency Issue on Linux:

              Is there any solution to this issue?

              Yes, deploy your application to create a package which also contains all needed Qt libraries.
              See https://doc.qt.io/qt-6/linux-deployment.html

              A Offline
              A Offline
              anshah
              wrote on 13 Aug 2022, 19:42 last edited by
              #6

              @jsulm said in Qt Package Dependency Issue on Linux:

              https://doc.qt.io/qt-6/linux-deployment.html

              I have Qt installed from the repository on Ubuntu 14.04. The Linux deployment document states to go to the Qt path and configure to build the static libs:

              cd /path/to/Qt
              ./configure -static -prefix /path/to/Qt <other parameters>
              make
              

              I'm not sure where this "/path/to/Qt" is which contains the "configure".

              1 Reply Last reply
              0
              • C Offline
                C Offline
                ChrisW67
                wrote on 13 Aug 2022, 22:56 last edited by
                #7

                I have Qt installed from the repository on Ubuntu 14.04.

                14.04... really? You do not need any version of Qt installed in order to build Qt itself. You do need a suitable compiler which 18.04 or 20.04 will provide. The default GCC version with Ubuntu 14.04 is, I think, GCC 4.x which it too old.

                I'm not sure where this "/path/to/Qt" is which contains the "configure".

                It is where you have unpacked the Qt source code. You are trying to build Qt itself from source code to make a version for static linking.

                A 1 Reply Last reply 14 Aug 2022, 18:07
                0
                • J jsulm
                  1 Aug 2022, 06:16

                  @anshah said in Qt Package Dependency Issue on Linux:

                  Is there any solution to this issue?

                  Yes, deploy your application to create a package which also contains all needed Qt libraries.
                  See https://doc.qt.io/qt-6/linux-deployment.html

                  A Offline
                  A Offline
                  anshah
                  wrote on 14 Aug 2022, 17:51 last edited by
                  #8

                  @jsulm
                  Last question...hopefully. =)
                  Once the static libraries are built I understand when we deploy we included all needed libraries and include files. What about binaries such as "moc" and "rcc"?

                  This was was my previous Makefile config:

                  QT_LIB=/usr/lib/x86_64-linux-gnu
                  MOC=$(QT_LIB)/qt5/bin/moc
                  RCC=$(QT_LIB)/qt5/bin/rcc
                  
                  1 Reply Last reply
                  0
                  • C ChrisW67
                    13 Aug 2022, 22:56

                    I have Qt installed from the repository on Ubuntu 14.04.

                    14.04... really? You do not need any version of Qt installed in order to build Qt itself. You do need a suitable compiler which 18.04 or 20.04 will provide. The default GCC version with Ubuntu 14.04 is, I think, GCC 4.x which it too old.

                    I'm not sure where this "/path/to/Qt" is which contains the "configure".

                    It is where you have unpacked the Qt source code. You are trying to build Qt itself from source code to make a version for static linking.

                    A Offline
                    A Offline
                    anshah
                    wrote on 14 Aug 2022, 18:07 last edited by anshah
                    #9

                    @ChrisW67 The reason for 14.04 is because we deploy to RHEL 7 and 8 and UBuntu 18.04, 20.04.

                    UBuntu 14.04 is the common denominator to support the distro/versions.

                    I tried upgrading to 18.04 but as a result of the compiler version you mentioned...our application won't deploy on RHEL 7.
                    It's like a game of whack-a-mole deploying on Linux distro/versions.

                    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