libtool
[Top][All Lists]
Advanced

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

Re: libltdl obscures error messages


From: Gary V . Vaughan
Subject: Re: libltdl obscures error messages
Date: Fri, 27 Jul 2001 20:24:29 +0100

On Thursday 26 July 2001 7:03 pm, Marius Vollmer wrote:
> Gary V.Vaughan <address@hidden> writes:
> > On Tuesday 24 July 2001 9:51 pm, Marius Vollmer wrote:
> > > The fix would be to distinguish between "file not found" errors (which
> > > can be repaired by trying the next candidate), and other errors (which
> > > should be immediately passed to the caller).
> >
> > That sounds like a good plan to me.
>
> ...extend the internal error reporting of
> tryall_dlopen and (an internal version of) lt_dlopen to reliably flag
> file-not-found errors, and react to them appropriately.
>
> My man page about dlopen does not mention ENOENT or other relible ways
> to tell that it failed due to file-not-found, although some
> experiments seem to indicate that dlopen does indeed set errno to
> ENOENT.  Whether that's only by accident, I don't know.

It's possible that this is deliberate behaviour for your system, but we 
certainly can't rely on all platforms being so accomodating.

> What about the other backends?

They tend to be more specific to one (or a very small number of) platform(s), 
so it might be easier to identify a reliable file-not-found metric. 

WHat about having lt_dlinit() deiberately try to load a non-existent file 
directly through each active loader, and storing the error message the system 
returns?  Subsequent calls to lt_dlopen then have a reference error to 
compare against...

Cheers,
        Gary.
-- 
  ())_. Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/  Research Scientist  http://www.oranda.demon.co.uk       ,_())____
  / )=  GNU Hacker          http://www.gnu.org/software/libtool  \'      `&
`(_~)_  Tech' Author        http://sources.redhat.com/autobook   =`---d__/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]