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. How to compile using Ubuntu 18 repo libraries only
Qt 6.11 is out! See what's new in the release blog

How to compile using Ubuntu 18 repo libraries only

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 2 Posters 993 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.
  • ocgltdO Offline
    ocgltdO Offline
    ocgltd
    wrote on last edited by
    #1

    I have installed Qt Creator on Ubuntu 18, and compiled my app against Qt 5.9.8 which I installed with Qt Creator.

    I copied my executable to another Ubuntu 18 box, and added the Qt5* libraries from the default repo. And I confirmed the libraries are version 5.9.8

    However, when I run my program I get error:

    relocation error: ./myapp: symbol _ZdlPvm version Qt_5 not defined in file libQt5Core.so.5 with link time reference
    

    From what I read online there is some kind of mismatch in the libraries. So, I built another Ubuntu 18 VM where I would like to recompile my app. This time I won't install Qt Creator, I just want to add the Qt5 libraries from the "Default" repo. But I can't figure out what to add.

    Which Ubuntu libraries/tools do I need to install to compile my app?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #4

      build-essential and qtbase5-dev should get you started.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      ocgltdO 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        Which modules are you using ?

        You can start with qtbase5-dev and add all the modules you use with corresponding packages.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • ocgltdO Offline
          ocgltdO Offline
          ocgltd
          wrote on last edited by
          #3

          According to ldd my app needs:

                 linux-vdso.so.1 (0x00007ffd3fbf7000)
                 libQt5Network.so.5 => /opt/Qt/5.9.9/gcc_64/lib/libQt5Network.so.5 (0x00007fed62674000)
                 libQt5Sql.so.5 => /opt/Qt/5.9.9/gcc_64/lib/libQt5Sql.so.5 (0x00007fed6242d000)
                 libQt5Core.so.5 => /opt/Qt/5.9.9/gcc_64/lib/libQt5Core.so.5 (0x00007fed61ce6000)
                 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fed61ac7000)
                 libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fed6173e000)
                 libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fed61526000)
                 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fed61135000)
                 libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fed60f18000)
                 libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fed60b7a000)
                 libicui18n.so.56 => /opt/Qt/5.9.9/gcc_64/lib/libicui18n.so.56 (0x00007fed606e1000)
                 libicuuc.so.56 => /opt/Qt/5.9.9/gcc_64/lib/libicuuc.so.56 (0x00007fed60329000)
                 libicudata.so.56 => /opt/Qt/5.9.9/gcc_64/lib/libicudata.so.56 (0x00007fed5e946000)
                 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fed5e742000)
                 libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007fed5e540000)
                 libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fed5e229000)
                 /lib64/ld-linux-x86-64.so.2 (0x00007fed62a06000)
                 libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fed5dfb7000)
          

          I grabbed the above from a different system, but hopefully that answers question. Under centOS I found instructions for adding all compiler tools in one step, and Qt packages. But can't find anything similar for Ubuntu

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #4

            build-essential and qtbase5-dev should get you started.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            ocgltdO 1 Reply Last reply
            0
            • SGaistS SGaist

              build-essential and qtbase5-dev should get you started.

              ocgltdO Offline
              ocgltdO Offline
              ocgltd
              wrote on last edited by ocgltd
              #5

              @SGaist said in How to compile using Ubuntu 18 repo libraries only:
              I added the above packages plus qt5-default and I was able to compile. I also moved my old Qt (installed from Qt Creator) from /opt/Qt to /tmp/Qt so there would be no conflict.

              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