X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 19 Mar 2009 11:27:41 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: [1.7] /usr/bin no longer in default LD_LIBRARY_PATH Message-ID: <20090319102741.GA26397@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <49C210EA DOT 8080204 AT users DOT sourceforge DOT net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49C210EA.8080204@users.sourceforge.net> User-Agent: Mutt/1.5.19 (2009-02-20) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/