Dale, read the mail and go look at the code again.
> On Tue, Dec 29, 2009 at 06:03:48PM +0100, Toni Mueller wrote:
> > Hi,
> >
> > I've just seen a program fail to work, saying that it can't load a
> > shared library (but a different one on each invocation - this is an SMP
> > machine). Then I found out that /usr/local/lib was not part of the
> > scanned directories. Looking into
> >
> > http://www.openbsd.org/cgi-bin/cvsweb/src/libexec/ld.so/ldconfig/library.c?rev=1.2;content-type=text%2Fplain
> >
> > I see this:
> >
> > #define DEFAULT_PATH "/usr/lib:/usr/X11R6/lib:/usr/local/qte/lib"
> >
>
> shlib.c:#define STANDARD_SEARCH_DIRS "/usr/lib"
>
> is the define you are really looking for.
>
> The DEFAULT_PATH is part of the never really used 'prebind' system,
> much like prelink on linux. Why qte is there is probably a good question,
> perhaps it slipped in when I was originally developing the prebind code.
> Around that time I had been playing with Qt.
>
> The system normally adds additional search paths that can be displayed
> using:
> ldconfig -r | head -2
>
> These paths are added with the 'shlib_dirs' variable that is set in /etc/rc,
> /etc/rc.conf and potentially /etc/rc.conf.local.
>
> > (the man page didn't tell me what the default paths were)
> >
> > It would be nice if someone could enlighten me about why there's a
> > provision for Qt, and why /usr/local/lib is not part of the default
> > path.
> >
>
> The tool only uses /usr/lib to be as conservative as possible, it allows the
> user (or startup environment) to control the addition of other directories.
>
>
> However this does not explain the original problem you were having, I
> would suggest running the application with 'LD_DEBUG' environment set
> eg: LD_DEBUG='' a.out [args]
>
> This will cause the dynamic linker to be verbose about it's actions.
>
> >
> > TIA!
> >
> >
> > Kind regards,
> > --Toni++
> >
> Dale Rahn dr...@dalerahn.com