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. Does Qt4.7.3 have specific requirement of the glibc version?
QtWS25 Last Chance

Does Qt4.7.3 have specific requirement of the glibc version?

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 3 Posters 11.3k 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.
  • A Offline
    A Offline
    adewang
    wrote on last edited by
    #1

    Hello,

    I am cross-compiling Qt for embedded linux.
    after deployment on the target device, i run the application but get the following errors:
    ./fancybrowser: /lib/libc.so.6: version GLIBC_2.9' not found (required by /home/root/libQtGui.so.4) ./fancybrowser: /lib/libc.so.6: version GLIBC_2.10' not found (required by /home/root/libQtNetwork.so.4)
    ./fancybrowser: /lib/libc.so.6: version `GLIBC_2.9' not found (required by /home/root/libQtCore.so.4)

    after that, i cross-complied a very simple application which can run normally on the target device.
    my target device has a libc.2.5.so, so i think that maybe qt4.7.3 has a requirement on glibc version?

    my qmake.conf:
    @include(../../common/g++.conf)
    include(../../common/linux.conf)
    include(../../common/qws.conf)

    modifications to g++.conf

    QMAKE_CC = i686-pc-linux-gnu-gcc
    QMAKE_CXX = i686-pc-linux-gnu-g++
    QMAKE_LINK = i686-pc-linux-gnu-g++
    QMAKE_LINK_SHLIB = i686-pc-linux-gnu-g++

    QMAKE_INCDIR = /root/CodeSourcery/Sourcery_G++_Lite/i686-pc-linux-gnu/libc/usr/include
    QMAKE_LIBDIR = /root/CodeSourcery/Sourcery_G++_Lite/i686-pc-linux-gnu/libc/usr/lib

    modifications to linux.conf

    QMAKE_AR = i686-pc-linux-gnu-ar cqs
    QMAKE_OBJCOPY = i686-pc-linux-gnu-objcopy
    QMAKE_STRIP = i686-pc-linux-gnu-strip

    load(qt_config)@

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      I'm not sure about a required minimal version of glibc for Qt but you need to ensure that you link against the same version on your host machine as is available on your target board.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • A Offline
        A Offline
        adewang
        wrote on last edited by
        #3

        @
        root@adewang-desktop:~/tmp/qtEmbed/examples/webkit/fancybrowser# ldd fancybrowser
        linux-gate.so.1 => (0x00bc8000)
        libQtWebKit.so.4 => /root/tmp/QtEmbed/lib/libQtWebKit.so.4 (0x00bc9000)
        libQtGui.so.4 => /root/tmp/QtEmbed/lib/libQtGui.so.4 (0x17a39000)
        libQtNetwork.so.4 => /root/tmp/QtEmbed/lib/libQtNetwork.so.4 (0x0034c000)
        libQtCore.so.4 => /root/tmp/QtEmbed/lib/libQtCore.so.4 (0x006e6000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00aa6000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00110000)
        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00206000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0022c000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00418000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00a57000)
        librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x005a3000)
        /lib/ld-linux.so.2 (0x006c9000)
        @
        i have definded
        QMAKE_LIBDIR = /root/CodeSourcery/Sourcery_G++_Lite/i686-pc-linux-gnu/libc/usr/lib
        why does the excutable not linked to those lib in /root/CodeSourcery/Sourcery_G++_Lite/i686-pc-linux-gnu/libc/usr/lib, but still linked to the default libs in /lib/tls/i686/cmov?

        when i build qt, i used the following configure options:
        @./configure -xplatform qws/linux-i686-g++ -embedded x86 -D QT_NO_QWS_MULTIPROCESS
        -prefix /root/tmp/QtEmbed
        -qt-gfx-linuxfb -qt-gfx-vnc
        -no-largefile -exceptions -no-accessibility -no-qt3support -no-sse2 -qt-zlib -no-gif -no-libtiff
        -qt-libpng -no-libmng -qt-libjpeg -no-openssl -no-nis -no-cups -depths 16
        -qt-kbd-linuxinput -nomake demos -nomake examples
        -confirm-license -opensource@

        Edit: Added @ tags [ZapB]

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          ZapB
          wrote on last edited by
          #4

          Well, since you look to be building on an i686 for a different i686 it looks as if something is getting confused and using the wrong toolchain resulting in the wrong glibc (and others) being linked in when you build Qt.

          You need to ensure that i686-pc-linux-gnu-gcc and friends actually get resolved to the compiler that is part of your embedded toolchain rather than your normal system compiler. Hopefully that will be enough to get the toolchain to link to the correct libs. If not, then we may need to look at adjusting the linker search path.

          So try doing:

          @
          which i686-pc-linux-gnu-gcc
          @

          and see if it resolves to the embedded cross compiler. If not, adjust $PATH environment variable so that it does and try re-configuring and rebuilding Qt.

          Nokia Certified Qt Specialist
          Interested in hearing about Qt related work

          1 Reply Last reply
          0
          • A Offline
            A Offline
            adewang
            wrote on last edited by
            #5

            @root@adewang-desktop:/# which i686-pc-linux-gnu-gcc
            /root/CodeSourcery/Sourcery_G++_Lite/bin/i686-pc-linux-gnu-gcc@

            when i install codesourcery, the installer have adjusted $PATH.

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              ZapB
              wrote on last edited by
              #6

              Hmmm, OK then. Here's some more things to check:

              • Look over the output of Qt's configure command to make sure it all looks sane.
              • Look at the output during the Qt build to make sure that looks sane
              • Ensure that it is not just a case of your $LD_LIBRARY_PATH or /etc/ld.so.conf causing ldd to return spurious results.

              Nokia Certified Qt Specialist
              Interested in hearing about Qt related work

              1 Reply Last reply
              0
              • A Offline
                A Offline
                adewang
                wrote on last edited by
                #7

                I think the configure and build of Qt has no problem,
                cause the executable can run normally in the host system.
                I browsed the /etc/ld.so.cong, can not find /lib/tls/i686/cmov.
                how can ldd know to search .so files in that directory?

                1 Reply Last reply
                0
                • Z Offline
                  Z Offline
                  ZapB
                  wrote on last edited by
                  #8

                  Search locations can also be hard-coded into the libs themselves. Google for RPATH to read about it. You can check the dynamic section of the generated lib/binary by doing this for e.g.:

                  @
                  readelf -d libQtCore.so
                  @

                  Nokia Certified Qt Specialist
                  Interested in hearing about Qt related work

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    adewang
                    wrote on last edited by
                    #9

                    @Dynamic section at offset 0x2e2c8c contains 28 entries:
                    Tag Type Name/Value
                    0x00000001 (NEEDED) Shared library: [libpthread.so.0]
                    0x00000001 (NEEDED) Shared library: [libdl.so.2]
                    0x00000001 (NEEDED) Shared library: [librt.so.1]
                    0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
                    0x00000001 (NEEDED) Shared library: [libm.so.6]
                    0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
                    0x00000001 (NEEDED) Shared library: [libc.so.6]
                    0x0000000e (SONAME) Library soname: [libQtCore.so.4]
                    0x0000000f (RPATH) Library rpath: [/root/tmp/QtEmbed/lib]
                    0x0000000c (INIT) 0x42744
                    0x0000000d (FINI) 0x1b99f8
                    0x00000004 (HASH) 0xd4
                    0x00000005 (STRTAB) 0x14a98
                    0x00000006 (SYMTAB) 0x4f98
                    0x0000000a (STRSZ) 135346 (bytes)
                    0x0000000b (SYMENT) 16 (bytes)
                    0x00000003 (PLTGOT) 0x2e4094
                    0x00000002 (PLTRELSZ) 15016 (bytes)
                    0x00000014 (PLTREL) REL
                    0x00000017 (JMPREL) 0x3ec9c
                    0x00000011 (REL) 0x37c6c
                    0x00000012 (RELSZ) 28720 (bytes)
                    0x00000013 (RELENT) 8 (bytes)
                    0x6ffffffe (VERNEED) 0x37aac
                    0x6fffffff (VERNEEDNUM) 7
                    0x6ffffff0 (VERSYM) 0x35b4a
                    0x6ffffffa (RELCOUNT) 1624
                    0x00000000 (NULL) 0x0
                    @

                    No information is related with /lib/tls/i686/cmov

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dangelog
                      wrote on last edited by
                      #10

                      How come that your application is looking for your Qt libraries are under /root/tmp/ and libc under /lib/? Isn't it supposed to pick the libc from the cross-compiler toolchain (i.e. somewhere under /root/CodeSourcery/, I guess)?

                      Software Engineer
                      KDAB (UK) Ltd., a KDAB Group company

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        adewang
                        wrote on last edited by
                        #11

                        Hi peppe,

                        What you observed is just the thing puzzling me.

                        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