Results 1 to 12 of 12

Thread: Linker warning: libz.so.1 not found

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    8
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    3

    Default Re: Linker warning: libz.so.1 not found

    With some help on the openSuse form. I seem to have found a solution to my problem, but it looks like it was my mis-use of QtCreator that was the problem.

    I added the following lines to my .pro file, after which a call to qmake and gmake did the trick.

    Qt Code:
    1. QT += sql
    2. LIBS += -lz -ldl -lrt -lglib-2.0 -lpcre
    To copy to clipboard, switch view to plain text mode 

    I am surprised I had to explicitly add the -lz -ldl -lrt -lglib-2.0 -lpcre to my .pro file.

    Can anyone explain why it is necessary to specifically link to these libraries which are already in the path.

    Perhaps the fact that I didn't initially specify QT += sql caused this.

    Anyway, hope this helps if anyone else stumbles across the same problem in the future.

    Cheers,

    Craig

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Linker warning: libz.so.1 not found

    Quote Originally Posted by CraigD View Post
    I am surprised I had to explicitly add the -lz -ldl -lrt -lglib-2.0 -lpcre to my .pro file.
    You shouldn't need to do that unless you are using static libraries.

    Can anyone explain why it is necessary to specifically link to these libraries which are already in the path.
    It's not necessary.

    Perhaps the fact that I didn't initially specify QT += sql caused this.
    That's very unlikely.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2013
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Linker warning: libz.so.1 not found

    Hello Craig,

    I ran exactly into the same problem like you and like you I use openSUSE 12.2. But I do not try to build Qt software, I tried to build the media center software XBMC. I get the same errors like you, the linker cannot find libraried, although they are installed on the system.

    I get errors like this:

    Qt Code:
    1. /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld:
    2. warning: libm.so.6, needed by /usr/lib64/libpython2.7.so, not found (try
    3. using -rpath or -rpath-link)
    To copy to clipboard, switch view to plain text mode 

    Actually libm.so.6 is there. My guess was the linker in openSUSE is broken. But, the amazing thing is, other folks can build XBMC on openSUSE 12.2, so it leaves me totally clueless.

    What would I have to do to adapt your solution to my problem? Actually it seems we have the very same problem, only difference you build Qt code and I try to build XBMC.

    addendum
    I have now removed all binutil packages that I do not need, e.g. for ARM, IA64 and so on, I only kept binutils for x86_64 and i386 and suddenly I can build the software now! Can this really be the root of the problem? Does having several binutils on the system make the system weird? All I can say it works now, all I did was to remove unneeded binutils.

    Thanx
    Malte
    Last edited by pinguin74; 26th January 2013 at 00:45.

Similar Threads

  1. Replies: 2
    Last Post: 16th November 2011, 21:26
  2. Warning: No relevant classes found?
    By zgulser in forum Qt Programming
    Replies: 5
    Last Post: 30th September 2010, 00:42
  3. warning
    By mickey in forum Newbie
    Replies: 5
    Last Post: 26th September 2006, 23:38
  4. warning
    By mickey in forum General Programming
    Replies: 1
    Last Post: 20th July 2006, 13:22
  5. Re: Problems using DLL & .so libz
    By yabadabadoo in forum Qt Programming
    Replies: 1
    Last Post: 15th July 2006, 13:02

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.