Hello,
I am attempting to write a small console app in QtCreator on openSuse Linux 12.2 (using the version provided by the distro 2.5.0). The application simply
connects to a small SQLite database and reads some data from a table.
Compiling works fine, but when it tries to link I get errors along the following lines:
/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)
/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)
/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)
/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)
/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)
/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)
/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)
/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:
> ls /lib64/libz*
/lib64/libz.so.1 /lib64/libz.so.1.2.7
> ls /lib64/libz*
/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:
usr/local/lib64
/usr/local/lib
include /etc/ld.so.conf.d/*.conf
# /lib64, /lib, /usr/lib64 and /usr/lib gets added
# automatically by ldconfig after parsing this file.
# So, they do not need to be listed.
usr/local/lib64
/usr/local/lib
include /etc/ld.so.conf.d/*.conf
# /lib64, /lib, /usr/lib64 and /usr/lib gets added
# automatically by ldconfig after parsing this file.
# So, they do not need to be listed.
To copy to clipboard, switch view to plain text mode
Thanks for any ideas on what the problem might be.
Cheers,
Craig
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.
Bookmarks