Re: Change to gmodule



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]