Re: Change to gmodule
- From: Tim Janik <timj gtk org>
- To: Joel Becker <jlbec evilplan org>
- Cc: "Padraig O'Briain" <Padraig Obriain Sun COM>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Change to gmodule
- Date: Tue, 29 May 2001 05:25:34 +0200 (CEST)
On Mon, 28 May 2001, Joel Becker wrote:
> On Mon, May 28, 2001 at 08:24:23PM +0200, Tim Janik wrote:
> > thanks for spotting, should be fixed in CVS now.
>
> On the subject of GModule, the error reporting is *horrible*. I
> have an app using GModule loaded libraries, and any time there is a
> problem the g_module_error() is *always* "Cannot open libtool library".
> Looking at the source, this is because GModule tries various methods to
> open the requested module. It tries dlopen, then reading a libtool
> archive, then appending .so and trying dlopen(), then appending .la and
> trying libtool again. My module had a missing symbol, so dlopen()
> failed. However, the g_module_error() with the dlerr was immediately
> overwritten by the subsequent tries with libtool-style parsing. I
> eventually had to instrument gmodule-dl.c and recompile/install glib to
> get a meaningful error message.
> Tim, I'm not sure how you want to handle this. The fallback
> methods make sense, but they shouldn't squash the original error. Maybe
> keep the *first* error, not the last? What do you think?
joel, this is exactly the situation that my first patch adressed.
we only do dlopen() _once_ now and preserve the error, choosing the
correct method for loading is done before dlopen() now, based on access().
>
> Joel
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]