http://qs321.pair.com?node_id=11105049


in reply to Re^7: Need help debugging Wx on Strawberry Perl 5.26.1
in thread Need help debugging Wx on Strawberry Perl 5.26.1

Just for further debugging:

process_begin: CreateProcess(NULL, C:/berrybrew/5.26.2_64_PDL/perl/site/bin/ -c "if not exist gcc_mswudll mkdir gcc_mswudll", ...) failed.

This suggests that the Module::Build / Alien::Build concoction wants to run what it thinks is a shell script through the shell, except that there is none defined:

C:/berrybrew/5.26.2_64_PDL/perl/site/bin/ -c

There is a shell missing after bin/. Of course, cmd.exe is a shell, but it doesn't take a -c command. The snippet passed to that "shell" is clearly cmd.exe syntax, so something goes wrong somewhere there. I don't know where that snippet comes from, so it's hard for me to say. Maybe that snippet is the WxWidgets-supplied Makefile so you have to look into makefile.gcc to see where/how it sets up a shell and how/why that shell thinks it can run commands with a *sh syntax when the commands are cmd.exe syntax.

Update: Most likely, GNU make examines $ENV{SHELL} and if that is set to some weirdo value (or set at all), it will use that instead of falling back on cmd.exe. My advice is to unset $ENV{SHELL} and try again.

Replies are listed 'Best First'.
Re^9: Need help debugging Wx on Strawberry Perl 5.26.1
by swl (Parson) on Aug 26, 2019 at 11:02 UTC

    Thanks for the update. $ENV{SHELL} is not set in my environment.

    However, the rt linked to in 11105055 proved to be pertinent. I have sh.exe and make.exe in my default path from an old bash for windows installation. Removing that dir from the path seems to get things working (it is building now).

      Splendid!

      I've attached a patch to RT #49433, which should fix that build issue when it's applied. At least, that patch works for me on Windows 10 with a sh.exe in a directory listed in $ENV{PATH}. Where, by "works" I mean that the Build.PL bails out with an error message instructing me to edit $ENV{PATH}.

      From d64302f8b45901d2b91b9f813f8c4de76cad1714 Mon Sep 17 00:00:00 2001 From: Max Maischein <corion@corion.net> Date: Tue, 27 Aug 2019 00:31:28 +0200 Subject: [PATCH] Bail out of building if sh.exe or cc1.exe are found o +n 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('wxWid +gets-userpatch') || '' ); $build->notes( 'graphicscontext' => $build->args('wxWidgets-graphicsc +ontext') ); 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 r +estart 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_VERSIO +N ); -- 2.22.0.windows.1

        That approach looks sound to me.

