Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 101132
Status: resolved
Worked: 30 min
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: ETJ [...] cpan.org
Requestors: sisyphus [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 7.05_05



Subject: [Win32] gmake needs SHELL to be specified.
Hi, Perl-5.21.7 (current blead) can be built using gmake and gcc, courtesy of this GNUmakefile: https://gist.github.com/kmx/b5805847b6485c5c3a65 However, when building modules, if there's a sh.exe somewhere in the path (eg Cygwin or msys) gmake tries to run in that shell instead of the desired cmd.exe shell - which, of course, fails. This seems to be a gmake feature - kmx dug up the following link which provides pertinent info: https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html Basically we just need the generated Makefile to specify 'SHELL = cmd.exe' (or whatever the native shell, as specified by $ENV{COMSPEC}, happens to be). The following patch to MM_Unix.pm worked fine for me: ############################# --- MM_Unix.pm_orig 2014-12-25 23:52:56 +1100 +++ MM_Unix.pm 2014-12-25 23:57:19 +1100 @@ -332,6 +332,16 @@ # They may have been overridden via Makefile.PL or on the command line. END + my @pre; + if($^O eq 'MSWin32') { + @pre = <<"END"; + +SHELL = $ENV{COMSPEC} +END + } + + unshift @m, @pre; + my(%once_only); foreach my $key (@{$self->{CONFIG}}){ # SITE*EXP macros are defined in &constants; avoid duplicates here ############################# That patch also specifies the SHELL setting for 'dmake' and 'nmake'. Neither of those needs that setting - but neither of them suffers if the setting is made. You could exclude them if you want. However, I don't think we should assume that the Windows GNU Make utility will be named 'gmake'. Minw.org compilers already ship with a GNU Make utility named 'mingw32-make' and, faik, there may be other GNU Make utilities for Windows with different names, too. Cheers, Rob
Thanks for the report. Could you instead make a patch that changes MM_Win32, and is conditional on $self->is_make_type('gmake'), since that seems like a more obvious place for this to go?
On Thu Dec 25 20:15:23 2014, ETJ wrote: Show quoted text
> Thanks for the report. Could you instead make a patch that changes > MM_Win32, and is conditional on $self->is_make_type('gmake'), since > that seems like a more obvious place for this to go?
Ok - I'll have a crack at that when I get the time and energy. (Hopefully, someone else will beat me to it :-) The addition of the $self->is_make_type('gmake') condition is fine by me, btw. Cheers, Rob
Subject: Re: [rt.cpan.org #101132] [Win32] gmake needs SHELL to be specified.
Date: Tue, 30 Dec 2014 12:56:58 +1100
To: <bug-ExtUtils-MakeMaker [...] rt.cpan.org>, <sisyphus [...] cpan.org>
From: <sisyphus1 [...] optusnet.com.au>
Show quoted text
-----Original Message----- From: Ed J via RT <URL: https://rt.cpan.org/Ticket/Display.html?id=101132 >
> Could you instead make a patch that changes MM_Win32, and is conditional > on $self->is_make_type('gmake')
Attached. (Feel free to modify.) This patch allows for other systems to specify the shell, should such a need ever arise. (Probably unlikely.) Alternatively we could copy sub const_config() from MM_Unix.pm to MM_Win32.pm and then make the necessary modifications to MM_Win32::const_config(). This would leave MM_Unix.pm completely unchanged, but it creates duplication and if MM_Unix::const_config() ever needs modifying then the chances are that MM_Win32::const_config() would need the same modification - which is probably the sort of tedium that EU::MM is trying to avoid. Anyway, let me know if you would prefer that alternative patch and I'll send it over. Cheers, Rob

Message body is not shown because sender requested not to inline it.

Please try the dev release and see if it works!
According to the closing message, the patch was added to 7.05_05. But it's nowhere to be seen in 7.10 - and hence my re-opening of this ticket. Where the hell did it go ? Cheers, Rob
Resolving - fixed as of perl-5.23.8.