bug#79468: libtool-2.6.0 released [alpha]

Kirill Makurin <[email protected]> Fri, 2 Jan 2026 16:42:33 +0000
Newsgroups gmane.comp.gnu.libtool.bugs
Message-ID <LV5PR05MB998298BB343502C89388C518B1B1BBA@LV5PR05MB998298.namprd05.prod.outlook.com>
--_000_LV5PR05MB998298BB343502C89388C518B1B1BBALV5PR05MB998298_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I think I see it: `func_convert_core_msys_to_w32_with_cygpath` stores conve=
rted filename in `func_convert_core_msys_to_w32_result`, but `func_convert_=
file_msys_to_w32` sets `func_to_host_file_result` to `func_convert_core_msy=
s_to_w32_with_cygpath_result` after calling `func_convert_core_msys_to_w32_=
with_cygpath`.

I think you see the issue; to fix it, either:

1. `func_convert_core_msys_to_w32_with_cygpath` should store converted file=
name in `func_convert_core_msys_to_w32_with_cygpath_result`
2. `func_convert_file_msys_to_w32` should set `func_to_host_file_result` to=
 `func_convert_core_msys_to_w32_result`

- Kirill Makurin


________________________________
From: Ileana Dumitrescu
Sent: Saturday, January 3, 2026 1:33 AM
To: Kirill Makurin
Cc: [email protected]
Subject: Re: bug#79468: libtool-2.6.0 released [alpha]

