GNU bug report logs - #73620
libtool-2.5.3 broken on CentOS and Alma Linux

Previous Next

Package: libtool;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Thu, 3 Oct 2024 23:03:02 UTC

Severity: normal

Done: Ileana Dumitrescu <ileanadumitrescu95 <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 73620 <at> debbugs.gnu.org (full text, mbox):

From: "Sergey Poznyakoff" <gray <at> gnu.org.ua>
To: "Ileana Dumitrescu" <ileanadumitrescu95 <at> gmail.com>
Cc: Bruno Haible <bruno <at> clisp.org>, 73620 <at> debbugs.gnu.org,
 Sam James <sam <at> gentoo.org>
Subject: Re: bug#73620: libtool-2.5.3 broken on CentOS and Alma Linux
Date: Wed, 09 Oct 2024 21:21:53 +0200
[Message part 1 (text/plain, inline)]
Hello,

Thanks a lot for CCing me.

Ileana is absolutely right: the reason for this behavior is that some
paths are excluded from compile_rpath in func_mode_link.  The original
idea was to prevent paths from outside of the source tree from appearing
before ones lying beneath it.  However, simply omitting such paths was
not right, they should be reordered instead.  The attached patch fixes
this.  With it, both bug_71489.at in libtool, and all tests in gettext
pass.

Regards,
Sergey

[0001-Don-t-omit-directories-from-the-constructed-rpath.patch (text/x-diff, inline)]
From 1b5a235b47f61ba1adb331db7f084630ac110f5b Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray <at> gnu.org>
Date: Wed, 9 Oct 2024 21:34:01 +0300
Subject: [PATCH] Don't omit directories from the constructed rpath.

This fixes bug introduced by 0e1b333324.

* build-aux/ltmain.in: Don't omit paths that are not under $progdir
from the compiled_rpath.  Append them to the end of it.
---
 build-aux/ltmain.in | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 68aca605..2c486fa7 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -4632,6 +4632,7 @@ func_mode_link ()
     finalize_command=$nonopt

     compile_rpath=
+    compile_rpath_tail=
     finalize_rpath=
     compile_shlibpath=
     finalize_shlibpath=
@@ -6273,10 +6274,11 @@ func_mode_link ()
 	    case " $sys_lib_dlsearch_path " in
 	    *" $absdir "*) ;;
 	    *)
-	      case "$compile_rpath " in
+	      case "$compile_rpath$compile_rpath_tail " in
 	      *" $absdir "*) ;;
 	      *) case $absdir in
                  "$progdir/"*) func_append compile_rpath " $absdir" ;;
+                 *) func_append compile_rpath_tail " $absdir" ;;
 		 esac
 	      esac
 	      ;;
@@ -6349,10 +6351,11 @@ func_mode_link ()
 	    case " $sys_lib_dlsearch_path " in
 	    *" $absdir "*) ;;
 	    *)
-	      case "$compile_rpath " in
+	      case "$compile_rpath$compile_rpath_tail " in
 	      *" $absdir "*) ;;
 	      *) case $absdir in
                  "$progdir/"*) func_append compile_rpath " $absdir" ;;
+                 *) func_append compile_rpath_tail " $absdir" ;;
 		 esac
 	      esac
 	      ;;
@@ -6716,6 +6719,8 @@ func_mode_link ()
       done # for deplib in $libs

       func_append temp_rpath "$temp_rpath_tail"
+      func_append compile_rpath "$compile_rpath_tail"
+
       if test link = "$pass"; then
 	if test prog = "$linkmode"; then
 	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
--
2.35.1


This bug report was last modified 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.