Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libtool: update to 2.5.3 #21905

Merged
merged 1 commit into from
Oct 23, 2024
Merged

libtool: update to 2.5.3 #21905

merged 1 commit into from
Oct 23, 2024

Conversation

ikspress
Copy link
Contributor

@ikspress ikspress commented Sep 12, 2024

Based on my previous PR (#21621).

The propose of this PR is as follows:

  • Refresh some patches
  • Rephrase PKGBUILD following libtool in MSYS2-packages

Here is the difference between the original patches and the refreshed ones.

Original name Refreshed name Comments
0002-cygwin-mingw-Create-UAC-manifest-files.mingw.patch 0001-cygwin-mingw-Create-UAC-manifest-files.patch Refresh without any changes
0005-Fix-seems-to-be-moved.patch 0002-Fix-seems-to-be-moved.patch Refresh without any changes
0006-Fix-strict-ansi-vs-posix.patch 0003-Fix-STRICT_ANSI-vs-POSIX.patch Refresh without any changes
0013-Allow-statically-linking-compiler-support-libraries-.patch 0004-Allow-statically-linking-Flang-support-libraries.patch Remove '-' in file name
0010-libtool-2.4.2-include-process-h.patch 0005-libtool-include-process.h.patch Remove changes in ltmain.sh
0009-libtool-2.4.2.418-msysize.patch 0006-msysize.patch Remove changes in automatically generated files
0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch 0011-Pick-up-clang_rt-static-archives-compiler-internal.patch Refresh and remove "-l" in file name
0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch 0012-Prefer-response-files-over-linker-scripts-for-mingw.patch Refresh and remove '-' in file name
0013-Allow-statically-linking-compiler-support-libraries-.patch 0013-Allow-statically-linking-compiler-support-libraries.patch Remove '-' in file name

Thanks again for lazka's patience.

@ikspress ikspress force-pushed the libtool branch 3 times, most recently from c049ca0 to 2a4898d Compare September 14, 2024 04:19
@MisterDA
Copy link

MisterDA commented Oct 9, 2024

libtool 2.5.3 has been released in the meantime, could you consider updating this PR?

@ikspress
Copy link
Contributor Author

libtool 2.5.3 has been released in the meantime, could you consider updating this PR?

Okay, I had sent an email to libtool mailing list to ask some questions about updating libtool due to I get troubled with link flags.
I'll update to 2.5.3 when they reply. If you really need this, you can change pkgver to 2.5.3 and run updpkgsums && makepkg-mingw --skippgpcheck, but it still work in progress.
https://lists.gnu.org/archive/html/libtool/2024-10/msg00002.html

@ikspress
Copy link
Contributor Author

libtool 2.5.3 has been released in the meantime, could you consider updating this PR?

Hello, I've update it to 2.5.3 now. Thank you for your kindly reminder.

@ikspress ikspress changed the title libtool: update to 2.5.2 libtool: update to 2.5.3 Oct 14, 2024
@mmuetzel
Copy link
Collaborator

mmuetzel commented Oct 14, 2024

I downloaded and installed the MINGW64 build artifacts from this PR and rebuilt a current head of the Octave repository with it. At least with that single project, there don't seem to be any regressions. (Edit: Scratch that. Same issue in MINGW64 and CLANG64 environments.)

When trying the same with the CLANG64 artifacts, I'm seeing the following in the configure output:

checking dynamic linker characteristics... ../configure: line 26791: test: yes: unary operator expected
Win32 ld.exe

That is new afaict. Before, this line just read:

checking dynamic linker characteristics... Win32 ld.exe

That error is from the line if test yes = $multilib; then in the following snippet from the generated configure script:

  case $GCC,$cc_basename in
  yes,*)
    # gcc
    library_names_spec='$libname.dll.a'
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
    # If user builds GCC with mulitlibs enabled,
    # it should just install on $(libdir)
    # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
    if test yes = $multilib; then
    postinstall_cmds='base_file=`basename \$file`~
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
      dldir=$destdir/`dirname \$dlpath`~
      $install_prog $dir/$dlname $destdir/$dlname~
      chmod a+x $destdir/$dlname~
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
        eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
      fi'
    else
    postinstall_cmds='base_file=`basename \$file`~
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
      dldir=$destdir/`dirname \$dlpath`~
      test -d \$dldir || mkdir -p \$dldir~
      $install_prog $dir/$dlname \$dldir/$dlname~
      chmod a+x \$dldir/$dlname~
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
      fi'
    fi