Re^9: Need help debugging Wx on Strawberry Perl 5.26.1
by swl (Parson) on Aug 26, 2019 at 09:07 UTC

    Anonymous monk pointed out an obvious error in the invocation, but running perl Makefile.PL followed by gmake gives the same basic error (see below).

    This is consistent with CPAN testers so is not a new issue. http://www.cpantesters.org/cpan/report/8aa9fbd0-7033-1014-8ba7-ce7f26264a62.

    Thanks for the tip about the makefile. I'm not too worried about getting it to work, though, so won't spend much time looking into it unless I have an idle hour or two.

    C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.26920\Alien-wxWidget +s-0.69>gmake C:\berrybrew\5.26.2_64_PDL\perl\bin\perl.exe Build --makefile_env_macr +os 1 Building Alien-wxWidgets Argument "0.21_01" isn't numeric in numeric ge (>=) at inc/latest/priv +ate.pm line 32. Fetching wxWidgets... fetching from: http://prdownloads.sourceforge.net/wxwindows/wxWidgets- +3.0.2.tar.bz2 Extracting wxWidgets... Argument "0.21_01" isn't numeric in numeric ge (>=) at inc/latest/priv +ate.pm line 32. Patching wxWidgets... Applying patch: C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.2692 +0\Alien-wxWidgets-0.69\patches\wxMSW-3.0.0-makefiles.patch perl -pe "" -- "C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.2692 +0\Alien-wxWidgets-0.69\patches\wxMSW-3.0.0-makefiles.patch" | "..\inc +\bin\patch.exe" -N -p0 -u -b -z .bak patching file build/msw/makefile.gcc Hunk #1 succeeded at 5203 (offset 4 lines). Hunk #2 succeeded at 5219 (offset 4 lines). Hunk #3 succeeded at 5239 (offset 4 lines). Hunk #4 succeeded at 5260 (offset 4 lines). Hunk #5 succeeded at 5286 (offset 4 lines). Hunk #6 succeeded at 5313 (offset 4 lines). Hunk #7 succeeded at 5345 (offset 4 lines). Hunk #8 succeeded at 5375 (offset 4 lines). Hunk #9 succeeded at 5405 (offset 4 lines). Hunk #10 succeeded at 5433 (offset 4 lines). Hunk #11 succeeded at 5454 (offset 4 lines). Hunk #12 succeeded at 5480 (offset 4 lines). Hunk #13 succeeded at 5506 (offset 4 lines). Hunk #14 succeeded at 5532 (offset 4 lines). Hunk #15 succeeded at 5558 (offset 4 lines). Hunk #16 succeeded at 5584 (offset 4 lines). Hunk #17 succeeded at 5610 (offset 4 lines). Applying patch: C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.2692 +0\Alien-wxWidgets-0.69\patches\wxMSW-3.0.1-defs.patch perl -pe "" -- "C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.2692 +0\Alien-wxWidgets-0.69\patches\wxMSW-3.0.1-defs.patch" | "..\inc\bin\ +patch.exe" -N -p0 -u -b -z .bak patching file include/wx/defs.h Applying patch: C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.2692 +0\Alien-wxWidgets-0.69\patches\wxMSW-3.0.1-setup_gctx.patch perl -pe "" -- "C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.2692 +0\Alien-wxWidgets-0.69\patches\wxMSW-3.0.1-setup_gctx.patch" | "..\in +c\bin\patch.exe" -N -p0 -u -b -z .bak patching file include/wx/msw/setup.h Hunk #1 succeeded at 435 (offset 6 lines). Hunk #2 succeeded at 577 (offset 6 lines). Hunk #3 succeeded at 623 (offset 6 lines). Hunk #4 succeeded at 777 (offset 6 lines). Hunk #5 succeeded at 785 (offset 6 lines). Hunk #6 succeeded at 1383 (offset 16 lines). Hunk #7 succeeded at 1474 (offset 16 lines). Applying patch: C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.2692 +0\Alien-wxWidgets-0.69\patches\wxWidgets-2.9.0-magic.patch perl -pe "" -- "C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.2692 +0\Alien-wxWidgets-0.69\patches\wxWidgets-2.9.0-magic.patch" | "..\inc +\bin\patch.exe" -N -p0 -u -b -z .bak patching file src/generic/grid.cpp Hunk #1 succeeded at 6125 (offset 528 lines). Applying patch: C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.2692 +0\Alien-wxWidgets-0.69\patches\wxWidgets-3.0.2-webkit.patch perl -pe "" -- "C:\BERRYB~1\526~1.2_6\data\.cpanm\work\1566809756.2692 +0\Alien-wxWidgets-0.69\patches\wxWidgets-3.0.2-webkit.patch" | "..\in +c\bin\patch.exe" -N -p0 -u -b -z .bak patching file include/wx/defs.h Hunk #1 succeeded at 3174 (offset 5 lines). patching file include/wx/html/webkit.h patching file include/wx/osx/webview_webkit.h patching file src/osx/webview_webkit.mm gmake[1]: Entering directory 'C:/BERRYB~1/526~1.2_6/data/.cpanm/work/1 +566809756.26920/Alien-wxWidgets-0.69/wxWidgets-3.0.2/build/msw' if not exist gcc_mswudll mkdir gcc_mswudll process_begin: CreateProcess(NULL, C:/berrybrew/5.26.2_64_PDL/perl/sit +e/bin/ -c "if not exist gcc_mswudll mkdir gcc_mswudll", ...) failed. make (e=5): Access is denied. gmake[1]: [makefile.gcc:5089: gcc_mswudll] Error 5 (ignored) if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll process_begin: CreateProcess(NULL, C:/berrybrew/5.26.2_64_PDL/perl/sit +e/bin/ -c "if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll", . +..) failed. make (e=5): Access is denied. gmake[1]: *** [makefile.gcc:5639: ..\..\lib\gcc_dll] Error 5 gmake[1]: Leaving directory 'C:/BERRYB~1/526~1.2_6/data/.cpanm/work/15 +66809756.26920/Alien-wxWidgets-0.69/wxWidgets-3.0.2/build/msw' system: gmake -f makefile.gcc all UNICODE=1 MSLU=0 BUILD=release SHAR +ED=1 DEBUG_INFO=default DEBUG_FLAG=1 LDFLAGS=" -m64" CPPFLAGS="-m64" +: 512 at inc/My/Build/Win32.pm line 284. gmake: *** [Makefile:33: all] Error 2