GNU bug report logs - #16037
Add 64 bit directories to sys_lib_dlsearch_path_spec for Linux ELF

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: libtool; Reported by: Philipp Thomas <pth@HIDDEN>; dated Tue, 3 Dec 2013 13:09:02 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Dec 2013 13:08:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 03 08:08:08 2013
Received: from localhost ([127.0.0.1]:55643 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Vnphv-00041l-Lu
	for submit <at> debbugs.gnu.org; Tue, 03 Dec 2013 08:08:08 -0500
Received: from eggs.gnu.org ([208.118.235.92]:48048)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <pth@HIDDEN>) id 1Vnphs-00040o-5i
 for submit <at> debbugs.gnu.org; Tue, 03 Dec 2013 08:08:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pth@HIDDEN>) id 1Vnphg-0007sA-Fk
 for submit <at> debbugs.gnu.org; Tue, 03 Dec 2013 08:07:59 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:52969)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@HIDDEN>)
 id 1Vnphg-0007s6-Cb
 for submit <at> debbugs.gnu.org; Tue, 03 Dec 2013 08:07:52 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49739)
 by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@HIDDEN>)
 id 1Vnpha-0005Be-Gu
 for bug-libtool@HIDDEN; Tue, 03 Dec 2013 08:07:52 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pth@HIDDEN>) id 1VnphU-0007qR-I9
 for bug-libtool@HIDDEN; Tue, 03 Dec 2013 08:07:46 -0500
Received: from cantor2.suse.de ([195.135.220.15]:60832 helo=mx2.suse.de)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pth@HIDDEN>)
 id 1VnphU-0007q3-Bp
 for bug-libtool@HIDDEN; Tue, 03 Dec 2013 08:07:40 -0500
Received: from relay1.suse.de (unknown [195.135.220.254])
 by mx2.suse.de (Postfix) with ESMTP id 12883A7B64
 for <bug-libtool@HIDDEN>; Tue,  3 Dec 2013 14:07:38 +0100 (CET)
Date: Tue, 3 Dec 2013 14:07:38 +0100
From: Philipp Thomas <pth@HIDDEN>
To: bug-libtool@HIDDEN
Subject: Add 64 bit directories to sys_lib_dlsearch_path_spec for Linux ELF
Message-ID: <20131203130737.GB21086@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Operating-System: openSUSE - Kernel Linux 3.11.6-5-desktop x86_64
Organization: SUSE LINUX Products GmbH, =?iso-8859-1?Q?G?=
 =?iso-8859-1?Q?F=3A_Jeff_Hawn=2C_Jennifer_Guild=2C_Felix_Imend=F6rffer=2C?=
 =?iso-8859-1?Q?_HRB_21284_=28AG_N=FCrnberg=29?=
User-Agent: Mutt/1.5.21 (2010-09-15)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Four years ago Dan Nicholson po0sted the patch below to the libtool list
(http://lists.gnu.org/archive/html/libtool/2009-01/msg00043.html). The
patch wasn't rejected and is still missing from libtool. Why wasn't this or
something like it added to libtool up to now?

Philipp

Subject: [PATCH] Add 64 bit directories to sys_lib_dlsearch_path_spec for
Linux 
ELF

When the ABI is 64-bit on Linux ELF, add /lib64 and /usr/lib64 to the
system library path so that an RPATH is not added when using libraries
from these directories.


Signed-off-by: Dan Nicholson <address@hidden>
---
 libltdl/m4/libtool.m4 |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index b75a55a..a760865 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -2410,10 +2410,25 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
   # before this can be enabled.
   hardcode_into_libs=yes
 
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib /usr/lib"
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+      *64-bit*)
+       for ac_dir in /lib64 /usr/lib64; do
+         test -d "$ac_dir" && \
+           sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $ac_dir"
+       done
+       ;;
+    esac
+  fi
+  rm -rf conftest*
+
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 
2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < 
/etc/ld.so.conf | $SED -e 's/#.*//;/^[  ]*hwcap[        ]/d;s/[:,      ]/ 
/g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
-- 
1.5.6.6




Acknowledgement sent to Philipp Thomas <pth@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#16037; Package libtool. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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