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. Recommended way to deploy/install Qt6 shared libraries
Forum Updated to NodeBB v4.3 + New Features

Recommended way to deploy/install Qt6 shared libraries

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
16 Posts 3 Posters 5.8k Views 2 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.
  • M Mark81

    @jsulm I'm going to search for that flag. But, correct me if I'm wrong, this would just copy the required files, right? I mean, it does not take care of installing egl support or other libraries I may need on the target I guess.

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #7

    @Mark81 said in Recommended way to deploy/install Qt6 shared libraries:

    this would just copy the required files, right?

    Yes.
    The thing with Linux is that there are many different distributions, in different versions with different package managers. So, there is no "one fits all" solution for Linux. For example: for Debian based Distributions you would create a Debian (deb) package where you also define the dependencies and where to install what. For RedHat/Fedora based distributions you would create a RPM package.
    Since you want to support Ubuntu 20.04 you should take a look at how to create Debian packages.

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

    M 1 Reply Last reply
    1
    • jsulmJ jsulm

      @Mark81 said in Recommended way to deploy/install Qt6 shared libraries:

      this would just copy the required files, right?

      Yes.
      The thing with Linux is that there are many different distributions, in different versions with different package managers. So, there is no "one fits all" solution for Linux. For example: for Debian based Distributions you would create a Debian (deb) package where you also define the dependencies and where to install what. For RedHat/Fedora based distributions you would create a RPM package.
      Since you want to support Ubuntu 20.04 you should take a look at how to create Debian packages.

      M Offline
      M Offline
      Mark81
      wrote on last edited by
      #8

      @jsulm I understand that, but why there is no way to invoke the Qt Installer from command line? I works perfectly on a Desktop environment... so it can also download and build the selected modules in a server environment.

      Building from sources requires several GB of spaces, tons of packages, lot of hours and headaches for something that the installer does every time with no pain...

      jsulmJ 1 Reply Last reply
      0
      • M Mark81

        @jsulm I understand that, but why there is no way to invoke the Qt Installer from command line? I works perfectly on a Desktop environment... so it can also download and build the selected modules in a server environment.

        Building from sources requires several GB of spaces, tons of packages, lot of hours and headaches for something that the installer does every time with no pain...

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #9

        @Mark81 Why do you need to build anything on the target machine?
        Why not build your app on the developer machine, create installer or Debian package and distribute it then?

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

        M 1 Reply Last reply
        0
        • jsulmJ jsulm

          @Mark81 Why do you need to build anything on the target machine?
          Why not build your app on the developer machine, create installer or Debian package and distribute it then?

          M Offline
          M Offline
          Mark81
          wrote on last edited by Mark81
          #10

          @jsulm Because as I said the target machine does not run the X server. So when developing I need to debug the remote application while it runs with eglfs. Furthermore in this project the screen is vertical, so it would be very tricky to develop locally...

          Another example: for another project (always with Ubuntu Server 20.04) the target machine is connected to the field (Modbus, OPC-UA and Ethernet). I can't really debug the console application locally, I have to run and debug it on the target otherwise I cannot receive the data from the field.

          jsulmJ 1 Reply Last reply
          0
          • M Mark81

            @jsulm Because as I said the target machine does not run the X server. So when developing I need to debug the remote application while it runs with eglfs. Furthermore in this project the screen is vertical, so it would be very tricky to develop locally...

            Another example: for another project (always with Ubuntu Server 20.04) the target machine is connected to the field (Modbus, OPC-UA and Ethernet). I can't really debug the console application locally, I have to run and debug it on the target otherwise I cannot receive the data from the field.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #11

            @Mark81 You don't have to build on target machine to do remote debugging. Build on your developer machine, copy the binary to the target machine and debug remotely.

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

            M 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Mark81 You don't have to build on target machine to do remote debugging. Build on your developer machine, copy the binary to the target machine and debug remotely.

              M Offline
              M Offline
              Mark81
              wrote on last edited by
              #12

              @jsulm the problem is it does not deploy the libraries! And without the libraries of course it cannot run.
              I meant build the Qt6 libraries, not my application.

              jsulmJ 1 Reply Last reply
              0
              • M Mark81

                @jsulm the problem is it does not deploy the libraries! And without the libraries of course it cannot run.
                I meant build the Qt6 libraries, not my application.

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by jsulm
                #13

                @Mark81 Simply deploy the libraries once from host to the target...

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

                M 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @Mark81 Simply deploy the libraries once from host to the target...

                  M Offline
                  M Offline
                  Mark81
                  wrote on last edited by
                  #14

                  @jsulm I wrote this suggestion in my own question :-)
                  But it does work for console application only.

                  I guess it is because the libraries on the dev machines are built (from the online installed) against x11, while the target machine requires eglfs. I tried to explore the online installer items but I didn't find anything that allows me to select eglfs. I guess it detects the platform automatically when it runs. From here the request to run it without X.

                  jsulmJ 1 Reply Last reply
                  0
                  • M Mark81

                    @jsulm I wrote this suggestion in my own question :-)
                    But it does work for console application only.

                    I guess it is because the libraries on the dev machines are built (from the online installed) against x11, while the target machine requires eglfs. I tried to explore the online installer items but I didn't find anything that allows me to select eglfs. I guess it detects the platform automatically when it runs. From here the request to run it without X.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #15

                    @Mark81 said in Recommended way to deploy/install Qt6 shared libraries:

                    But it does work for console application only.

                    It should work if you also deploy eglfs platform plug-in.

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

                    M 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @Mark81 said in Recommended way to deploy/install Qt6 shared libraries:

                      But it does work for console application only.

                      It should work if you also deploy eglfs platform plug-in.

                      M Offline
                      M Offline
                      Mark81
                      wrote on last edited by Mark81
                      #16

                      @jsulm so far I tried to build a simple QtWidget "Hello world" application on my dev machine.
                      Then I copied it to the target with this structure:

                      $ tree
                      .
                      ├── test_qt6
                      │   └── bin
                      │   ├── test_qt6
                      │   └── platforms
                      │   └── libqeglfs.so
                      ├── qt6_libs
                      │ ├── libicudata.so
                      │ ├── libicudata.so.56
                      │ ├──libicudata.so.56.1
                      │ ├──libicui18n.so
                      │ ├──libicui18n.so.56
                      │ ├──libicui18n.so.56.1
                      │ ├──

                      but running the application with:

                      LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/qt6_libs /home/user/test_qt6/bin/./test_qt6 -platform eglfs
                      

                      it still searches for x11:

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

                      ps. sorry but the editor loses the indentation. The platform plugin file is actually inside the platforms directory

                      UPDATE

                      I tried to copy the missing library, now ldd finds all.
                      But still does not run:

                      EGLFS: Failed to open /dev/fb0
                      EGLFS: Can't continue without a display

                      I'm working to check the permissions.... fixed.

                      $ export QT_QPA_PLATFORM=eglfs
                      $ export QT_QPA_EGLFS_FB=/dev/fb0
                      $ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/qt6_libs ./test_qt6 -platform eglfs
                      Could not initialize egl display
                      Aborted (core dumped)
                      
                      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