On 02/01/2026 18:14, Kirill Makurin wrote:
> I copied code to a small `silly.sh`:
>
> ```
> #!/bin/sh
>
> SED=3Dsed
> sed_naive_backslashify=3D's|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
>
> func_convert_core_msys_to_w32_with_cygpath ()
> {
>    $debug_cmd
>
>    # Since MSYS2 is packaged with cygpath, call cygpath in $PATH; no need
>    # to use LT_CYGPATH in this case.
>    func_convert_core_msys_to_w32_result=3D`cygpath "$@" 2>/dev/null |
>          $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
>    if test "$?" -ne 0; then
>        # on failure, ensure result is empty
>        func_convert_core_msys_to_w32_result=3D
>    fi
> }
>
> func_convert_core_msys_to_w32_with_cygpath "$1"
> printf %s "$func_convert_core_msys_to_w32_result"
> ```
>
> Running "./silly.sh /c/Windows" resulted in "\\c\\Windows <\\c\
> \Windows>". I think cygpath invokation is missing -w option :)

func_convert_core_msys_to_w32_with_cygpath is called with the -w option,
and cygpath is passed all arguments with $@. It should be okay.

```
func_convert_file_msys_to_w32 ()
{
     $debug_cmd

     func_to_host_file_result=3D$1
     if test -n "$1"; then
       if test "Xyes" =3D "X$cygpath_installed"; then
         func_convert_core_msys_to_w32_with_cygpath -w "$1"

func_to_host_file_result=3D$func_convert_core_msys_to_w32_with_cygpath_resu=
lt
       else
         func_convert_core_msys_to_w32 "$1"
         func_to_host_file_result=3D$func_convert_core_msys_to_w32_result
       fi
     fi
     func_convert_file_check "$1" "$func_to_host_file_result"
}
```

Here is one of the functions that outputs some of the errors you have:

```
# func_convert_file_check ARG1 ARG2
# Verify that ARG1 (a file name in $build format) was converted to $host
# format in ARG2. Otherwise, emit an error message, but continue (resetting
# func_to_host_file_result to ARG1).
func_convert_file_check ()
{
   $debug_cmd

   if test -z "$2" && test -n "$1"; then
     func_error "Could not determine host file name corresponding to"
     func_error "  '$1'"
     func_error "Continuing, but uninstalled executables may not work."
     # Fallback:
     func_to_host_file_result=3D$1
   fi
}
```

--
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354


--_000_LV5PR05MB998298BB343502C89388C518B1B1BBALV5PR05MB998298_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
I think I see it: `func_convert_core_msys_to_w32_with_cygpath`&nbsp;stores&=
nbsp;converted filename in `func_convert_core_msys_to_w32_result`, but `fun=
c_convert_file_msys_to_w32` sets `func_to_host_file_result` to `func_conver=
t_core_msys_to_w32_with_cygpath_result` after
 calling `func_convert_core_msys_to_w32_with_cygpath`.</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
I think you see the issue; to fix it, either:</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
1. `func_convert_core_msys_to_w32_with_cygpath` should store converted file=
name in `func_convert_core_msys_to_w32_with_cygpath_result`</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
2. `func_convert_file_msys_to_w32` should set `func_to_host_file_result` to=
 `func_convert_core_msys_to_w32_result`</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
<br>
</div>
<div style=3D"font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, =
Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" clas=
s=3D"elementToProof">
- Kirill Makurin</div>
<div><br>
</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style=3D"display: inline-block; width: 98%;">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<b>From:</b>&nbsp;Ileana Dumitrescu<br>
<b>Sent:</b>&nbsp;Saturday, January 3, 2026 1:33 AM<br>
<b>To:</b>&nbsp;Kirill Makurin<br>
<b>Cc:</b>&nbsp;[email protected]<br>
<b>Subject:</b>&nbsp;Re: bug#79468: libtool-2.6.0 released [alpha] </div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style=3D"font-size: 11pt;">On 02/01/2026 18:14, Kirill Makurin wrote:<=
br>
&gt; I copied code to a small `silly.sh`:<br>
&gt;<br>
&gt; ```<br>
&gt; #!/bin/sh<br>
&gt;<br>
&gt; SED=3Dsed<br>
&gt; sed_naive_backslashify=3D's|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'<br>
&gt;<br>
&gt; func_convert_core_msys_to_w32_with_cygpath ()<br>
&gt; {<br>
&gt;&nbsp; &nbsp; $debug_cmd<br>
&gt;<br>
&gt;&nbsp; &nbsp; # Since MSYS2 is packaged with cygpath, call cygpath in $=
PATH; no need<br>
&gt;&nbsp; &nbsp; # to use LT_CYGPATH in this case.<br>
&gt;&nbsp; &nbsp; func_convert_core_msys_to_w32_result=3D`cygpath &quot;$@&=
quot; 2&gt;/dev/null |<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $SED -e 's/[ ]*$//' -e &quot;$sed_na=
ive_backslashify&quot;`<br>
&gt;&nbsp; &nbsp; if test &quot;$?&quot; -ne 0; then<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; # on failure, ensure result is empty<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; func_convert_core_msys_to_w32_result=3D<br>
&gt;&nbsp; &nbsp; fi<br>
&gt; }<br>
&gt;<br>
&gt; func_convert_core_msys_to_w32_with_cygpath &quot;$1&quot;<br>
&gt; printf %s &quot;$func_convert_core_msys_to_w32_result&quot;<br>
&gt; ```<br>
&gt;<br>
&gt; Running &quot;./silly.sh /c/Windows&quot; resulted in &quot;\\c\\Windo=
ws &lt;\\c\<br>
&gt; \Windows&gt;&quot;. I think cygpath invokation is missing -w option :)=
<br>
<br>
func_convert_core_msys_to_w32_with_cygpath is called with the -w option,<br=
>
and cygpath is passed all arguments with $@. It should be okay.<br>
<br>
```<br>
func_convert_file_msys_to_w32 ()<br>
{<br>
&nbsp;&nbsp;&nbsp;&nbsp; $debug_cmd<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp; func_to_host_file_result=3D$1<br>
&nbsp;&nbsp;&nbsp;&nbsp; if test -n &quot;$1&quot;; then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if test &quot;Xyes&quot; =3D &quot;X$c=
ygpath_installed&quot;; then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; func_convert_core_msys_to_=
w32_with_cygpath -w &quot;$1&quot;<br>
<br>
func_to_host_file_result=3D$func_convert_core_msys_to_w32_with_cygpath_resu=
lt<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; func_convert_core_msys_to_=
w32 &quot;$1&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; func_to_host_file_result=
=3D$func_convert_core_msys_to_w32_result<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fi<br>
&nbsp;&nbsp;&nbsp;&nbsp; fi<br>
&nbsp;&nbsp;&nbsp;&nbsp; func_convert_file_check &quot;$1&quot; &quot;$func=
_to_host_file_result&quot;<br>
}<br>
```<br>
<br>
Here is one of the functions that outputs some of the errors you have:<br>
<br>
```<br>
# func_convert_file_check ARG1 ARG2<br>
# Verify that ARG1 (a file name in $build format) was converted to $host<br=
>
# format in ARG2. Otherwise, emit an error message, but continue (resetting=
<br>
# func_to_host_file_result to ARG1).<br>
func_convert_file_check ()<br>
{<br>
&nbsp;&nbsp; $debug_cmd<br>
<br>
&nbsp;&nbsp; if test -z &quot;$2&quot; &amp;&amp; test -n &quot;$1&quot;; t=
hen<br>
&nbsp;&nbsp;&nbsp;&nbsp; func_error &quot;Could not determine host file nam=
e corresponding to&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp; func_error &quot;&nbsp; '$1'&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp; func_error &quot;Continuing, but uninstalled execu=
tables may not work.&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp; # Fallback:<br>
&nbsp;&nbsp;&nbsp;&nbsp; func_to_host_file_result=3D$1<br>
&nbsp;&nbsp; fi<br>
}<br>
```<br>
<br>
--<br>
Ileana Dumitrescu<br>
<br>
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354<br>
<br>
</div>
</body>
</html>

--_000_LV5PR05MB998298BB343502C89388C518B1B1BBALV5PR05MB998298_--