Re: Setting gmake command arguments in the Strawberry perl CPAN shell

[email protected] (sisyphus) Sat, 6 Jun 2020 11:33:44 +1000
Newsgroups perl.win32.vanilla
Message-ID <CADZSBj2U-VKhqi4HL_LTW6Omhd5U9c7EuzQs5NRK2xMB_b5PpQ@mail.gmail.com>
--000000000000c424c305a7605f63
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Luigi,
Glad you managed to work out a solution.

It seems to me that you've struck a rather strange issue that the
Strawberry Perl developers might be able to deal with - or at least should
be made aware of.

If you would like to have it followed up, I think the best thing would be
to create a New Issue at
https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues

Cheers,
Rob






On Sat, Jun 6, 2020 at 12:52 AM Luigi Iotti <[email protected]> wrote:

> Hi sisyphus,
>
>
>
> Thank you for your answer. You pointed me in the right direction.
>
> Setting tet the SHELL env var does not work: it seems that, at least in m=
y
> case, it does not go through all the way from cpan to make.
>
> But instead, it worked just reducing my PATH to just
> C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System=
32\WindowsPowerShell\v1.0\;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;=
C:\Strawberry\perl\bin
> , before starting cpan.bat.
>
> Thank you very much.
>
>
>
> As a sidenote: I don=E2=80=99t have any sh.exe, or similar, in C:/Program
> Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin . There is only jcmd.exe, whi=
ch
> can resemble a shell. But I think that make=E2=80=99 find_and_set_shell s=
hould set
> the shell to C:/Program
> Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/_something_.exe, not just the
> folder C:/Program Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin.
>
>
>
> Regards, Luigi
>
>
>
>
>
> *Da:* sisyphus <[email protected]>
> *Inviato:* mercoled=C3=AC 3 giugno 2020 23:48
> *A:* Luigi Iotti <[email protected]>
> *Cc:* [email protected]
> *Oggetto:* Re: Setting gmake command arguments in the Strawberry perl
> CPAN shell
>
>
>
> 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 :=3D 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" befor=
e
> starting the build of Alien::wxWidgets :
>
>
>
> set SHELL=3Dcmd.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 gmak=
e
> 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 t=
he
> 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=3D2): Impossibile trovare il file specificato. #(this means unabl=
e 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=3D2): Impossibile trovare il file specificato. #(this means unabl=
e to
> find the specified file, in Italian)
> gmake: *** [makefile.gcc:5639: ..\..\lib\gcc_dll] Error 2
> system: gmake -f makefile.gcc all  UNICODE=3D1 MSLU=3D0 BUILD=3Drelease S=
HARED=3D1
> DEBUG_INFO=3Ddefault DEBUG_FLAG=3D1 LDFLAGS=3D" -m64" CPPFLAGS=3D"-m64": =
512 at
> inc/My/Build/Win32.pm line 284.
>
> I found that " C:/Program Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/" i=
s
> 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, t=
he
> second time it finds the first directory in PATH, not an executable:
>
> >gmake -f makefile.gcc all  UNICODE=3D1 MSLU=3D0 BUILD=3Drelease SHARED=
=3D1
> DEBUG_INFO=3Ddefault DEBUG_FLAG=3D1 LDFLAGS=3D" -m64" CPPFLAGS=3D"-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 =3D
> 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 =3D 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=3Dcmd.exe on the gmake command line, it works. The wor=
king
> command line is
> gmake -f makefile.gcc all  UNICODE=3D1 MSLU=3D0 BUILD=3Drelease SHARED=3D=
1
> DEBUG_INFO=3Ddefault DEBUG_FLAG=3D1 LDFLAGS=3D" -m64" CPPFLAGS=3D"-m64"
> SHELL=3DCMD.exe
>
> Hence my question about setting SHELL=3D from the CPAN shell.
> Other solutions are welcome.
>
> Thank you, regards
> Luigi
>
>

--000000000000c424c305a7605f63
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi=C2=A0Luigi,</div>Glad you managed to work out a so=
lution.<div><br></div><div>It seems to me that you&#39;ve struck a rather s=
trange issue that the Strawberry Perl developers might be able to deal with=
 - or at least should be made aware of.</div><div><br></div><div>If you wou=
ld like to have it followed up, I think the best thing would be to create a=
 New Issue at=C2=A0<a href=3D"https://github.com/StrawberryPerl/Perl-Dist-S=
