I have a newly installed openSuse (12.2) system that I am using for development. There seems to be something messed up with my GCC build chain as I have trouble compiling/linking just about everything. As a specific example, I’ve tried to build a small Qt project and get linker errors complaining about missing libraries that are clearly there.
For example, when I attempt to build my application (which I’ve compile without troubles on the openSuse (also 12.2) install on my laptop ) I get the following linker errors:
/usr/.../bin/ld: warning: libglib-2.0.so.0, needed by /usr/lib64/libQtGui.so, not found (try using -rpath or -rpath-link) /usr/.../x86_64-suse-linux/bin/ld: warning: libpng14.so.14, needed by /usr/lib64/libQtGui.so, not found (try using -rpath or -rpath-link) etc.
The library libglib-2.0.so.0 is present on my system and is in a directory that according to my ld.conf file should be found.
When I ran ldd on libQtGui.so I got the following listing:
/usr/lib64> ldd libQtGui.so.4.8 linux-vdso.so.1 (0x00007fff70a00000) libQtCore.so.4 => /usr/lib64/libQtCore.so.4 (0x00007fe1414e0000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe1412c0000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fe140fc8000) libpng14.so.14 => /usr/lib64/libpng14.so.14 (0x00007fe140d98000)
I verified that libglig-2.0.so.0 is indeed located at /usr/lib64/.
I’ve installed all the Qt libraries, etc. through Yast or Zypper.
Any ideas on how to correct this problem. I was able to get simple non-Gui Qt apps to compile by directly adding specific flags to the linker (eg -lglib) but this is a big hassle and this should work without such flags (as it does on my laptop). I would be adding a dozen or more linker flags even for the simplest GUI application.
Anyway, any ideas on what might be causing this problem would be greatly appreciated.