libtool with mingw hangs building openocd in func_convert_core_msys_to_w32
Dietmar May
dietmar.may@outlook.com
Mon Jun 28 13:56:41 GMT 2021
Thanks for submitting the bug report.
> I can now see what may be a duplicate report under:
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=10949
>
> responding that //c is deliberate so MSYS does not convert a posix path,
> so in the Cygwin Mingw build case, the response may be "Don't Do That"!
I just re-installed msys2 and tried a few things, with interesting result.
First, "ls /usr//bin" as well as "ls /usr/////bin" complete successfully
under both cygwin and msys2, demonstrating slash compaction.
However, "ls //usr/bin" hangs, as both apparently evaluate the leading
// as a server path.
For testing libtool's construct, I tried:
$ cmd //c echo hello
hello
which works, and this, which doesn't:
$ cmd /c echo hello
Microsoft Windows [Version 10.0.blah]
(c) Microsoft Corporation. All rights reserved.
C:\msys64\home\myname>
Interestingly,
ls //c
hangs under msys2 (as well as cygwin),
whereas
cmd //c
does not; so it almost seems like msys2 has a hack to recognize that
cmd.exe is being invoked ...
However, both of the following also complete successfully under msys2,
WITHOUT the double-slash hack:
$ cmd /c "echo hello"
hello
$ cmd "/c" "echo hello"
hello
Both seem preferable to bad syntax.
Of course, there's always the question of why libtool is using cmd.exe
instead of /bin/echo, which seems to work just fine ...
$ /bin/echo "hello world"
hello world
> On 2021-06-27 14:23, Brian Inglis wrote:
>>> Which you don't need to change if you configure properly, as JonY
>>> replied on the list to your earlier post:
>>
>>>> On 2021-06-25 09:27, Jonathan Yong via Cygwin wrote:
>>>>> Don't set --build, you are building on Cygwin, not MSYS.
>>
>>> Jonathan Yong is correct - removing --build allows make to complete
>>> without error using the unmodified ltmain.sh > There's still the
>>> issue of generating a call to cmd.exe with an
>>> invalid switch (//c), which will cause it to hang indefinitely if
>>> ever invoked.
>> > The risk of breaking anything by fixing this seems like nil.
>>
>> The issue exists in the package libtool upstream:
>>
>> https://git.savannah.gnu.org/cgit/libtool.git/tree/build-aux/ltmain.in#n963
>>
>>
>> I submitted a bug report with link to this thread and patch to the
>> upstream package maintainers; I will post any responses received.
>
More information about the Cygwin
mailing list