This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1.7] /usr/bin no longer in default LD_LIBRARY_PATH


On Mar 19 04:31, Yaakov S wrote:
> With 1.7, dlopen() no longer automatically searches /usr/bin by default.
>  This was definitely not the case with 1.5, but I don't see any mention
> of this in the release notes or ChangeLog.  Am I missing something here?

The default path if LD_LIBRARY_PATH isn't available is not /usr/bin, but
/usr/lib, and that has not changed since 1.5.25.  However, what happens
is this:

If a DLL can't be found in a given PATH, Cygwin 1.5.25's function
searching for the DLL (get_full_path_of_dll) just left the filename
alone.  The following LoadLibrary call then used the default DLL search
order, which includes the $PATH variable, thus a DLL in /usr/bin is
found.

Since July last year, Cygwin 1.7's get_full_path_of_dll function always
converts a filename to a full pathname, even if the file isn't found.
The resulting full pathname is $cwd/filename.  This effectlvely
suppresses the Win32 default DLL search path in LoadLibrary, thus using
either LD_LIBRARY_PATH, or /usr/lib.  From a POSIX perspective it's
wrong to rely on the default Win32 DLL load order in dlopen() and the
behaviour of dlopen() in 1.5.25 was a bug rather than a feature.

Bottom line is, I'm sure the new behaviour is more correct, but if
you have a convincing argument to revert to the old behaviour, I'm
certainly open for discussion.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]