delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/27/09:30:56

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-ID: <4C77BE03.7090603@dronecode.org.uk>
Date: Fri, 27 Aug 2010 14:30:43 +0100
From: Jon TURNEY <jon DOT turney AT dronecode DOT org DOT uk>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: problem with PATH set by libtool for uninstalled pixman library
References: <4C5075E3 DOT 9020903 AT dronecode DOT org DOT uk> <4C5139CD DOT 3010702 AT cwilson DOT fastmail DOT fm>
In-Reply-To: <4C5139CD.3010702@cwilson.fastmail.fm>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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 29/07/2010 09:20, Charles Wilson wrote:
> On 7/28/2010 2:24 PM, Jon TURNEY wrote:
>>
>> I have a tinderbox which does daily builds of the X.Org stack for
>> cygwin, and I've come across a something I don't understand with the way
>> libtool is working when building the pixman library, and I hope someone
>> can shed a bit of light.
>
>
>> (lt_update_lib_path) modifying 'PATH' by prepending
>> '/opt/jhbuild/build/pixman/pixman/.libs:'
>> (lt_setenv) setting 'PATH' to
>> '/opt/jhbuild/build/pixman/pixman/.libs:/home/jon/bin:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0/:/bin'
>>
>> (lt_update_exe_path) modifying 'PATH' by prepending
>> '/opt/jhbuild/install/lib:/opt/jhbuild/install/bin:/opt/jhbuild/build/pixman/pixman/.libs:'
>>
>> (lt_setenv) setting 'PATH' to
>> '/opt/jhbuild/install/lib:/opt/jhbuild/install/bin:/opt/jhbuild/build/pixman/pixman/.libs:/opt/jhbuild/build/pixman/pixman/.libs:/home/jon/bin:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0/:/bin'
>
> This is because the wrapper prepends the rpath onto $$LIB_PATH_VARNAME,
> and prepends the dllsearchpath onto $$EXE_PATH_VARNAME.
>
> But, since LIB_PATH_VARNAME==EXE_PATH_VARNAME on cygwin (both are
> "PATH") that's basically saying:
>
> PATH=$rpath:${PATH}
> PATH=$dllsearchpath:${PATH}
>
> I think it was a deliberate choice (e.g. on linux) for the wrapper to
> add the $rpath to $LD_RUN_PATH, but...it's not such a great idea for win32.
>
> This is a case where the wrapper exe was trying to do exactly what the
> wrapper script used to do -- without considering whether the wrapper
> script was doing the right thing, for this platform.
>
> I think a patch to simply swap the order of these two assignments would
> be fine (e.g. do $dllsearchpath first, then make sure it gets pre-empted
> by $rpath). On *nix it wouldn't matter, since the two variables are
> DISTINCT vars.

Okay, thanks very much for the explanation.  This clarifies for me that this 
is a bug or platform quirk with libtool, and not something that pixman is 
doing wrong, so I can stick with the workaround I have for the moment.

I don't think I'm feeling brave enough at the moment to look at the libtool 
source:-)

>> As you can see, the install path appears before .libs in the PATH the
>> libtool wrapper constructs, so the installed version from a previous
>> build is used, rather than the uninstalled version we want to test.
>>
>> I'm not quite clear why the install path is being added at all, I don't
>> think libpixman has any dependencies which it needs to find there (at
>> least in the cygwin build)
>
> But libtool doesn't know that, at that particular point in the code.

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

- Raw text -


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