Re: Change to gmodule
- From: Joel Becker <jlbec evilplan org>
- To: Tim Janik <timj gtk org>
- Cc: Padraig O'Briain <Padraig Obriain Sun COM>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Change to gmodule
- Date: Mon, 28 May 2001 22:20:43 +0100
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
--
Life's Little Instruction Book #43
"Never give up on somebody. Miracles happen every day."
http://www.jlbec.org/
jlbec evilplan org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]