I haven't checked whether this is a regression from upstream or one of the patches here.

@mmuetzel
Copy link
Collaborator

mmuetzel commented Oct 14, 2024

It's from upstream. The following (untested) patch would probably fix it:

From 0fad3a7164f0e8bbdef93ece8a128f0e1367d4bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20M=C3=BCtzel?= <[email protected]>
Date: Mon, 14 Oct 2024 17:25:07 +0200
Subject: [PATCH] handle unset $multilib

---
 m4/libtool.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index e5ddacee..4c44bf9c 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2569,7 +2569,7 @@ cygwin* | mingw* | windows* | pw32* | cegcc*)
     # If user builds GCC with mulitlibs enabled,
     # it should just install on $(libdir)
     # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
-    if test yes = $multilib; then
+    if test xyes = x$multilib; then
     postinstall_cmds='base_file=`basename \$file`~
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
-- 
2.44.0.windows.1

As a file:
0001-handle-unset-multilib.patch

@ikspress
Copy link
Contributor Author

It's from upstream. The following (untested) patch would probably fix it:

From 0fad3a7164f0e8bbdef93ece8a128f0e1367d4bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20M=C3=BCtzel?= <[email protected]>
Date: Mon, 14 Oct 2024 17:25:07 +0200
Subject: [PATCH] handle unset $multilib

---
 m4/libtool.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index e5ddacee..4c44bf9c 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2569,7 +2569,7 @@ cygwin* | mingw* | windows* | pw32* | cegcc*)
     # If user builds GCC with mulitlibs enabled,
     # it should just install on $(libdir)
     # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
-    if test yes = $multilib; then
+    if test xyes = x$multilib; then
     postinstall_cmds='base_file=`basename \$file`~
       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
-- 
2.44.0.windows.1

As a file: 0001-handle-unset-multilib.patch

Oh, thanks for your patch. Could you please send it to [email protected]? It may also broken other linux distributions.

@mmuetzel
Copy link
Collaborator

Could you please send it to [email protected]? It may also broken other linux distributions.

I opened a patch report on Savannah:
https://savannah.gnu.org/patch/index.php?10481

That issue only affects Windows targets afaict. But you are right: cross-compiling from Linux would probably also be affected.

TimothyGu pushed a commit to autotools-mirror/libtool that referenced this pull request Oct 15, 2024
If `multilib` is unset (which it apparently is by default), the output
from running a `configure` script contains lines like the following:
```
checking dynamic linker characteristics... ../configure: line 26791: test: yes: unary operator expected
Win32 ld.exe
```

The additional output is not a fatal error. But it could be irritating.

Avoid the unexpected output from `test` by making sure `=` is used as a
binary operator.

* m4/libtool.m4: Prepend "x" on both sides of a comparison with `test`
and the operator `=`.

See also: msys2/MINGW-packages#21905
TimothyGu pushed a commit to autotools-mirror/libtool that referenced this pull request Oct 22, 2024
If `multilib` is unset (which it apparently is by default), the output
from running a `configure` script contains lines like the following:
```
checking dynamic linker characteristics... ../configure: line 26791: test: yes: unary operator expected
Win32 ld.exe
```

The additional output is not a fatal error. But it could be irritating.

Avoid the unexpected output from `test` by making sure `=` is used as a
binary operator.

* m4/libtool.m4: Prepend "x" on both sides of a comparison with `test`
and the operator `=`.
* NEWS: Update for bug fix.

See also: msys2/MINGW-packages#21905
@mmuetzel
Copy link
Collaborator

I downloaded and installed the latest MINGW64 build artifacts from this PR again and rebuilt a current head of the Octave repository with it. No regressions afaict.

Other distributors already updated to this version of libtool. So, it is probably fine if we updated, too.

@mmuetzel mmuetzel merged commit 994cb70 into msys2:master Oct 23, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants