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. Can't find libQt5Core lib
Forum Updated to NodeBB v4.3 + New Features

Can't find libQt5Core lib

Scheduled Pinned Locked Moved Solved Installation and Deployment
22 Posts 3 Posters 8.9k 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.
  • SGaistS SGaist

    You should run ldd (with LD_LIBRARY_PATH defined) on your application and its dependencies to see where it's currently looking for them.

    R Offline
    R Offline
    r3d9u11
    wrote on last edited by r3d9u11
    #7

    @SGaist

    # export LD_LIBRARY_PATH=/ta512/glib:/ta512/qt5lib
    # /ta512/ta   
    /ta512/ta: error while loading shared libraries: /home/imx6/Desktop/qt5120/sysroot/usr/lib/libz.so: cannot open shared object file: No such file or directory
    # ldd /ta512/ta
    /ta512/ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version `Qt_5' not found (required by /ta512/ta)
    /ta512/ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version `Qt_5_PRIVATE_API' not found (required by /ta512/qt5lib/libQt5Widgets.so.5)
    /ta512/ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version `Qt_5' not found (required by /ta512/qt5lib/libQt5Widgets.so.5)
    /ta512/ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version `Qt_5_PRIVATE_API' not found (required by /ta512/qt5lib/libQt5Gui.so.5)
    /ta512/ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version `Qt_5' not found (required by /ta512/qt5lib/libQt5Gui.so.5)
    /ta512/ta: /ta512/glib/libstdc++.so.6: no version information available (required by /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5)
    /ta512/ta: /ta512/glib/libstdc++.so.6: no version information available (required by /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5)
    /ta512/ta: /ta512/glib/libstdc++.so.6: no version information available (required by /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5)
    /ta512/ta: /ta512/glib/libstdc++.so.6: no version information available (required by /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5)
    /ta512/ta: /ta512/glib/libstdc++.so.6: no version information available (required by /usr/lib/arm-linux-gnueabihf/libicui18n.so.55)
    /ta512/ta: /ta512/glib/libstdc++.so.6: no version information available (required by /usr/lib/arm-linux-gnueabihf/libicui18n.so.55)
    /ta512/ta: /ta512/glib/libstdc++.so.6: no version information available (required by /usr/lib/arm-linux-gnueabihf/libicui18n.so.55)
    /ta512/ta: /ta512/glib/libstdc++.so.6: no version information available (required by /usr/lib/arm-linux-gnueabihf/libicuuc.so.55)
    /ta512/ta: /ta512/glib/libstdc++.so.6: no version information available (required by /usr/lib/arm-linux-gnueabihf/libicuuc.so.55)
    /ta512/ta: /ta512/glib/libstdc++.so.6: no version information available (required by /usr/lib/arm-linux-gnueabihf/libicuuc.so.55)
    /ta512/ta: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by /ta512/glib/libglib-2.0.so.0)
    	linux-vdso.so.1 =>  (0x7ee3e000)
    	libQt5Widgets.so.5 => /ta512/qt5lib/libQt5Widgets.so.5 (0x76a51000)
    	libQt5Gui.so.5 => /ta512/qt5lib/libQt5Gui.so.5 (0x765b0000)
    	libQt5Core.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 (0x7624b000)
    	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76227000)
    	libstdc++.so.6 => /ta512/glib/libstdc++.so.6 (0x760be000)
    	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76045000)
    	libgcc_s.so.1 => /ta512/glib/libgcc_s.so.1 (0x76016000)
    	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x75f2a000)
    	/home/imx6/Desktop/qt5120/sysroot/usr/lib/libz.so => not found
    	libz.so.1 => /ta512/glib/libz.so.1 (0x75efa000)
    	libicui18n.so.55 => /usr/lib/arm-linux-gnueabihf/libicui18n.so.55 (0x75d60000)
    	libicuuc.so.55 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.55 (0x75c42000)
    	libpcre16.so.3 => /usr/lib/arm-linux-gnueabihf/libpcre16.so.3 (0x75bec000)
    	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x75bd9000)
    	libglib-2.0.so.0 => /ta512/glib/libglib-2.0.so.0 (0x75a43000)
    	librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x75a2c000)
    	/lib/ld-linux-armhf.so.3 (0x54ae3000)
    	libicudata.so.55 => /usr/lib/arm-linux-gnueabihf/libicudata.so.55 (0x74165000)
    
    1 Reply Last reply
    0
    • SGaistS SGaist

      You should run ldd (with LD_LIBRARY_PATH defined) on your application and its dependencies to see where it's currently looking for them.

      R Offline
      R Offline
      r3d9u11
      wrote on last edited by r3d9u11
      #8

      @SGaist ok, I recompiled qtbase without glib, and now I return to the topic theme:

      # ls /ta512
      Makefile         libQt5Widgets.so.5  moc_mainwindow.cpp  ta
      libQt5Core.so.5  main.o              moc_mainwindow.o    ta.sh
      libQt5Gui.so.5   mainwindow.o        moc_predefs.h       ui_mainwindow.h
      

      and run:

      # export LD_LIBRARY_PATH=/ta512
      # ./ta
      ./ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version 'Qt_5' not found (required by ./ta)
      ./ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version 'Qt_5_PRIVATE_API' not found (required by /ta512/libQt5Widgets.so.5)
      ./ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version 'Qt_5' not found (required by /ta512/libQt5Widgets.so.5)
      ./ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version 'Qt_5_PRIVATE_API' not found (required by /ta512/libQt5Gui.so.5)
      ./ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version 'Qt_5' not found (required by /ta512/libQt5Gui.so.5)
      # ldd ta
      ./ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version 'Qt_5' not found (required by ./ta)
      ./ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version 'Qt_5_PRIVATE_API' not found (required by /ta512/libQt5Widgets.so.5)
      ./ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version 'Qt_5' not found (required by /ta512/libQt5Widgets.so.5)
      ./ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version 'Qt_5_PRIVATE_API' not found (required by /ta512/libQt5Gui.so.5)
      ./ta: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version 'Qt_5' not found (required by /ta512/libQt5Gui.so.5)
      	linux-vdso.so.1 =>  (0x7ece4000)
      	libQt5Widgets.so.5 => /ta512/libQt5Widgets.so.5 (0x769e1000)
      	libQt5Gui.so.5 => /ta512/libQt5Gui.so.5 (0x76540000)
      	libQt5Core.so.5 => /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 (0x761db000)
      	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x761b7000)
      	libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x760a9000)
      	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76031000)
      	libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76008000)
      	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x75f1c000)
      	libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x75efa000)
      	libicui18n.so.55 => /usr/lib/arm-linux-gnueabihf/libicui18n.so.55 (0x75d61000)
      	libicuuc.so.55 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.55 (0x75c43000)
      	libpcre16.so.3 => /usr/lib/arm-linux-gnueabihf/libpcre16.so.3 (0x75bec000)
      	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x75bd9000)
      	libglib-2.0.so.0 => /lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0x75b01000)
      	librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x75aeb000)
      	/lib/ld-linux-armhf.so.3 (0x54b87000)
      	libicudata.so.55 => /usr/lib/arm-linux-gnueabihf/libicudata.so.55 (0x74224000)
      	libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0x741c6000)
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #9

        You are not deploying libQt5Core.so.5 along the other Qt libraries in your ta512 folder.

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

        R 2 Replies Last reply
        0
        • SGaistS SGaist

          You are not deploying libQt5Core.so.5 along the other Qt libraries in your ta512 folder.

          R Offline
          R Offline
          r3d9u11
          wrote on last edited by r3d9u11
          #10

          @SGaist no, I'm deploying only 3 Qt libs in folder /ta512

          1 Reply Last reply
          0
          • SGaistS SGaist

            You are not deploying libQt5Core.so.5 along the other Qt libraries in your ta512 folder.

            R Offline
            R Offline
            r3d9u11
            wrote on last edited by r3d9u11
            #11

            @SGaist ok, I built Qt 5.9.7 with options:

                -verbose                        \
                -nomake tests                   \
                -nomake examples                \
                -no-use-gold-linker             \
                -no-opengl                      \
                -no-dbus                        \
                -no-glib                        \
                -no-icu                         \
                -rpath
            

            and the target Qt application on the embedded device did found the Qt libs, but I've got another exception:

            ./qt_c: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by /ta/libQt5Core.so.5)
            

            sure, version of glib on the target device is 2.23, but Qt was configured without GLIB support. Why Qt still require this library?


            well, as latest results with same cross-compilations process (e.g. same tools, compiler, QtCreator settings, etc):

            • cross-compiled app with Qt 5.12.0 can't find self Qt libraries
            • cross-compiled app with Qt 5.9.7 can find self Qt libraries, but can't work without GLIB < v2.28 (even configured without glib support)
            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #12

              And why are you not deploying the Qt5Core library since you already deploy the others ?

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

              R 1 Reply Last reply
              0
              • SGaistS SGaist

                And why are you not deploying the Qt5Core library since you already deploy the others ?

                R Offline
                R Offline
                r3d9u11
                wrote on last edited by
                #13

                @SGaist as I told before I did copy Qt libs with application to the target embedded device (as you can see the folder /ta512 already contains all needed Qt libs and executable application), also I did set value of LD_LIBRARY_PATH to /ta512 before application has been started.

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

                  That's clear, but from your last test, why only these three libs and not QtCore ?

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

                  R 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    That's clear, but from your last test, why only these three libs and not QtCore ?

                    R Offline
                    R Offline
                    r3d9u11
                    wrote on last edited by
                    #15

                    @SGaist sorry, maybe I don't understand you question right. Does libQt5Core.so.5 (which was already deployed with application to the target device) is not "Qt5Core library"?

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

                      The question is: since you are deploying 3 Qt libraries already, why not the Qt5Core ?

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

                      R 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        The question is: since you are deploying 3 Qt libraries already, why not the Qt5Core ?

                        R Offline
                        R Offline
                        r3d9u11
                        wrote on last edited by r3d9u11
                        #17

                        @SGaist Sorry, but what do you mean under "Qt5Core"? "libQt5Core.so" is a "Qt5Core", isn't it?

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

                          Yes it is.

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

                          R 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            Yes it is.

                            R Offline
                            R Offline
                            r3d9u11
                            wrote on last edited by
                            #19

                            @SGaist because the target application is looking for the libQt5Core.so.5, not for libQt5Core.so

                            howewer I'll try to do copy of all aliases: libQt5Core.so, libQt5Core.so.5 and libQt5Core.so.5.12.0

                            thanks for hint!
                            and happy New Year ;)

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

                              If you want to be sure the loader finds the correct library where you put them, then yes, copy all the aliases up to the library itself.

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

                              R 1 Reply Last reply
                              1
                              • SGaistS SGaist

                                If you want to be sure the loader finds the correct library where you put them, then yes, copy all the aliases up to the library itself.

                                R Offline
                                R Offline
                                r3d9u11
                                wrote on last edited by r3d9u11
                                #21

                                @SGaist I did copy for each needed alias, but nothing changes:

                                # export LD_LIBRARY_PATH=/ta_20190102115904/qt5lib
                                # ls $LD_LIBRARY_PATH
                                libQt5Core.so         libQt5Gui.so         libQt5Widgets.so
                                libQt5Core.so.5       libQt5Gui.so.5       libQt5Widgets.so.5
                                libQt5Core.so.5.12.0  libQt5Gui.so.5.12.0  libQt5Widgets.so.5.12.0
                                # cd /ta_20190102115904
                                # ./qt_c
                                ./qt_c: /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5: version `Qt_5' not found (required by ./qt_c)
                                

                                Ok, I did remove system version:

                                # mv /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.orig
                                # mv /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.5 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.5.orig
                                # mv /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.5.1 /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5.5.1.orig
                                # ./qt_c
                                ./qt_c: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
                                

                                (there is no alias /usr/lib/arm-linux-gnueabihf/libQt5Core.so)
                                All binaries have a right arch, I think:

                                # file qt5lib/libQt5Core.so
                                qt5lib/libQt5Core.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, for GNU/Linux 4.11.0, not stripped
                                # file qt5lib/libQt5Core.so.5
                                qt5lib/libQt5Core.so.5: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, for GNU/Linux 4.11.0, not stripped
                                # file qt5lib/libQt5Core.so.5.12.0
                                qt5lib/libQt5Core.so.5.12.0: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, for GNU/Linux 4.11.0, not stripped
                                # file qt_c
                                qt_c: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, not stripped
                                

                                cross compiled Qt application don't want to use cross-compiled Qt libraries.
                                I don't understand what's wrong :(

                                I'll try to use a previous version of the toolchain

                                1 Reply Last reply
                                0
                                • R Offline
                                  R Offline
                                  r3d9u11
                                  wrote on last edited by
                                  #22

                                  Looks like older compiler solved this topic.

                                  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