Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Deploying Qt Application on Linux
Forum Updated to NodeBB v4.3 + New Features

Deploying Qt Application on Linux

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
28 Posts 4 Posters 6.2k Views 1 Watching
  • 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.
  • J jsulm
    9 Dec 2019, 12:39

    @sharath said in Deploying Qt Application on Linux:

    Exec format error

    Looks like you're trying to execute x86_64 binary on ARM or x86 which can't work. On which machine (PC, target device,...) do you execute it?

    Also, did you made linuxdeployqt-6-x86_64.AppImage executable?

    S Offline
    S Offline
    sharath
    wrote on 9 Dec 2019, 12:43 last edited by sharath 12 Sept 2019, 12:45
    #5

    @jsulm i was trying to build linuxdeployqt and try to create .appImage from my machine. i didn't get how to create app image from linuxdeployqt source.
    Can u please tell me how to create and get appImage of linuxdeployqt for ARM?

    J 1 Reply Last reply 9 Dec 2019, 12:47
    0
    • S sharath
      9 Dec 2019, 12:43

      @jsulm i was trying to build linuxdeployqt and try to create .appImage from my machine. i didn't get how to create app image from linuxdeployqt source.
      Can u please tell me how to create and get appImage of linuxdeployqt for ARM?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 9 Dec 2019, 12:47 last edited by
      #6

      @sharath Please be more precise. You downloaded linuxdeployqt-6-x86_64.AppImage from https://github.com/probonopd/linuxdeployqt/releases, is this correct?
      I already asked, but once more:

      • Did you mark it as executable?
      • Do you execute it on an x86_64 machine

      "Can u please tell me how to create and get appImage of linuxdeployqt for ARM?" - as described here https://github.com/probonopd/linuxdeployqt

      Or here https://doc.qt.io/qt-5/linux-deployment.html "Creating the Application Package".

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

      S 1 Reply Last reply 9 Dec 2019, 12:54
      1
      • J jsulm
        9 Dec 2019, 12:47

        @sharath Please be more precise. You downloaded linuxdeployqt-6-x86_64.AppImage from https://github.com/probonopd/linuxdeployqt/releases, is this correct?
        I already asked, but once more:

        • Did you mark it as executable?
        • Do you execute it on an x86_64 machine

        "Can u please tell me how to create and get appImage of linuxdeployqt for ARM?" - as described here https://github.com/probonopd/linuxdeployqt

        Or here https://doc.qt.io/qt-5/linux-deployment.html "Creating the Application Package".

        S Offline
        S Offline
        sharath
        wrote on 9 Dec 2019, 12:54 last edited by
        #7

        @jsulm said in Deploying Qt Application on Linux:

        Did you mark it as executable?
        yes i did
        Do you execute it on an x86_64 machine
        No i didn't execute it on x86_64 machine

        J 1 Reply Last reply 9 Dec 2019, 12:58
        0
        • S sharath
          9 Dec 2019, 12:54

          @jsulm said in Deploying Qt Application on Linux:

          Did you mark it as executable?
          yes i did
          Do you execute it on an x86_64 machine
          No i didn't execute it on x86_64 machine

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 9 Dec 2019, 12:58 last edited by
          #8

          @sharath said in Deploying Qt Application on Linux:

          No i didn't execute it on x86_64 machine

          Well, since it's x86_64 binary it will not work on anything else.
          Do it on your PC. And then follow the instructions to deploy.

          One question: do you do cross compilation or do you build/deploy directly on your device?

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

          S 1 Reply Last reply 9 Dec 2019, 13:10
          2
          • J jsulm
            9 Dec 2019, 12:58

            @sharath said in Deploying Qt Application on Linux:

            No i didn't execute it on x86_64 machine

            Well, since it's x86_64 binary it will not work on anything else.
            Do it on your PC. And then follow the instructions to deploy.

            One question: do you do cross compilation or do you build/deploy directly on your device?

            S Offline
            S Offline
            sharath
            wrote on 9 Dec 2019, 13:10 last edited by
            #9

            @jsulm said in Deploying Qt Application on Linux:

            One question: do you do cross compilation or do you build/deploy directly on your device?

            i'm building directly on target device.

            S 1 Reply Last reply 9 Dec 2019, 13:34
            0
            • S sharath
              9 Dec 2019, 13:10

              @jsulm said in Deploying Qt Application on Linux:

              One question: do you do cross compilation or do you build/deploy directly on your device?

              i'm building directly on target device.

              S Offline
              S Offline
              sierdzio
              Moderators
              wrote on 9 Dec 2019, 13:34 last edited by
              #10

              @sharath said in Deploying Qt Application on Linux:

              @jsulm said in Deploying Qt Application on Linux:

              One question: do you do cross compilation or do you build/deploy directly on your device?

              i'm building directly on target device.

              Then you need to compile linuxdeployqt on that device, too. Building instructions are in a file called BUILDING https://github.com/probonopd/linuxdeployqt/blob/master/BUILDING.md

              (Z(:^

              S 2 Replies Last reply 10 Dec 2019, 04:23
              4
              • S sierdzio
                9 Dec 2019, 13:34

                @sharath said in Deploying Qt Application on Linux:

                @jsulm said in Deploying Qt Application on Linux:

                One question: do you do cross compilation or do you build/deploy directly on your device?

                i'm building directly on target device.

                Then you need to compile linuxdeployqt on that device, too. Building instructions are in a file called BUILDING https://github.com/probonopd/linuxdeployqt/blob/master/BUILDING.md

                S Offline
                S Offline
                sharath
                wrote on 10 Dec 2019, 04:23 last edited by
                #11

                Thanks @sierdzio, i will try this

                1 Reply Last reply
                0
                • S sierdzio
                  9 Dec 2019, 13:34

                  @sharath said in Deploying Qt Application on Linux:

                  @jsulm said in Deploying Qt Application on Linux:

                  One question: do you do cross compilation or do you build/deploy directly on your device?

                  i'm building directly on target device.

                  Then you need to compile linuxdeployqt on that device, too. Building instructions are in a file called BUILDING https://github.com/probonopd/linuxdeployqt/blob/master/BUILDING.md

                  S Offline
                  S Offline
                  sharath
                  wrote on 10 Dec 2019, 05:59 last edited by
                  #12

                  hello @sierdzio, i compiled linuxdeployqt on my device and trying to run below command

                  ./linuxdeployqt /path/to/appbinary -appimage
                  

                  i get following error

                  linuxdeployqt 6 (commit 5195ec1), build <local dev build> built on 2019-12-10 05:35:49 UTC
                  ERROR: The host system is too new.
                  Please run on a system with a glibc version no newer than what comes with the oldest
                  currently still-supported mainstream distribution (xenial), which is glibc 2.23.
                  This is so that the resulting bundle will work on most still-supported Linux distributions.
                  For more information, please see
                  https://github.com/probonopd/linuxdeployqt/issues/340
                  
                  
                  S 1 Reply Last reply 10 Dec 2019, 06:38
                  0
                  • H Offline
                    H Offline
                    hskoglund
                    wrote on 10 Dec 2019, 06:12 last edited by
                    #13

                    There's an alternative that's supposed to work on newer Linux systems:
                    https://github.com/linuxdeploy/linuxdeploy

                    1 Reply Last reply
                    1
                    • S sharath
                      10 Dec 2019, 05:59

                      hello @sierdzio, i compiled linuxdeployqt on my device and trying to run below command

                      ./linuxdeployqt /path/to/appbinary -appimage
                      

                      i get following error

                      linuxdeployqt 6 (commit 5195ec1), build <local dev build> built on 2019-12-10 05:35:49 UTC
                      ERROR: The host system is too new.
                      Please run on a system with a glibc version no newer than what comes with the oldest
                      currently still-supported mainstream distribution (xenial), which is glibc 2.23.
                      This is so that the resulting bundle will work on most still-supported Linux distributions.
                      For more information, please see
                      https://github.com/probonopd/linuxdeployqt/issues/340
                      
                      
                      S Offline
                      S Offline
                      sierdzio
                      Moderators
                      wrote on 10 Dec 2019, 06:38 last edited by
                      #14

                      @sharath said in Deploying Qt Application on Linux:

                      i get following error

                      Well, what do you expect from me? The error message tells you exactly what to do. Use an older operating system so that glibc is older.

                      Or use -unsupported-allow-new-glibc flag to suppress this error.

                      (Z(:^

                      S 1 Reply Last reply 10 Dec 2019, 10:12
                      4
                      • S sierdzio
                        10 Dec 2019, 06:38

                        @sharath said in Deploying Qt Application on Linux:

                        i get following error

                        Well, what do you expect from me? The error message tells you exactly what to do. Use an older operating system so that glibc is older.

                        Or use -unsupported-allow-new-glibc flag to suppress this error.

                        S Offline
                        S Offline
                        sharath
                        wrote on 10 Dec 2019, 10:12 last edited by
                        #15

                        Thanks @sierdzio, it has worked and created all dependent libraries.

                        But when i take this app and run this in other machine i get below error

                        ./AppRun: error while loading shared libraries: libGLdispatch.so.0: cannot open shared object file: No such file or directory

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          sierdzio
                          Moderators
                          wrote on 10 Dec 2019, 11:06 last edited by
                          #16

                          Do you run linuxdeployqt with -appimage flag? Try running it twice, it sometimes helps.

                          Does your other machine have OpenGL libraries installed? Does it support OpenGL at all?

                          (Z(:^

                          S 1 Reply Last reply 11 Dec 2019, 06:39
                          0
                          • S sierdzio
                            10 Dec 2019, 11:06

                            Do you run linuxdeployqt with -appimage flag? Try running it twice, it sometimes helps.

                            Does your other machine have OpenGL libraries installed? Does it support OpenGL at all?

                            S Offline
                            S Offline
                            sharath
                            wrote on 11 Dec 2019, 06:39 last edited by sharath 12 Nov 2019, 06:39
                            #17

                            @sierdzio said in Deploying Qt Application on Linux:

                            Do you run linuxdeployqt with -appimage flag? Try running it twice, it sometimes helps.
                            Does your other machine have OpenGL libraries installed? Does it support OpenGL at all?

                            i ran linuxdeployqt with -appimage many times and also openGL is installed on my target system.

                            i'm getting same issue

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              sierdzio
                              Moderators
                              wrote on 11 Dec 2019, 06:53 last edited by
                              #18

                              OK then. Run with -verbose=3 and look at the output - perhaps there is some warning there that is important for you in this case.

                              You can try running deploy first without appimage flag, then copy the OpenGL library manually into the package, then run linuxdeployqt again with -appimage.

                              Lastly, maybe -extra-plugins= flag can be used to force linuxdeployqt to deploy that library.

                              (Z(:^

                              S 1 Reply Last reply 12 Dec 2019, 04:57
                              0
                              • S sierdzio
                                11 Dec 2019, 06:53

                                OK then. Run with -verbose=3 and look at the output - perhaps there is some warning there that is important for you in this case.

                                You can try running deploy first without appimage flag, then copy the OpenGL library manually into the package, then run linuxdeployqt again with -appimage.

                                Lastly, maybe -extra-plugins= flag can be used to force linuxdeployqt to deploy that library.

                                S Offline
                                S Offline
                                sharath
                                wrote on 12 Dec 2019, 04:57 last edited by sharath 12 Dec 2019, 06:33
                                #19

                                @sierdzio thank you for your support, I don't know why this shows diff errors.

                                ./app: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /home/ninetripod/Documents/Vistaro_linux_1.0/bin/libopencv_core.so.4.0)
                                ./app: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /home/ninetripod/Documents/Vistaro_linux_1.0/bin/libopencv_imgproc.so.4.0)
                                ./app: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /home/ninetripod/Documents/Vistaro_linux_1.0/bin/libtbb.so.2)
                                ./app: /lib/aarch64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/ninetripod/Documents/Vistaro_linux_1.0/bin/libpng16.so.16)
                                
                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  sierdzio
                                  Moderators
                                  wrote on 12 Dec 2019, 08:19 last edited by
                                  #20

                                  Does the AppImage run correctly when you launch it on the original machine (same where you compile and run linuxdeployqt on)?

                                  I don't have any further ideas.

                                  (Z(:^

                                  S 2 Replies Last reply 12 Dec 2019, 09:35
                                  0
                                  • S sierdzio
                                    12 Dec 2019, 08:19

                                    Does the AppImage run correctly when you launch it on the original machine (same where you compile and run linuxdeployqt on)?

                                    I don't have any further ideas.

                                    S Offline
                                    S Offline
                                    sharath
                                    wrote on 12 Dec 2019, 09:35 last edited by sharath 12 Dec 2019, 09:38
                                    #21

                                    @sierdzio when i run linuxdeployqt , below warning i'm getting

                                    ninetripod@X3399:~/Documents/build-linuxdeployqt-Desktop-Debug/bin$ ./linuxdeployqt /home/ninetripod/Documents/vistaro_04_12/vistaro_build/vistaroQtQuick -appimage -unsupported-allow-new-glibc
                                    
                                    WARNING: Not checking glibc on the host system.
                                             The resulting AppDir or AppImage may not run on older systems.
                                             This mode is unsupported and discouraged.
                                             For more information, please see
                                             https://github.com/probonopd/linuxdeployqt/issues/340
                                    app-binary: "/home/ninetripod/Documents/vistaro_04_12/vistaro_build/vistaroQtQuick"
                                    appDirPath: "/home/ninetripod/Documents/vistaro_04_12/vistaro_build"
                                    relativeBinPath: "vistaroQtQuick"
                                    Keeping existing AppRun
                                    WARNING: Plugin "/usr/lib/aarch64-linux-gnu/qt5/plugins/platformthemes/libqgtk2.so" not found, skipping
                                    WARNING: Plugin "/usr/lib/aarch64-linux-gnu/qt5/plugins/styles/libqgtk2style.so" not found, skipping
                                    WARNING: "/home/ninetripod/Documents/vistaro_04_12/vistaro_build/qt.conf" already exists, will not overwrite.
                                    
                                    

                                    i think this is the issue i guess.

                                    1 Reply Last reply
                                    0
                                    • S sierdzio
                                      12 Dec 2019, 08:19

                                      Does the AppImage run correctly when you launch it on the original machine (same where you compile and run linuxdeployqt on)?

                                      I don't have any further ideas.

                                      S Offline
                                      S Offline
                                      sharath
                                      wrote on 12 Dec 2019, 09:49 last edited by
                                      #22

                                      @sierdzio said in Deploying Qt Application on Linux:

                                      Does the AppImage run correctly when you launch it on the original machine (same where you compile and run linuxdeployqt on)?

                                      yes it has worked correctly.

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        sierdzio
                                        Moderators
                                        wrote on 12 Dec 2019, 10:21 last edited by
                                        #23

                                        I don't think gtk style plugins are a problem, they have little to do with OpenGL lib.

                                        (Z(:^

                                        S 2 Replies Last reply 12 Dec 2019, 10:28
                                        0
                                        • S sierdzio
                                          12 Dec 2019, 10:21

                                          I don't think gtk style plugins are a problem, they have little to do with OpenGL lib.

                                          S Offline
                                          S Offline
                                          sharath
                                          wrote on 12 Dec 2019, 10:28 last edited by
                                          #24

                                          @sierdzio i got to know that im building my linudeployqt on latest version of glibc, it should build on older version of glibc. so that it can be run on any newer version glibc as stated in https://github.com/probonopd/linuxdeployqt/issues/340

                                          1 Reply Last reply
                                          0

                                          14/28

                                          10 Dec 2019, 06:38

                                          • Login

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