[Gtk-sharp-list] opening libgtk-x11-2.0.so, not by SONAME / library management
Sun, 1 Feb 2004 10:57:52 +0100
I am working on proper Debian packages of Gtk-Sharp and a user recently
run over a problem that is pretty reproducible and should be fixed.
Symptoms: a program fails to open "libgtk-x11-2.0.so"
15298 access("libgtk-x11-2.0.so", F_OK) = -1 ENOENT (No such file or directory)
15298 stat64("libgtk-x11-2.0.so", 0xbf5ff14c) = -1 ENOENT (No such file or directory)
15298 access("libgtk-x11-2.0.so.so", F_OK) = -1 ENOENT (No such file or directory)
15298 stat64("libgtk-x11-2.0.so.so", 0xbf5ff14c) = -1 ENOENT (No such file or directory)
Questions: why is this file used at all? It is only a virtual symlink to
the library which corresponds to the headers/pkgconfig data. The library
must be opened at runtime by using its SONAME:
lrwxr-xr-x 1 root root 25 2003-12-29 23:49 /usr/lib/libgtk-x11-2.0.so.0 -> libgtk-x11-2.0.so.0.200.4
You see, it is .so.0 and not .so. Since the .so file is part of the Gtk
development packages (because of the reasons described above, the well
known Debian policy and shared-lib conventions), it does not exist if
the -dev package is deinstalled and programs must NOT depend on it.
Further, I was shocked (almost literaly) when I saw on the output of
ldd /usr/lib/libgtksharpglue.so | wc -l
That is one of the most chaotic lib namespace management I have ever seen!
I am not a Gtk-Sharp developer but I strongly recommend to cleanup
there, very, very, soon. libgtksharpglue.so should be linked with only most
important libs, and use dlopen to open others, but using their SONAMEs,
not .so, and not using anything listed in .la files since they often
cause the whole system to wreak random havoc.