delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/06/28/10:49:36

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D7623986C27
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1624891775;
bh=YCLwFKRvAC8p6mL7pMcv2h2CwRP0ev6wdr7DAuvlvp8=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=nZHxGNDtyIOGGUYKqPLJzKYHjqCXxY/MvNNUKbFubcq0ShZ5N7rGIKQBsH2AOk36u
Ejswu3hVZrRQyHKuEeoizDrl1WrH5rjCyHNCXWcFwS8GHgGhzBlwDOWe6EyP0CLAwG
H9jmR/SJSwCrTY1PwZitffAFcZE59bdEdLyTzOU4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2FAD3386181D
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:subject:to:references:from:message-id:date
:user-agent:mime-version:in-reply-to:content-language
:content-transfer-encoding;
bh=txa0gc+Du0r1h/Z4zQkZoKnVsKQFE5e3YHEJFeXcX9Y=;
b=uIKNp1NNAFBDT5BNm9MgQSlKgndUBqC7bVmEdSB5fu8c0ab1zHkx7x+SYQ73XLNnhs
zG1sBbF3DsLMA3gUq3VcF8GBwf9zCMeZaFSKWPgX50j/dGYPa+9uiG19grprlwu+AJRt
e6K7RKtkDP6+aa/Tn+jNNFeBRdUZ+QupZB5G9wDN7QhCh9uJOh08/eOGcJ8oKrLCQrUi
NTRJ0V+XF13U7Mdd/pHPLX/3Xc4HfcWnbIomdi/4NlOU5zI5dTkxTej8soxCCV49ipep
HtSVmL3kT20JJ7fCo7Zyj6Yh9iBE/iD1BGphbJ7wwWimrrIA8GkK63uvZ68h6xHSLPR8
BJDg==
X-Gm-Message-State: AOAM530Ao67t/GwsMPvQ8/ih2PD5o7FiaiKwxOTZBw9xgJEUJnU9kyRf
4bgqLWGjtFPtopXDaXsADFKNzYhI+uciOg==
X-Google-Smtp-Source: ABdhPJzhSjUwVyCtjsr8ZDtk1QRcHNOqKWBOvC9J0QT0UfPCBjG6s2h16WqNcaV2fzj9iqn3YvxUzQ==
X-Received: by 2002:a37:a78d:: with SMTP id
q135mr16902614qke.297.1624891743561;
Mon, 28 Jun 2021 07:49:03 -0700 (PDT)
Subject: Re: libtool with mingw hangs building openocd in
func_convert_core_msys_to_w32
To: cygwin AT cygwin DOT com
References: <SN6PR13MB4269FAC268C274507EC43A7EE5039 AT SN6PR13MB4269 DOT namprd13 DOT prod DOT outlook DOT com>
Message-ID: <5578086f-6ac4-70c3-cc74-fe813faac879@gmail.com>
Date: Mon, 28 Jun 2021 09:49:01 -0500
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19)
Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.6.0
MIME-Version: 1.0
In-Reply-To: <SN6PR13MB4269FAC268C274507EC43A7EE5039@SN6PR13MB4269.namprd13.prod.outlook.com>
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_NUMSUBJECT,
NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: =?utf-8?q?Ren=C3=A9_Berber_via_Cygwin?= <cygwin AT cygwin DOT com>
Reply-To: =?UTF-8?Q?Ren=c3=a9_Berber?= <rene DOT berber AT gmail DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 6/28/2021 8:56 AM, Dietmar May via Cygwin wrote:

> 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.

Well documented here:

https://cygwin.com/cygwin-ug-net/using.html#unc-paths

> 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>

Your example seems to be inverted, the first form doesn't work, the 
second does with the same results you show (but inverted).

It would be better if you document how you executed those commands, 
we're assuming a mintty terminal running a bash shell, but I haven't 
followed all your messages and it might be a cmd window; results 
shouldn't change anyway, but for completeness sake.

> Interestingly,
> 
> ls //c
> 
> hangs under msys2 (as well as cygwin),

Expected as the documentation link describes, //c is taken as a path to 
a server, you already knew that.

> whereas
> 
> cmd //c
> 
> does not; so it almost seems like msys2 has a hack to recognize that 
> cmd.exe is being invoked ...

No, wrong, cmd is getting an argument which it interprets as it seems 
fit, no hack there.  The same applies to the ls example before, ls 
receives an argument which is expected to be a path, nothing strange.

> 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
-- 
R.Berber

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019