Re: Setting gmake command arguments in the Strawberry perl CPAN shell
[email protected] (sisyphus) Thu, 4 Jun 2020 07:47:33 +1000
| Newsgroups | perl.win32.vanilla |
|---|---|
| Message-ID | <CADZSBj13Vbs7zh4Z=FO3D1dROLOkNz1rUSy4bt9EhZV=XhHCfQ@mail.gmail.com> |
--000000000000e11f8005a734faa6 Content-Type: text/plain; charset="UTF-8" Hi, I think this happens because gmake finds a file named sh.exe in the PATH - in your case it's in "C:/Program Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/". In the perl source, the GNUmakefile in the win32 directory avoids this problem by specifying: SHELL := cmd.exe Is that just a way of setting the SHELL environment variable from inside the makefile ? Does it help if you set the SHELL environment variable to "cmd.exe" before starting the build of Alien::wxWidgets : set SHELL=cmd.exe Cheers, Rob On Wed, Jun 3, 2020 at 11:57 PM Luigi Iotti <[email protected]> wrote: > Hi all > > I'm new to Strawberry perl. I just installed 5.30.2.1 on a Win10 pc. > > Long story short: in the CPAN shell, how may I add some arguments to gmake > command line? > I tried o conf make_arg, make_install_arg, makepl_arg, mbuildpl_arg but > they > seem not to work, at least in my case. > > Long story long: > > I'm trying to build Alien::wxWidgets as it is a requirement for wx. But the > build fails with: > ... > if not exist gcc_mswudll mkdir gcc_mswudll > process_begin: CreateProcess(NULL, C:/Program > Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/ -c "if not exist gcc_mswudll > mkdir gcc_mswudll", ...) failed. > make (e=2): Impossibile trovare il file specificato. #(this means unable to > find the specified file, in Italian) > gmake: [makefile.gcc:5089: gcc_mswudll] Error 2 (ignored) > if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll > process_begin: CreateProcess(NULL, C:/Program > Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/ -c "if not exist > ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll", ...) failed. > make (e=2): Impossibile trovare il file specificato. #(this means unable to > find the specified file, in Italian) > gmake: *** [makefile.gcc:5639: ..\..\lib\gcc_dll] Error 2 > system: gmake -f makefile.gcc all UNICODE=1 MSLU=0 BUILD=release SHARED=1 > DEBUG_INFO=default DEBUG_FLAG=1 LDFLAGS=" -m64" CPPFLAGS="-m64": 512 at > inc/My/Build/Win32.pm line 284. > > I found that " C:/Program Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/" is > the first component of my PATH, and it seems to come from gmake's > find_and_set_shell. > If I run the gmake command alone, with -d, it calls find_and_set_shell > twice. The first time it finds a gnu shell I have somewhere in my PATH, the > second time it finds the first directory in PATH, not an executable: > > >gmake -f makefile.gcc all UNICODE=1 MSLU=0 BUILD=release SHARED=1 > DEBUG_INFO=default DEBUG_FLAG=1 LDFLAGS=" -m64" CPPFLAGS="-m64" -d > GNU Make 4.2.1 > Built for x86_64-w64-mingw32 > Copyright (C) 1988-2016 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > find_and_set_shell() path search set default_shell = > C:/Utils/GnuWin32/bin/sh.exe > Reading makefiles... > Reading makefile 'makefile.gcc'... > Reading makefile 'config.gcc' (search path) (no ~ expansion)... > find_and_set_shell() path search set default_shell = C:/Program > Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/ > Reading makefile 'gcc_mswudll/*.d' (search path) (don't care) (no ~ > expansion)... > Updating makefiles... > > But if I add SHELL=cmd.exe on the gmake command line, it works. The working > command line is > gmake -f makefile.gcc all UNICODE=1 MSLU=0 BUILD=release SHARED=1 > DEBUG_INFO=default DEBUG_FLAG=1 LDFLAGS=" -m64" CPPFLAGS="-m64" > SHELL=CMD.exe > > Hence my question about setting SHELL= from the CPAN shell. > Other solutions are welcome. > > Thank you, regards > Luigi > --000000000000e11f8005a734faa6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hi,</div><div>I think this happens because gmake find= s a file named sh.exe in the PATH - in your case it's in "C:/Progr= am Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/".</div><div><br></div>= <div>In the perl source, the GNUmakefile in the win32 directory avoids this= problem by specifying:</div><div><br></div><div>SHELL :=3D cmd.exe</div><d= iv><br></div><div>Is that just a way of setting the SHELL environment varia= ble from inside the makefile ?</div><div>Does it help if you set the SHELL = environment variable to "cmd.exe" before starting the build of Al= ien::wxWidgets :</div><div><br></div><div>set SHELL=3Dcmd.exe</div><div><br= ></div><div>Cheers,</div><div>Rob<br> </div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_= attr">On Wed, Jun 3, 2020 at 11:57 PM Luigi Iotti <<a href=3D"mailto:lui= [email protected]">[email protected]</a>> wrote:<br></div><blockquote class=3D"= gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(20= 4,204,204);padding-left:1ex">Hi all<br> <br> I'm new to Strawberry perl. I just installed 5.30.2.1 on a Win10 pc.<br= > <br> Long story short: in the CPAN shell, how may I add some arguments to gmake<= br> command line?<br> I tried o conf make_arg, make_install_arg, makepl_arg, mbuildpl_arg but the= y<br> seem not to work, at least in my case.<br> <br> Long story long:<br> <br> I'm trying to build Alien::wxWidgets as it is a requirement for wx. But= the<br> build fails with:<br> ...<br> if not exist gcc_mswudll mkdir gcc_mswudll<br> process_begin: CreateProcess(NULL, C:/Program<br> Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/ -c "if not exist gcc_mswu= dll<br> mkdir gcc_mswudll", ...) failed.<br> make (e=3D2): Impossibile trovare il file specificato. #(this means unable = to<br> find the specified file, in Italian)<br> gmake: [makefile.gcc:5089: gcc_mswudll] Error 2 (ignored)<br> if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll<br> process_begin: CreateProcess(NULL, C:/Program<br> Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/ -c "if not exist<br> ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll", ...) failed.<br> make (e=3D2): Impossibile trovare il file specificato. #(this means unable = to<br> find the specified file, in Italian)<br> gmake: *** [makefile.gcc:5639: ..\..\lib\gcc_dll] Error 2<br> system: gmake -f makefile.gcc all=C2=A0 UNICODE=3D1 MSLU=3D0 BUILD=3Dreleas= e SHARED=3D1<br> DEBUG_INFO=3Ddefault DEBUG_FLAG=3D1 LDFLAGS=3D" -m64" CPPFLAGS=3D= "-m64": 512 at<br> inc/My/Build/Win32.pm line 284.<br> <br> I found that " C:/Program Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/= " is<br> the first component of my PATH, and it seems to come from gmake's<br> find_and_set_shell. <br> If I run the gmake command alone, with -d, it calls find_and_set_shell<br> twice. The first time it finds a gnu shell I have somewhere in my PATH, the= <br> second time it finds the first directory in PATH, not an executable:<br> <br> >gmake -f makefile.gcc all=C2=A0 UNICODE=3D1 MSLU=3D0 BUILD=3Drelease SH= ARED=3D1<br> DEBUG_INFO=3Ddefault DEBUG_FLAG=3D1 LDFLAGS=3D" -m64" CPPFLAGS=3D= "-m64" -d<br> GNU Make 4.2.1<br> Built for x86_64-w64-mingw32<br> Copyright (C) 1988-2016 Free Software Foundation, Inc.<br> License GPLv3+: GNU GPL version 3 or later<br> <<a href=3D"http://gnu.org/licenses/gpl.html" rel=3D"noreferrer" target= =3D"_blank">http://gnu.org/licenses/gpl.html</a>><br> This is free software: you are free to change and redistribute it.<br> There is NO WARRANTY, to the extent permitted by law.<br> find_and_set_shell() path search set default_shell =3D<br> C:/Utils/GnuWin32/bin/sh.exe<br> Reading makefiles...<br> Reading makefile 'makefile.gcc'...<br> Reading makefile 'config.gcc' (search path) (no ~ expansion)...<br> find_and_set_shell() path search set default_shell =3D C:/Program<br> Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/<br> Reading makefile 'gcc_mswudll/*.d' (search path) (don't care) (= no ~<br> expansion)...<br> Updating makefiles...<br> <br> But if I add SHELL=3Dcmd.exe on the gmake command line, it works. The worki= ng<br> command line is <br> gmake -f makefile.gcc all=C2=A0 UNICODE=3D1 MSLU=3D0 BUILD=3Drelease SHARED= =3D1<br> DEBUG_INFO=3Ddefault DEBUG_FLAG=3D1 LDFLAGS=3D" -m64" CPPFLAGS=3D= "-m64"<br> SHELL=3DCMD.exe<br> <br> Hence my question about setting SHELL=3D from the CPAN shell.<br> Other solutions are welcome.<br> <br> Thank you, regards<br> Luigi<br> </blockquote></div> --000000000000e11f8005a734faa6--