Results 1 to 12 of 12

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

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

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

    Quote Originally Posted by CraigD View Post
    Qt Code:
    1. /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libz.so.1, needed by /usr/lib64/libQtCore.so, not found (try using -rpath or -rpath-link)
    2. /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libdl.so.2, needed by /usr/lib64/libQtCore.so, not found (try using -rpath or -rpath-link)
    3. /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: librt.so.1, needed by /usr/lib64/libQtCore.so, not found (try using -rpath or -rpath-link)
    4. /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libglib-2.0.so.0, needed by /usr/lib64/libQtCore.so, not found (try using -rpath or -rpath-link)
    To copy to clipboard, switch view to plain text mode 


    All the libraries that ld reports as missing are installed and in my ld path. For example:

    Qt Code:
    1. > ls /lib64/libz*
    2. /lib64/libz.so.1 /lib64/libz.so.1.2.7
    To copy to clipboard, switch view to plain text mode 

    According to ldconfig /lib64 is in the ld search path. The contents of ld.so.conf are:

    Qt Code:
    1. usr/local/lib64
    2. /usr/local/lib
    3. include /etc/ld.so.conf.d/*.conf
    4. # /lib64, /lib, /usr/lib64 and /usr/lib gets added
    5. # automatically by ldconfig after parsing this file.
    6. # So, they do not need to be listed.
    To copy to clipboard, switch view to plain text mode 
    Run ldd on those libs that report missing symbols (e.g. /usr/lib64/libQtCore.so) and see if the linker is able to find your libz and others.

    PS. I don't expect an answer to this as it is a bit OT, but since I was curious - does anyone know why the convoluted search path to call ld, and not just /usr/x86_64-suse-linux/bin/ld? This isn't a Qt issue, but seems to be the way the gcc toolchain is setup on openSuse.
    Because you might have more than one set of binutils installed on your machine and the build process wants to make sure it calls the right one (through the use of symbolic links).
    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.


  2. The following user says thank you to wysota for this useful post:

    CraigD (3rd October 2012)

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.