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. linuxdeployqt copies default (old) libraries instead of new ones

linuxdeployqt copies default (old) libraries instead of new ones

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 418 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.
  • D Offline
    D Offline
    dvd93
    wrote on last edited by
    #1

    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
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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
      0
      • D Offline
        D Offline
        dvd93
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

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

          (Z(:^

          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