[Gtk-sharp-list] opening libgtk-x11-2.0.so, not by SONAME / library management

Eduard Bloch edi@gmx.de
Sun, 1 Feb 2004 12:55:23 +0100

Moin Marcel!
Marcel Pol schrieb am Sunday, den 01. February 2004:

> > Symptoms: a program fails to open "libgtk-x11-2.0.so"
> > 
> > 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:
> It helps to change the config of mono (/etc/mono/config), so that it will load

Thanks for the hint, I forgot about that file.

> the library by the SONAME. For the mandrake packages I used a static
> configfile for this, but it would be better to generate this in a dynamic way.
> No idea how to do that though.

I have a simple idea for a workaround, though not a good one... At
build-time, resolve SONAMEs and create a link from $soname to
/usr/lib/libgtk-x11-2.0.so.SHARP, ship this symlink with the package.
And insert this file into the mono config.

How do your lines look like? (Just for interest ;)

> It doesn't work for all cases though, running muine will try to load the glade
> and gconf library through the devel library, and I'm not sure why that is (I

Mh, muine does not work for me at all, it segfaults on invocation (Gnome
crash dialog). And it requests the lib by the name "libmuine", I had to
set the full path in the mono config.

> > ldd /usr/lib/libgtksharpglue.so | wc -l
> > 64
> > 
> > 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.
> Here it is linked with the SONAME's. that's the same for you?

Yes, see the 64 above.

> I was about to post a message about this issue as well. It is easy to package
> the gtk-sharp dll files in seperate packages, but they all depend on the glue
> library. So even if you just use gtk-sharp.dll in a piece of software, it
> still loads glade, gnome libraries, gda, gnome-db, etc, because the glue
> library needs it. Would it be possible to split the glue library in the same
> way as the dll libraries? That would make it possible to have more finegrained
> packaging, without having to install all dependencies for just one app.

Yup, we have the same request, people wish to see more grained
packages, eg. only gda-sharp to use libgda and not install the whole
bunch of Gnome dependencies. Currently, it does not make sence because
whatever you do, the library is hard-linked with every library and
AFAICS won't work if any of them is missing.