X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 19 Mar 2009 18:54:46 +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: <20090319175446.GA1868@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> <20090319102741 DOT GA26397 AT calimero DOT vinschen DOT de> <49C27968 DOT 90500 AT users DOT sourceforge DOT net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49C27968.90500@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 11:57, Yaakov S wrote: > Corinna Vinschen wrote: > > 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. I spoke nonsense here. See below. > > 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. > > First, it's a huge regression. This breaks *lots* of existing code. > > Now, at risk of stating that which you already know quite well: > > Using /usr/lib as the default LD_LIBRARY_PATH makes sense on *NIX > platforms where the shared libraries are themselves in PREFIX/lib, and > LD_LIBRARY_PATH is used not only by dlopen() but by ld.so for runtime > linking as well. > [...] > How could we proceed? > > We could keep the code as is, but since we install DLLs to /usr/bin and > add it to PATH, we need to add it to LD_LIBRARY_PATH as well. Those who > add /usr/local/bin (or ~/bin) to their PATH will need to add it to their > LD_LIBRARY_PATH also, so you end up with nearly identical PATH and > LD_LIBRARY_PATH values. > > OR we could revert the code to allow searching in PATH as before, since > that's where the DLLs actually reside. The SUSv4 dlopen man page clearly states "If file contains a character, the file argument is used as the pathname for the file. Otherwise, file is used in an implementation-defined manner to yield a pathname." The best match for the implementation-defined manner under Cygwin is probably the DLL search algorithm of Win32. I'll revert that patch in a couple of minutes. Thanks for the report, 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/