Mon Aug 26 16:36:06 2019: Request 49433 was acted upon.
Transaction: Correspondence added by CORION
Queue: Alien-wxWidgets
Subject: [patch] make (e=2): The system cannot find the file specified.
Broken in: 0.44
Severity: (no value)
Owner: Nobody
Requestors:
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=49433 >
Am Mo 25. Okt 2010, 20:09:40, dandv schrieb:
> On Fri Sep 04 12:33:33 2009, noreply wrote:
> > It wolud be helpful if win32 users were warned if
> >
> > mingw32-make.exe is missing from path
> > make.exe is present in path
> > sh.exe is present in path
>
> Same for cc1.exe - see https://rt.cpan.org/Ticket/Display.html?id=62451
The attached patch works for me on Windows 10, with sh.exe in
C:\Users\Corion\AppData\Local\Temp\sh.exe and
C:\Users\Corion\AppData\Local\Temp in $ENV{PATH}.
This could additionally maybe close RT #87913, which seems to be the same
problem, or really similar:
process_begin: CreateProcess(NULL, -c "if not exist gcc_mswudll mkdir
gcc_mswudll", ...) failed.
-max
>From d64302f8b45901d2b91b9f813f8c4de76cad1714 Mon Sep 17 00:00:00 2001
From: Max Maischein <[email protected]>
Date: Tue, 27 Aug 2019 00:31:28 +0200
Subject: [PATCH] Bail out of building if sh.exe or cc1.exe are found on the
path
This addresses # RT #49433 , RT #62451
The workaround is to adjust $PATH / $ENV{PATH} to exclude directories
in which sh.exe or cc1.exe is found. Another workaround is to set
$ENV{WX_IGNOREPATH} to a true value to disable this check.
---
Build.PL | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
mode change 100755 => 100644 Build.PL
diff --git a/Build.PL b/Build.PL
old mode 100755
new mode 100644
index b0728a2..38046e0
--- a/Build.PL
+++ b/Build.PL
@@ -226,6 +226,33 @@ $build->notes( 'userpatch' => $build->args('wxWidgets-userpatch') || '' );
$build->notes( 'graphicscontext' => $build->args('wxWidgets-graphicscontext') );
if( $build_wx ) {
+ # RT #49433 , RT #62451
+ if( $^O eq 'MSWin32' ) {
+ my @problematic = (qw(sh.exe cc1.exe));
+ my @problematic_path = map { My::Build::Base->awx_path_search( $_ ) } @problematic;
+ My::Build::Base->awx_path_search( 'cc1.exe' ),
+ ;
+ if( @problematic_path and not $ENV{WX_IGNOREPATH} ) {
+ local $" = "\n";
+ print <<EOT;
+The following programs were found in \$ENV{PATH}, and will break the build:
+@problematic_path
+
+PATH is
+
+$ENV{PATH}
+
+Please edit \$ENV{PATH} so these programs are not in it anymore and restart the
+installation. Alternatively, set \$ENV{WX_IGNOREPATH} to a true value and
+restart the installation:
+
+ set WX_IGNOREPATH=1
+
+EOT
+ exit 1;
+ }
+ };
+
$wx_version = _askmulti( $build, 'wxWidgets-version',
'Which wxWidgets version?',
[ sort keys %VERSIONS ], $DEFAULT_VERSION );
--
2.22.0.windows.1