[sr #110901] libtool hangs indefinitely on windows when used in msys due to cmd.exe call bug

Ileana Dumitrescu <[email protected]> Wed, 2 Jul 2025 14:46:47 -0400 (EDT)
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
--8323329-1881223818-1751482007=:949493
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

Follow-up Comment #19, sr #110901 (group libtool):=0A=0A=0A[comment #16 com=
ment #16:]=0A> [comment #12 =D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82=D0=
=B0=D1=80=D0=B8=D0=B9 =E2=84=9612:]=0A>> [comment #10 comment #10:]=0A>>> L=
ooks like MSys is still in (very inactive) use.=0A>>> The project page has =
two years old activity.=0A>> Could you link the project page here? =0A>> =
=0A> =0A> Probably the most current valid link is =0A> https://sourceforge.=
net/projects/mingw/=0A=0AThank you!=0A=0A> [comment #15 =D0=BA=D0=BE=D0=BC=
=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=80=D0=B8=D0=B9 =E2=84=9615:]=0A>> I pushe=
d a patch that should cache if cygpath is present with a simple check=0A>> =
for the help message. If the check is successful,=0A>> func_convert_core_ms=
ys_to_w32_with_cygpath will be used, but if it is not,=0A>> the previous im=
plementation will be used, func_convert_core_msys_to_w32.=0A>> =0A>> This s=
hould have the requested behaviour, where MSYS needs command line=0A>> flag=
s escaped, but MSYS2 can use cygpath.=0A>> =0A>> https://cgit.git.savannah.=
gnu.org/cgit/libtool.git/commit/?h=3Ddevelopment&id=3D9f4b6adea4403e38b0b1f=
75761563c103d7c0e03=0A> =0A> This could be risky too.=0A> If double slash i=
s not converted (for any reason), then the command "cmd.exe=0A> //c somethi=
ng" will start interactive shell.=0A> =0A> I'd suggest to use several worka=
rounds.=0A> * check for cygpath and use it, if available. The best, the fas=
test and the=0A> most straightforward way.=0A> * Without cygpath cmd may ha=
ng with a single slash (when transforming) and=0A> may hang with two slashe=
s (when not transforming). The easy solution is:=0A> _lt_result=3D`"${COMSP=
EC-cmd}" /c echo one-slash works. Not checked //c echo=0A> two-slashes 2>/d=
ev/null`=0A> The resulting string is started with "one-slash or "two-slashe=
s".=0A=0AThis is much better! I will add your updates to libtool.m4 and add=
 the needed=0Aupdates for ltmain.in soon.=0A=0A=0A    _____________________=
__________________________________=0A=0AReply to this item at:=0A=0A  <http=
s://savannah.gnu.org/support/?110901>=0A=0A________________________________=
_______________=0AMessage sent via Savannah=0Ahttps://savannah.gnu.org/=0A
--8323329-1881223818-1751482007=:949493
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaGV+lwAKCRCqLAuaBUf3
TmAFAQDbzGI5EdkTVFksJjjEsdrEA/Qv7lJDTL/0+wWCo9adRQD/YO0SyDitje7v
vsWd5CuuQhLJseInFUW+3H4zWJHDZwE=
=yRq4
-----END PGP SIGNATURE-----

--8323329-1881223818-1751482007=:949493--