small fix for Windows build

Started by Peter Eisentrautabout 15 years ago4 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

My not yet complete attempt at doing a Windows build produces several of
these warnings during the build phase:

Hash %ENV missing the % in argument 1 of each() at -e line 1.

I believe the attached patch is the fix for that.

Attachments:

windows-perl-fix.patchtext/x-patch; charset=UTF-8; name=windows-perl-fix.patchDownload+4-4
#2Andrew Dunstan
andrew@dunslane.net
In reply to: Peter Eisentraut (#1)
Re: small fix for Windows build

On 04/04/2011 04:41 PM, Peter Eisentraut wrote:

My not yet complete attempt at doing a Windows build produces several of
these warnings during the build phase:

Hash %ENV missing the % in argument 1 of each() at -e line 1.

I believe the attached patch is the fix for that.

I am not seeing any such errors on currawong or mastodon. So I'm not
sure what you're doing that's causing you to get the errors, or if your
platform is different. But I think we need to get to the bottom of it
before changing something that's working.

cheers

andrew

#3Magnus Hagander
magnus@hagander.net
In reply to: Andrew Dunstan (#2)
Re: small fix for Windows build

On Mon, Apr 4, 2011 at 23:08, Andrew Dunstan <andrew@dunslane.net> wrote:

On 04/04/2011 04:41 PM, Peter Eisentraut wrote:

My not yet complete attempt at doing a Windows build produces several of
these warnings during the build phase:

    Hash %ENV missing the % in argument 1 of each() at -e line 1.

I believe the attached patch is the fix for that.

I am not seeing any such errors on currawong or mastodon. So I'm not sure
what you're doing that's causing you to get the errors, or if your platform
is different. But I think we need to get to the bottom of it before changing
something that's working.

+1.

Are you perhaps running this under some non-standard shell? Or maybe
we've hit another windows version incompatibility - what version of
Windows are you seeing this on?

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Andrew Dunstan (#2)
Re: small fix for Windows build

On mån, 2011-04-04 at 17:08 -0400, Andrew Dunstan wrote:

On 04/04/2011 04:41 PM, Peter Eisentraut wrote:

My not yet complete attempt at doing a Windows build produces several of
these warnings during the build phase:

Hash %ENV missing the % in argument 1 of each() at -e line 1.

I believe the attached patch is the fix for that.

I am not seeing any such errors on currawong or mastodon. So I'm not
sure what you're doing that's causing you to get the errors, or if your
platform is different. But I think we need to get to the bottom of it
before changing something that's working.

My Perl installation is 5.12, which is the latest from ActiveState.
According to <http://dev.perl.org/perl5/news/2010/perl-5.12.0.html&gt;,
"Perl now warns the user about the use of deprecated features by
default." (I also see a bunch of other warnings, btw.)

The code in question is

perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each %ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat

The % is apparently interpolated, and I guess that since there is no bat
variable %ENV, it just removes the % and effectively executes

perl -e "require 'src/tools/msvc/buildenv.pl'; while(($k,$v) = each ENV) { print qq[\@SET $k=$v\n]; }" > bldenv.bat

which will draw a warning when run with -w in any recent Perl version.

If you replace the % by %%, one % will remain in the final command.

I suggest that someone who is more fluent with the Windows build either
run the whole build with Perl 5.12, or with Perl 5.10 plus warnings, and
clean it up. In the future, this stuff might break.