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. qt_generate_deploy_app_script fails to deploy necessary libs and platform plugins on Ubuntu 22.04 LTS

qt_generate_deploy_app_script fails to deploy necessary libs and platform plugins on Ubuntu 22.04 LTS

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 401 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.
  • M Offline
    M Offline
    mayart
    wrote on 14 May 2024, 17:09 last edited by
    #1

    Using Cmake, we link against several Qt libraries

                find_package(Qt6 COMPONENTS Widgets 
                                            Core
                                            Gui
                                            Sql
                                            Xml
                                            Network
                                            OpenGL
                                            UiTools
                                            Qml
                                            Quick
                                            QuickWidgets
                                            WebSockets
                                            Multimedia
                                            OpenGLWidgets
                                            REQUIRED)
    target_link_libraries(OurApp ${LIBS}
    							Qt6::Core 
    							Qt6::Gui 
    							Qt6::Widgets 
    							Qt6::Sql 
    							Qt6::Xml 
    							Qt6::Network 
    							Qt6::Qml 
    							Qt6::QuickWidgets  
    							Qt6::WebSockets
    							Qt6::Multimedia)
    

    and we have a distribution macro tailored per-platform, the Linux version using the built-in Cmake-function provided by Qt6

        macro(copy_dlls TARGET_NAME)
            qt_finalize_target(${TARGET_NAME})
            qt_generate_deploy_app_script(
                TARGET ${TARGET_NAME}
                OUTPUT_SCRIPT linuxdeployqt
                NO_UNSUPPORTED_PLATFORM_ERROR
                NO_TRANSLATIONS
            )
            install(TARGETS ${TARGET_NAME}
                RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
            )
            install(SCRIPT ${linuxdeployqt})
        endmacro()
    

    This mostly works except with two critical failures

    • Libraries for Qt Widgets, QuickWidgets, and Xml are not copied.

    • Only Xcb platform plugin is copied, but Ubuntu uses Wayland.

    I cannot find any information on how to select which platform plugins should be used, and have no theory whatsoever why deployment would ignore some libraries (especially a crucial one like Widgets). How do I go about ensuring the right libraries and plugins are included in the deployment?

    1 Reply Last reply
    2
    • M Offline
      M Offline
      mayart
      wrote on 24 Jul 2024, 17:02 last edited by
      #2

      To add to this, I managed to hack around by looping over the Qt libraries we include and copying manually, however with another target the Qt deployment is refusing to copy libicuuc, libicudata, and libicuil8n, all of which come from Qt but we're not linking to directly. How is this deployment supposed to work exactly? Are we just using it completely wrong?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mayart
        wrote on 25 Jul 2024, 14:33 last edited by
        #3

        And again to add as well, the plugins folder for this other target is completely skipped.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          ManThursday
          wrote 22 days ago last edited by
          #4

          Sorry to bump this thread so much later, but did you ever find a solution? I'm running into the same problem.

          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