Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt doesn't see zlib

qt doesn't see zlib

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 2.9k 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.
  • G Offline
    G Offline
    gamaliel
    wrote on last edited by
    #1

    I am trying to compile qt version 4 on an a machine running ubuntu 12.04. I get the following error messages
    libQtGui.so undefined reference to
    deflateInit2_
    defalte
    deflateEnd
    crc32
    inflate
    inflateInit_
    inflateEnd
    inflateReset
    deflateReset
    This indicates that QT doesn't see zlib. When I tried to install zLib I got a message that it was already installed. I reinstalled it but that didn't fix the problem. QT installations must have been tested in the past so I don't understand what the problem is. I have to use qt4x with the software I'm using.

    the qt installation is qt-x11-opensoruce-src-4.0.1
    the zlib installation is from zlib_1.2.3.4.dfsg

    JonBJ 1 Reply Last reply
    0
    • G gamaliel

      I am trying to compile qt version 4 on an a machine running ubuntu 12.04. I get the following error messages
      libQtGui.so undefined reference to
      deflateInit2_
      defalte
      deflateEnd
      crc32
      inflate
      inflateInit_
      inflateEnd
      inflateReset
      deflateReset
      This indicates that QT doesn't see zlib. When I tried to install zLib I got a message that it was already installed. I reinstalled it but that didn't fix the problem. QT installations must have been tested in the past so I don't understand what the problem is. I have to use qt4x with the software I'm using.

      the qt installation is qt-x11-opensoruce-src-4.0.1
      the zlib installation is from zlib_1.2.3.4.dfsg

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @gamaliel
      Qt4 & Ubuntu 12 are quite old now. I don't know exactly why your installation shows this issue if others did not in the past. If you do not get an exact answer, however, you might want to:

      • run ldd libQtGui.so to discover where it is looking for the missing zlib.so library.
      • locate zlib.so to find where yours is installed.
      • Often doing an ln -s from where it actually is to where Qt is expecting it to be will suffice for you.
      • Or, I think environment variable LD_LIBRARY_PATH is read at start up to determine where to look for shared libraries, you can alter that for your Qt app.

      There's also a way of building a zlib included with Qt4 itself (though see https://stackoverflow.com/questions/10692988/static-qt-4-8-1-build-on-ubuntu-12-04), though I presume you're not wanting to do that.

      G 2 Replies Last reply
      3
      • JonBJ JonB

        @gamaliel
        Qt4 & Ubuntu 12 are quite old now. I don't know exactly why your installation shows this issue if others did not in the past. If you do not get an exact answer, however, you might want to:

        • run ldd libQtGui.so to discover where it is looking for the missing zlib.so library.
        • locate zlib.so to find where yours is installed.
        • Often doing an ln -s from where it actually is to where Qt is expecting it to be will suffice for you.
        • Or, I think environment variable LD_LIBRARY_PATH is read at start up to determine where to look for shared libraries, you can alter that for your Qt app.

        There's also a way of building a zlib included with Qt4 itself (though see https://stackoverflow.com/questions/10692988/static-qt-4-8-1-build-on-ubuntu-12-04), though I presume you're not wanting to do that.

        G Offline
        G Offline
        gamaliel
        wrote on last edited by
        #3

        @JonB I typed ldd libQtGui.so as you suggested. It didn't list zlib. it did list a library called libz.so.1
        linux-vdso.so.1 => (0x00007fffe8c00000)
        libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f1a071f8000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f1a06ec0000)
        libQtCore.so.4 => /usr/lib/x86_64-linux-gnu/libQtCore.so.4 (0x00007f1a069d8000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1a067b8000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1a064b8000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1a061b8000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1a05fa0000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1a05be0000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f1a059c0000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1a057b8000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1a055a0000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f1a052a8000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1a050a0000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f1a07ae8000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f1a04e98000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f1a04c90000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f1a04a50000)

        JonBJ 1 Reply Last reply
        0
        • G gamaliel

          @JonB I typed ldd libQtGui.so as you suggested. It didn't list zlib. it did list a library called libz.so.1
          linux-vdso.so.1 => (0x00007fffe8c00000)
          libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f1a071f8000)
          libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f1a06ec0000)
          libQtCore.so.4 => /usr/lib/x86_64-linux-gnu/libQtCore.so.4 (0x00007f1a069d8000)
          libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1a067b8000)
          libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f1a064b8000)
          libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1a061b8000)
          libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f1a05fa0000)
          libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1a05be0000)
          libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f1a059c0000)
          libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1a057b8000)
          libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1a055a0000)
          libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f1a052a8000)
          librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f1a050a0000)
          /lib64/ld-linux-x86-64.so.2 (0x00007f1a07ae8000)
          libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f1a04e98000)
          libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f1a04c90000)
          libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f1a04a50000)

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @gamaliel

          libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1a055a0000)

          So, you tell me, that looks like it has found zlib, does it not? I do not dispute that your undefined references look like zlib functions, but there seems to be something more to your problem?

          Hmm, I wonder if there is some confusion here. I think I have been thinking about libz. I am unsure whether your zlib is the same thing, though I think it is and it's just a nomenclature issue. You should verify whether these are the same thing, and where you got the statement "This indicates that QT doesn't see zlib" from?

          The only reference I can find is https://mail.python.org/pipermail/python-list/2002-February/155081.html

          "zlib" is the name of a Python module. "zlib.so" is the runtime
          incarnation
          of that module. My guess is that libz.so is a shared library version of
          the
          C "zlib" library. The Python module is essentially just a wrapper around
          the zlib library. On my linux machine ldd shows that zlib.so depends on
          libz.so:

          % ldd zlib.so
                  libz.so.1 => /lib/libz.so.1 (0x40015000)
                  libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0x40024000)
                  libc.so.6 => /lib/libc.so.6 (0x4002c000)
                  /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
          
          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi,

            Why not use the Qt 4 version from your distribution ?

            On a side note, as @JonB already noted, using such an outdated version is a bad idea. If locked on Qt 4, you should at least try to build the last released version which is 4.8.7.

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

            G 1 Reply Last reply
            1
            • JonBJ JonB

              @gamaliel
              Qt4 & Ubuntu 12 are quite old now. I don't know exactly why your installation shows this issue if others did not in the past. If you do not get an exact answer, however, you might want to:

              • run ldd libQtGui.so to discover where it is looking for the missing zlib.so library.
              • locate zlib.so to find where yours is installed.
              • Often doing an ln -s from where it actually is to where Qt is expecting it to be will suffice for you.
              • Or, I think environment variable LD_LIBRARY_PATH is read at start up to determine where to look for shared libraries, you can alter that for your Qt app.

              There's also a way of building a zlib included with Qt4 itself (though see https://stackoverflow.com/questions/10692988/static-qt-4-8-1-build-on-ubuntu-12-04), though I presume you're not wanting to do that.

              G Offline
              G Offline
              gamaliel
              wrote on last edited by
              #6

              @JonB I tried installing a newer 4x version of qt. I installed 4.8.4. Then I tried running openCV which uses qt. I got the error message found unsuitable QT version "" from NOTFOUND, this code requries Qt 4.x

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

                What version of OpenCV are you trying to use ?
                How did you install it ?

                Side question: in what way does that code require Qt 4 ?

                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
                • SGaistS SGaist

                  Hi,

                  Why not use the Qt 4 version from your distribution ?

                  On a side note, as @JonB already noted, using such an outdated version is a bad idea. If locked on Qt 4, you should at least try to build the last released version which is 4.8.7.

                  G Offline
                  G Offline
                  gamaliel
                  wrote on last edited by
                  #8

                  @SGaist I had originally tried a more recent version of qt 4x which was an everywhere installation and it couldn't find the render library. So I tried an earlier version which was compiled for X11 and it didn't complain about that but couldn't find zlib. So then I tried version 4.8.4 and was able to make that. Then I tried to compile openCV and it says that it can't find qt 4x. So now I'm looking for help on opencv forums

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

                    How did you install Qt 4 ?
                    What version of OpenCV are you trying to use ?

                    Side question: why use a 7 years old Ubuntu release ?

                    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

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved