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. Package app as .AppImage after building with Qt Creator
QtWS25 Last Chance

Package app as .AppImage after building with Qt Creator

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 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.
  • E Offline
    E Offline
    Elijah
    wrote on 4 Feb 2022, 23:03 last edited by
    #1

    I am trying to build and package QGroundControl (QGC) into a standalone .AppImage file for running on Linux (Ubuntu) systems. However, this issue is specific to QT, not QGroundControl.

    My issue is this: I install Qt Creator with the online installer with the desktop gcc complier for 5.15.2 as described in the QGC developer docs. On Ubuntu 20.04 with glibc 2.31 I can use Qt Creator to build QGC successfully. Then I try to package it into an .AppImage with LinuxDeployQT. This fails and says I must have glibc <= 2.27.

    So I got an installation of Ubuntu 18.04. This has glibc 2.27 by default. The problem with Ubuntu 18 with glibc 2.27 is when I install QT Creator with 5.15.2 and try to run QT Creator I get an error saying glibc_2.28 is not found.

    If >= 2.28 is required to build with Qt Creator, but <= 2.27 is required to package into an .AppImage with LinuxDeployQT how is building and packaging supposed to be done for .AppImage files?

    Thank you for your help!

    B 1 Reply Last reply 16 Mar 2022, 14:55
    0
    • E Elijah
      4 Feb 2022, 23:03

      I am trying to build and package QGroundControl (QGC) into a standalone .AppImage file for running on Linux (Ubuntu) systems. However, this issue is specific to QT, not QGroundControl.

      My issue is this: I install Qt Creator with the online installer with the desktop gcc complier for 5.15.2 as described in the QGC developer docs. On Ubuntu 20.04 with glibc 2.31 I can use Qt Creator to build QGC successfully. Then I try to package it into an .AppImage with LinuxDeployQT. This fails and says I must have glibc <= 2.27.

      So I got an installation of Ubuntu 18.04. This has glibc 2.27 by default. The problem with Ubuntu 18 with glibc 2.27 is when I install QT Creator with 5.15.2 and try to run QT Creator I get an error saying glibc_2.28 is not found.

      If >= 2.28 is required to build with Qt Creator, but <= 2.27 is required to package into an .AppImage with LinuxDeployQT how is building and packaging supposed to be done for .AppImage files?

      Thank you for your help!

      B Offline
      B Offline
      bee65
      wrote on 16 Mar 2022, 14:55 last edited by
      #2

      @Elijah

      Did you find a solution?

      The linuxdeployqt author, probonopd, commented on Feb 19

      Qt 6 does not run on all still-supported Linux distributions at this point. linuxdeployqt can only start supporting Qt 6 once it is compatible to all still-supported Linux distributions. In the meantime, you can try whether AppImageBuilder can do it.
      

      https://github.com/probonopd/linuxdeployqt/issues/340

      The result of this policy is our app is not available on any linux distribution. We have an application that is released on Windows, Mac, iOS and Android. We have a handful of customers requesting Linux support. The app runs fine from QtCreator on Linux, so why not? If there was a way to do it, no more complex than the Mac or Windows release, then it would be supported, but I have wasted too much time on it already!

      J 1 Reply Last reply 17 Mar 2022, 02:23
      0
      • B bee65
        16 Mar 2022, 14:55

        @Elijah

        Did you find a solution?

        The linuxdeployqt author, probonopd, commented on Feb 19

        Qt 6 does not run on all still-supported Linux distributions at this point. linuxdeployqt can only start supporting Qt 6 once it is compatible to all still-supported Linux distributions. In the meantime, you can try whether AppImageBuilder can do it.
        

        https://github.com/probonopd/linuxdeployqt/issues/340

        The result of this policy is our app is not available on any linux distribution. We have an application that is released on Windows, Mac, iOS and Android. We have a handful of customers requesting Linux support. The app runs fine from QtCreator on Linux, so why not? If there was a way to do it, no more complex than the Mac or Windows release, then it would be supported, but I have wasted too much time on it already!

        J Offline
        J Offline
        JKSH
        Moderators
        wrote on 17 Mar 2022, 02:23 last edited by
        #3

        @bee65 said in Package app as .AppImage after building with Qt Creator:

        The result of this policy is our app is not available on any linux distribution.

        You don't strictly need linuxdeployqt. Try manual deployment: http://www.tripleboot.org/?p=138#Linux

        In summary:

        • Provide your executable
        • Provide all the required Qt *.so files
        • Ensure that your executable can find the *.so files

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        1
        • B Offline
          B Offline
          bee65
          wrote on 17 Mar 2022, 22:16 last edited by
          #4

          On Windows my app is deployed with 556 files in 56 folders. It doesn't seem like it would be a good plan to set that up manually, given my limited understanding of how it all works! I suspect many of the libraries are plugins, and would not show up with the ldd command.

          Instead of trying to work out what libraries are needed, I thought I would try just shipping the whole darn lot. I took a copy of the Qt/6.2.3/gcc_64 folder, deleted a bunch of stuff that is not runtime-related, did the chrpath thing, and it seems to work fine. The compressed tar file is only 48MB, which is actually smaller than my Mac deployment bundle!

          I just need to set up an icon and a desktop file and I think we may be good!

          J 1 Reply Last reply 18 Mar 2022, 03:09
          1
          • B bee65
            17 Mar 2022, 22:16

            On Windows my app is deployed with 556 files in 56 folders. It doesn't seem like it would be a good plan to set that up manually, given my limited understanding of how it all works! I suspect many of the libraries are plugins, and would not show up with the ldd command.

            Instead of trying to work out what libraries are needed, I thought I would try just shipping the whole darn lot. I took a copy of the Qt/6.2.3/gcc_64 folder, deleted a bunch of stuff that is not runtime-related, did the chrpath thing, and it seems to work fine. The compressed tar file is only 48MB, which is actually smaller than my Mac deployment bundle!

            I just need to set up an icon and a desktop file and I think we may be good!

            J Offline
            J Offline
            JKSH
            Moderators
            wrote on 18 Mar 2022, 03:09 last edited by
            #5

            @bee65 said in Package app as .AppImage after building with Qt Creator:

            Instead of trying to work out what libraries are needed, I thought I would try just shipping the whole darn lot. I took a copy of the Qt/6.2.3/gcc_64 folder, deleted a bunch of stuff that is not runtime-related, did the chrpath thing, and it seems to work fine.

            Great thinking, and congrats on your progress!

            In essence, you have done the Linux version of the "Quick and dirty" deployment described at https://wiki.qt.io/Deploy_an_Application_on_Windows

            Hopefully this diagram provides a bit of clarity to the deployment process:

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            2

            • Login

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