trawberry/issues">https://github.com/StrawberryPerl/Perl-Dist-Strawberry/is=
sues</a></div><div><br></div><div>Cheers,</div><div>Rob</div><div><br></div=
><div><br></div><div><div><br><div><br></div><div><br></div></div></div></d=
iv><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On =
Sat, Jun 6, 2020 at 12:52 AM Luigi Iotti &lt;<a href=3D"mailto:luigi@iotti.=
biz">[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204=
);padding-left:1ex"><div lang=3D"IT"><div class=3D"gmail-m_-421234062365816=
474WordSection1"><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-=
size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Hi sisyphus,=
<u></u><u></u></span></p><p class=3D"MsoNormal"><span style=3D"font-size:11=
pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u>=C2=A0<u></u=
></span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:=
11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Thank you for you=
r answer. You pointed me in the right direction.<u></u><u></u></span></p><p=
 class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11pt;font-fami=
ly:Calibri,sans-serif;color:rgb(31,73,125)">Setting tet the SHELL env var d=
oes not work: it seems that, at least in my case, it does not go through al=
l the way from cpan to make.<u></u><u></u></span></p><p class=3D"MsoNormal"=
><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Calibri,sans-seri=
f;color:rgb(31,73,125)">But instead, it worked just reducing my PATH to jus=
t C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System=
32\WindowsPowerShell\v1.0\;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;=
C:\Strawberry\perl\bin , before starting cpan.bat.<u></u><u></u></span></p>=
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:11pt;font-fa=
mily:Calibri,sans-serif;color:rgb(31,73,125)">Thank you very much.<u></u><u=
></u></span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-s=
ize:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u>=C2=A0=
<u></u></span></p><p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font=
-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">As a sideno=
te: I don=E2=80=99t have any sh.exe, or similar, in C:/Program Files/AdoptO=
penJDK/jdk-14.0.1.7-hotspot/bin . There is only jcmd.exe, which can resembl=
e a shell. But I think that make=E2=80=99 find_and_set_shell should set the=
 shell to C:/Program Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/_something=
_.exe, not just the folder C:/Program Files/AdoptOpenJDK/jdk-14.0.1.7-hotsp=
ot/bin.<u></u><u></u></span></p><p class=3D"MsoNormal"><span lang=3D"EN-US"=
 style=3D"font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125=
)"><u></u>=C2=A0<u></u></span></p><p class=3D"MsoNormal"><span lang=3D"EN-U=
S" style=3D"font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,1=
25)">Regards, Luigi<u></u><u></u></span></p><p class=3D"MsoNormal"><span la=
ng=3D"EN-US" style=3D"font-size:11pt;font-family:Calibri,sans-serif;color:r=
gb(31,73,125)"><u></u>=C2=A0<u></u></span></p><p class=3D"MsoNormal"><span =
lang=3D"EN-US" style=3D"font-size:11pt;font-family:Calibri,sans-serif;color=
:rgb(31,73,125)"><u></u>=C2=A0<u></u></span></p><div style=3D"border-top:no=
ne;border-right:none;border-bottom:none;border-left:1.5pt solid blue;paddin=
g:0cm 0cm 0cm 4pt"><div><div style=3D"border-right:none;border-bottom:none;=
border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm"=
><p class=3D"MsoNormal"><b><span style=3D"font-size:11pt;font-family:Calibr=
i,sans-serif">Da:</span></b><span style=3D"font-size:11pt;font-family:Calib=
ri,sans-serif"> sisyphus &lt;<a href=3D"mailto:[email protected]" targe=
t=3D"_blank">[email protected]</a>&gt; <br><b>Inviato:</b> mercoled=C3=
=AC 3 giugno 2020 23:48<br><b>A:</b> Luigi Iotti &lt;<a href=3D"mailto:luig=
[email protected]" target=3D"_blank">[email protected]</a>&gt;<br><b>Cc:</b> <a hre=
f=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
g</a><br><b>Oggetto:</b> Re: Setting gmake command arguments in the Strawbe=
rry perl CPAN shell<u></u><u></u></span></p></div></div><p class=3D"MsoNorm=
al"><u></u>=C2=A0<u></u></p><div><div><p class=3D"MsoNormal">Hi,<u></u><u><=
/u></p></div><div><p class=3D"MsoNormal">I think this happens because gmake=
 finds a file named sh.exe in the PATH - in your case it&#39;s in &quot;C:/=
