delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/19/12:55:15

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 <corinna-cygwin AT cygwin DOT com>
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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <slash> 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019