Michael G Schwern <[EMAIL PROTECTED]> writes:
>On Sat, Mar 27, 2004 at 10:25:24PM +0100, Gerrit P. Haase wrote:
>> LIB is picked up by MakeMaker if it is available in the environment, it causes 
>> failures everytime when LIB contains spaces as it is usually the case in a 
>> default Visual Studio setup.
>> 
>> This is a problem on Cygwin.
>> 
>> Just unset LIB in your Cygwin startup batch or redefine it to s.th. useful in 
>> your .bashrc
>> 
>> This should be fixed in MakeMaker.
>
>What would the fix be?  There's this code in ExtUtils::Liblist::Kid which is,
>I presume, the problem:
>
>    if ($VC and exists $ENV{LIB} and $ENV{LIB}) {
>        push @libpath, split /;/, $ENV{LIB};
>    }
>
>which seems to pretty explicitly want to pull LIB from the environment when
>using Visual C.  

I wonder why. Will investigate next time I boot to WinXP.
Tk still builds with VC with PASTHRU of LIB= suppressed.

>Can something be done to handle the spaces?

Maybe, but as the failing case is where MM does NOT set LIB, so what it
does for spaces for VC is moot.
Also it is the (final) \ that is the problem. VC probably needs it.

>
>Also, since the code is only tripped when $Config{cc} =~ /^cl/i (I presume
>this is Visual C/Studio), how is it true in Cygwin?
It isn't.

MakeMaker doesn't set LIB in Makefile for Cygwin. 
But PASTHRU still passes it through:
 ... LIB="$(LIB)" ...

And Cygwin's make then gets $(LIB) from environment 
so that expands to 
   LIB="...\Somewhere\" 
and passes it to sub-make where when string is next used 
the trailing \ (from the directory path) quotes the '"' and we get a mess. 




Reply via email to