Program Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/&quot;.<u></u><u></u></=
p></div><div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p></div><div><p c=
lass=3D"MsoNormal">In the perl source, the GNUmakefile in the win32 directo=
ry avoids this problem by specifying:<u></u><u></u></p></div><div><p class=
=3D"MsoNormal"><u></u>=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">SH=
ELL :=3D cmd.exe<u></u><u></u></p></div><div><p class=3D"MsoNormal"><u></u>=
=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">Is that just a way of se=
tting the SHELL environment variable from inside the makefile ?<u></u><u></=
u></p></div><div><p class=3D"MsoNormal">Does it help if you set the SHELL e=
nvironment variable to &quot;cmd.exe&quot; before starting the build of Ali=
en::wxWidgets :<u></u><u></u></p></div><div><p class=3D"MsoNormal"><u></u>=
=C2=A0<u></u></p></div><div><p class=3D"MsoNormal">set SHELL=3Dcmd.exe<u></=
u><u></u></p></div><div><p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p></di=
v><div><p class=3D"MsoNormal">Cheers,<u></u><u></u></p></div><div><p class=
=3D"MsoNormal">Rob<u></u><u></u></p></div></div><p class=3D"MsoNormal"><u><=
/u>=C2=A0<u></u></p><div><div><p class=3D"MsoNormal">On Wed, Jun 3, 2020 at=
 11:57 PM Luigi Iotti &lt;<a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a>&gt; wrote:<u></u><u></u></p></div><blockquote style=
=3D"border-top:none;border-right:none;border-bottom:none;border-left:1pt so=
lid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right=
:0cm"><p class=3D"MsoNormal">Hi all<br><br>I&#39;m new to Strawberry perl. =
I just installed 5.30.2.1 on a Win10 pc.<br><br>Long story short: in the CP=
AN 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 they<br>se=
em not to work, at least in my case.<br><br>Long story long:<br><br>I&#39;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 &quot;if not exist gcc_mswudll<br>mkdir gcc_mswudll&q=
uot;, ...) 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 ..\..\li=
b\gcc_dll mkdir ..\..\lib\gcc_dll<br>process_begin: CreateProcess(NULL, C:/=
Program<br>Files/AdoptOpenJDK/jdk-14.0.1.7-hotspot/bin/ -c &quot;if not exi=
st<br>..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll&quot;, ...) failed.<br>make=
 (e=3D2): Impossibile trovare il file specificato. #(this means unable to<b=
r>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=3Drelease SHARED=3D1<br>DEBUG_INFO=3Ddefault DEBUG_FLAG=
=3D1 LDFLAGS=3D&quot; -m64&quot; CPPFLAGS=3D&quot;-m64&quot;: 512 at<br>inc=
/My/Build/Win32.pm line 284.<br><br>I found that &quot; C:/Program Files/Ad=
optOpenJDK/jdk-14.0.1.7-hotspot/bin/&quot; is<br>the first component of my =
PATH, and it seems to come from gmake&#39;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>s=
econd time it finds the first directory in PATH, not an executable:<br><br>=
&gt;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&quot; -m64&quot;=
 CPPFLAGS=3D&quot;-m64&quot; -d<br>GNU Make 4.2.1<br>Built for x86_64-w64-m=
ingw32<br>Copyright (C) 1988-2016 Free Software Foundation, Inc.<br>License=
 GPLv3+: GNU GPL version 3 or later<br>&lt;<a href=3D"http://gnu.org/licens=
es/gpl.html" target=3D"_blank">http://gnu.org/licenses/gpl.html</a>&gt;<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() pa=
th search set default_shell =3D<br>C:/Utils/GnuWin32/bin/sh.exe<br>Reading =
makefiles...<br>Reading makefile &#39;makefile.gcc&#39;...<br>Reading makef=
ile &#39;config.gcc&#39; (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 &#39;gcc_mswudll/*.d&#39; (se=
arch path) (don&#39;t care) (no ~<br>expansion)...<br>Updating makefiles...=
<br><br>But if I add SHELL=3Dcmd.exe on the gmake command line, it works. T=
he working<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&quot; -m64&quot; CPPFLAGS=3D&quot;-m64&quot;<br>SHELL=3DCMD=
.exe<br><br>Hence my question about setting SHELL=3D from the CPAN shell.<b=
r>Other solutions are welcome.<br><br>Thank you, regards<br>Luigi<u></u><u>=
</u></p></blockquote></div></div></div></div></blockquote></div>

--000000000000c424c305a7605f63--