[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dlopen question...



Hi all,

I'm having some problems with Evolution... and libglade... and glib
(gmodule) and dlopen.

Here's what I think is going on (and I may be totally off base here too,
feel free to point that out):

Evolution uses libglade for ui elements.  Libglade uses gmodule (from
glib) to look up function names in the symbol table.  gmodule uses
dlopen for this but I suspect it's not getting what it should be getting
from dlopen.

The problem manifests itself, at least with Evolution, when Evolution
tries to use some custom creation functions in libglade.  It complains
"could not find widget creation function" and death and destruction soon
rains down :).

I *think* the reason it can't find these functions is gmodule's
_g_module_self isn't getting the right handle from dlopen when it tries
'dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY)'.

I did notice that FreeBSD patches glib (and glib2) to address something
that looks suspiciously like this issue:
http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/glib12/files/patch-gmodule::gmodule-dl.c

(notice the commit comment).  It obviously doesn't apply for us since
(at last check) we don't have a RTLD_DEFAULT.

So is this an issue for us?  Is there a workaround (aside from compiling
everything -stable)?  Am I making any sense at all?

Marc