Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved linuxdeployqt copies default (old) libraries instead of new ones

    Installation and Deployment
    2
    4
    220
    Loading More Posts
    • 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.
    • D
      dvd93 last edited by

      Hi, I'm trying to deploy an app with linuxdeployqt making an AppImage. I've successfully done that in Ubuntu 16.04 and 20.04, but since my app has to run on CentOS 7 (the ones created in Ubuntu don't start) I'm now trying to do the same things I did in Ubuntu on CentOS 7.9.
      The problem I'm facing is that linuxdeployqt copies the Qt libraries from the /usr/lib64 folder (they are from version 5.9.7 preinstalled) instead of copying them from the Qt/5.15.2/gcc_64/bin folder:

      Log: Checking rpath in "/home/davide/Desktop/Deploy/lib/libQt5Gui.so.5"
      Log: Changing rpath in "/home/davide/Desktop/Deploy/lib/libQt5Gui.so.5" to "$ORIGIN"
      Log: Setting deploymentInfo.qtPath to: "/usr/lib64/"
      Log:  copied: "/usr/lib64/libQt5Core.so.5"
      Log:  to "/home/davide/Desktop/Deploy/lib//libQt5Core.so.5"
      

      If then I try to run the AppImage i get this:

      [davide@localhost Deploy]$ ./APP_NAME.AppImage 
      ./APP_NAME.AppImage: /tmp/.mount_APP_uw1ysE/lib/libQt5Core.so.5: version `Qt_5.15' not found (required by ./APP_NAME.AppImage)
      

      because the library copied is the one bundled with the system:

      [davide@localhost Deploy]$ /home/davide/Desktop/Deploy/lib/libQt5Core.so.5 
      This is the QtCore library version Qt 5.9.7 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 4.8.5 20150623 (Red Hat 4.8.5-44))
      

      qmake points to the correct version (I added its path to $PATH):

      [davide@localhost Deploy]$ qmake -v
      QMake version 3.1
      Using Qt version 5.15.2 in /home/davide/Qt/5.15.2/gcc_64/lib
      

      How can I force linuxdeployqt to use the correct libraries?
      Thanks

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

        Try manually passing qmake path to linuxdeployqt with -qmake flag:

        linuxdeployqt -qmake=/home/davide/Qt/5.15.2/gcc_64/bin/qmake
        

        (Z(:^

        1 Reply Last reply Reply Quote 0
        • D
          dvd93 last edited by

          I tried but it still copies the libraries from /usr/lib64

          1 Reply Last reply Reply Quote 0
          • sierdzio
            sierdzio Moderators last edited by

            Run ldd on your binary file (before deployment) to see what it is really linked against.

            (Z(:^

            1 Reply Last reply Reply Quote 2
            • First post
              Last post