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 Building Static App for Linux?
Forum Updated to NodeBB v4.3 + New Features

Qt Building Static App for Linux?

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 5 Posters 1.2k Views 5 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.
  • W Offline
    W Offline
    Windy
    wrote on 15 Apr 2020, 15:40 last edited by
    #1

    I’m building an App on Windows and Linux. I was able to make a zip file containing the app and DLLs for a simple deploy on Windows. Now I’d like to link the app statically for a simple deploy on Linux.

    Starting here: https://doc.qt.io/qt-5/linux-deployment.html

    I’m confused first of all by this procedure:

    alt text

    I found a configure file here and then did this:

    alt text

    That looked like it finished, but I can't find the result and don't know how to use it.

    Details are here: Blog Post

    Thanks.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mzimmers
      wrote on 15 Apr 2020, 15:49 last edited by
      #2

      You're saying that you don't have the libs built under ./5.14.2static?

      Did you do a make install?

      BTW: you may want to add the -static-runtime option to your configure command.

      W 2 Replies Last reply 15 Apr 2020, 16:11
      1
      • M mzimmers
        15 Apr 2020, 15:49

        You're saying that you don't have the libs built under ./5.14.2static?

        Did you do a make install?

        BTW: you may want to add the -static-runtime option to your configure command.

        W Offline
        W Offline
        Windy
        wrote on 15 Apr 2020, 16:11 last edited by
        #3

        @mzimmers I'm not a complete noob to linux, but when you say ./something I don't know what "." is so I'm lost. What should I look for if Qt is installed in /home/myname/Qt?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mzimmers
          wrote on 15 Apr 2020, 16:19 last edited by
          #4

          I'm not a Linux maven myself, but I'll give it my best: the dot (".") refers to the current directory, so "./5.14.2static" means a directory "5.14.2static" under the current directory (which appears to be "/Qt/5.14.2/Src" in your case). This is where the configure command is telling make to put the built objects.

          But:

          I don't believe that this will actually occur unless/until you execute a make install command. (I know it won't under Windows.)

          1 Reply Last reply
          1
          • M mzimmers
            15 Apr 2020, 15:49

            You're saying that you don't have the libs built under ./5.14.2static?

            Did you do a make install?

            BTW: you may want to add the -static-runtime option to your configure command.

            W Offline
            W Offline
            Windy
            wrote on 15 Apr 2020, 16:21 last edited by Windy
            #5

            @mzimmers Oh. Right. The instructions say do "make" after the ./configure thing. So here goes. No .5.14.2static dir was created by the ./configure. The instructions say follow that up by a make, which I forgot. Now it's really busy. No clue what it's doing but I'll report back after 600 seconds, when I can post again.

            OMG. It's still running after over an hour and I have a very fast machine. Ryzen 7 1800. And this LinuxVM is running with an SSD VDI hard drive.

            Well I don't see the "make install" part on the web page I'm using. Odd.
            https://doc.qt.io/qt-5/linux-deployment.html

            What does "make install" do?

            M 2 Replies Last reply 15 Apr 2020, 16:22
            0
            • W Windy
              15 Apr 2020, 16:21

              @mzimmers Oh. Right. The instructions say do "make" after the ./configure thing. So here goes. No .5.14.2static dir was created by the ./configure. The instructions say follow that up by a make, which I forgot. Now it's really busy. No clue what it's doing but I'll report back after 600 seconds, when I can post again.

              OMG. It's still running after over an hour and I have a very fast machine. Ryzen 7 1800. And this LinuxVM is running with an SSD VDI hard drive.

              Well I don't see the "make install" part on the web page I'm using. Odd.
              https://doc.qt.io/qt-5/linux-deployment.html

              What does "make install" do?

              M Offline
              M Offline
              mzimmers
              wrote on 15 Apr 2020, 16:22 last edited by
              #6

              @Windy make, and then make install. Two separate commands.

              1 Reply Last reply
              1
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 15 Apr 2020, 18:22 last edited by
                #7

                Hi,

                You should consider using the linuxdeployqt project.

                Don't forget that with static builds, unless you hold a commercial license, there are constraints to be taken into account.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1
                • W Windy
                  15 Apr 2020, 16:21

                  @mzimmers Oh. Right. The instructions say do "make" after the ./configure thing. So here goes. No .5.14.2static dir was created by the ./configure. The instructions say follow that up by a make, which I forgot. Now it's really busy. No clue what it's doing but I'll report back after 600 seconds, when I can post again.

                  OMG. It's still running after over an hour and I have a very fast machine. Ryzen 7 1800. And this LinuxVM is running with an SSD VDI hard drive.

                  Well I don't see the "make install" part on the web page I'm using. Odd.
                  https://doc.qt.io/qt-5/linux-deployment.html

                  What does "make install" do?

                  M Offline
                  M Offline
                  mzimmers
                  wrote on 15 Apr 2020, 18:32 last edited by
                  #8

                  @Windy heh...yeah, Qt is a very big set of libraries. It takes several times longer to build than do most flavors of Linux. You can mitigate this in the future by removing certain components that you don't expect to need.

                  S 1 Reply Last reply 15 Apr 2020, 18:33
                  0
                  • M mzimmers
                    15 Apr 2020, 18:32

                    @Windy heh...yeah, Qt is a very big set of libraries. It takes several times longer to build than do most flavors of Linux. You can mitigate this in the future by removing certain components that you don't expect to need.

                    S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 15 Apr 2020, 18:33 last edited by
                    #9

                    @mzimmers said in Qt Building Static App for Linux?:

                    @Windy heh...yeah, Qt is a very big set of libraries. It takes several times longer to build than do most flavors of Linux. You can mitigate this in the future by removing certain components that you don't expect to need.

                    Especially the web engine module.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    W 1 Reply Last reply 15 Apr 2020, 18:47
                    0
                    • S SGaist
                      15 Apr 2020, 18:33

                      @mzimmers said in Qt Building Static App for Linux?:

                      @Windy heh...yeah, Qt is a very big set of libraries. It takes several times longer to build than do most flavors of Linux. You can mitigate this in the future by removing certain components that you don't expect to need.

                      Especially the web engine module.

                      W Offline
                      W Offline
                      Windy
                      wrote on 15 Apr 2020, 18:47 last edited by Windy
                      #10

                      @SGaist You know, the deeper I go into Qt, the less I like it.
                      I've used it for years and years., but maybe it's time to move on.
                      There are other less onerous platforms out there with fewer Legal Restrictions.
                      I am a retired SW engineer and now a hobbyist writing code to solve my own problems and sharing the source with the world.

                      If Qt doesn't want to continue to make that easier for me, maybe it's time to learn another platform. I have used C++ for decades, but maybe it's time for Python or something more friendly and FREAKING EASIER TO DEPLOY.

                      This thing is still running. It only took 20 minutes to install this whole environment over the net and it's been over two hours to prepare a static deployment and it's still running.

                      I FREAKING GIVE UP.
                      I can use it myself, on Windows and Linux, so what do I care about spending this much nonsense time.
                      I have looked at linuxdeployqt and it looks to me like they wrote part of it as code and the rest as a program to be executed by the user. The SCRIPT for me to run was 5 or 10 pages of stuff I couldn't understand inspite of having used Linux and QT for years. I've done deployments on Linux in the past with Qt on Ubuntu and Debian. I get it, but it has not gotten easier in the past decade.
                      Fooy on this whole thing. I'm gonna go learn python with a graphical builder and see where that goes.
                      CTRL/C
                      exit

                      Oh just finished:
                      Makefile:117: recipe for target 'qwindow-compositor' failed
                      make[4]: *** [qwindow-compositor] Error 1
                      make[4]: Leaving directory '/home/darrell/Qt/5.14.2/Src/qtwayland/examples/wayland/qwindow-compositor'
                      Makefile:59: recipe for target 'sub-qwindow-compositor-make_first' failed
                      make[3]: *** [sub-qwindow-compositor-make_first] Error 2
                      make[3]: Leaving directory '/home/darrell/Qt/5.14.2/Src/qtwayland/examples/wayland'
                      Makefile:46: recipe for target 'sub-wayland-make_first' failed
                      make[2]: *** [sub-wayland-make_first] Error 2
                      make[2]: Leaving directory '/home/darrell/Qt/5.14.2/Src/qtwayland/examples'
                      Makefile:73: recipe for target 'sub-examples-make_first' failed
                      make[1]: *** [sub-examples-make_first] Error 2
                      make[1]: Leaving directory '/home/darrell/Qt/5.14.2/Src/qtwayland'
                      Makefile:656: recipe for target 'module-qtwayland-make_first' failed
                      make: *** [module-qtwayland-make_first] Error 2
                      darrell@LM19VB:~/Qt/5.14.2/Src$ ^C
                      darrell@LM19VB:~/Qt/5.14.2/Src$

                      Whatever

                      kshegunovK 1 Reply Last reply 15 Apr 2020, 21:33
                      0
                      • M Offline
                        M Offline
                        mzimmers
                        wrote on 15 Apr 2020, 21:22 last edited by
                        #11

                        3wslco.jpg

                        1 Reply Last reply
                        2
                        • W Windy
                          15 Apr 2020, 18:47

                          @SGaist You know, the deeper I go into Qt, the less I like it.
                          I've used it for years and years., but maybe it's time to move on.
                          There are other less onerous platforms out there with fewer Legal Restrictions.
                          I am a retired SW engineer and now a hobbyist writing code to solve my own problems and sharing the source with the world.

                          If Qt doesn't want to continue to make that easier for me, maybe it's time to learn another platform. I have used C++ for decades, but maybe it's time for Python or something more friendly and FREAKING EASIER TO DEPLOY.

                          This thing is still running. It only took 20 minutes to install this whole environment over the net and it's been over two hours to prepare a static deployment and it's still running.

                          I FREAKING GIVE UP.
                          I can use it myself, on Windows and Linux, so what do I care about spending this much nonsense time.
                          I have looked at linuxdeployqt and it looks to me like they wrote part of it as code and the rest as a program to be executed by the user. The SCRIPT for me to run was 5 or 10 pages of stuff I couldn't understand inspite of having used Linux and QT for years. I've done deployments on Linux in the past with Qt on Ubuntu and Debian. I get it, but it has not gotten easier in the past decade.
                          Fooy on this whole thing. I'm gonna go learn python with a graphical builder and see where that goes.
                          CTRL/C
                          exit

                          Oh just finished:
                          Makefile:117: recipe for target 'qwindow-compositor' failed
                          make[4]: *** [qwindow-compositor] Error 1
                          make[4]: Leaving directory '/home/darrell/Qt/5.14.2/Src/qtwayland/examples/wayland/qwindow-compositor'
                          Makefile:59: recipe for target 'sub-qwindow-compositor-make_first' failed
                          make[3]: *** [sub-qwindow-compositor-make_first] Error 2
                          make[3]: Leaving directory '/home/darrell/Qt/5.14.2/Src/qtwayland/examples/wayland'
                          Makefile:46: recipe for target 'sub-wayland-make_first' failed
                          make[2]: *** [sub-wayland-make_first] Error 2
                          make[2]: Leaving directory '/home/darrell/Qt/5.14.2/Src/qtwayland/examples'
                          Makefile:73: recipe for target 'sub-examples-make_first' failed
                          make[1]: *** [sub-examples-make_first] Error 2
                          make[1]: Leaving directory '/home/darrell/Qt/5.14.2/Src/qtwayland'
                          Makefile:656: recipe for target 'module-qtwayland-make_first' failed
                          make: *** [module-qtwayland-make_first] Error 2
                          darrell@LM19VB:~/Qt/5.14.2/Src$ ^C
                          darrell@LM19VB:~/Qt/5.14.2/Src$

                          Whatever

                          kshegunovK Offline
                          kshegunovK Offline
                          kshegunov
                          Moderators
                          wrote on 15 Apr 2020, 21:33 last edited by
                          #12

                          @Windy said in Qt Building Static App for Linux?:

                          This thing is still running. It only took 20 minutes to install this whole environment over the net and it's been over two hours to prepare a static deployment and it's still running.

                          As a fellow Ryzen user, did you remember to run make -j16 to make use of them cores? :)

                          Actually building on linux is a breeze, compared to MSVC, still needs some getting used to, I guess.

                          Read and abide by the Qt Code of Conduct

                          1 Reply Last reply
                          0
                          • fcarneyF Offline
                            fcarneyF Offline
                            fcarney
                            wrote on 15 Apr 2020, 21:38 last edited by
                            #13

                            I tried building Webkit for mingw on Windows. It took like 3 or 4 hours with all 12 cores of my processor going. Big stuff takes a while. Can be annoying.

                            C++ is a perfectly valid school of magic.

                            1 Reply Last reply
                            0

                            1/13

                            15 Apr 2020, 15:40

                            • Login

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