Greetings. I package software for Fedora and frequently get hit with /usr/lib64 being added as an rpath in builds. I found what I think is the last thread on this subject here: http://lists.gnu.org/archive/html/libtool-patches/2010-06/msg00141.html
In the second message, Olly Betts links to a message from 2007 where he proposed a patch that would solve this by parsing the output of /sbin/ldconfig rather than trying to parse /etc/ld.so.conf. The thread ended with a positive view of the patch and a request to update the patch for current libtool. This last step doesn't appear to have happened. Since I care about this issue, I've gone ahead and ported the patch to current git master. I'm attaching it here. Thanks, -Toshio
From e56ab21a5e63a0ec0b3623835401367b74163bfe Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi <tos...@fedoraproject.org> Date: Sat, 11 Sep 2010 15:37:34 -0400 Subject: [PATCH] Update Olly Betts' patch to use /sbin/ldconfig to find dynamic linker search path instead of trying to parse ld.conf --- libltdl/m4/libtool.m4 | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index 7996c34..05ffd98 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -2573,10 +2573,10 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) # before this can be enabled. hardcode_into_libs=yes - # 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;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + # Extract search path from ldconfig + ldconfig_search_path=`/sbin/ldconfig -N -X -v 2>/dev/null|sed 's,^\(/.*\):\( (.*)\)\?$,\1,p;d'` + if test -n "$ldconfig_search_path"; then + sys_lib_dlsearch_path_spec=$ldconfig_search_path fi # We used to test for /lib/ld.so.1 and disable shared libraries on -- 1.7.2.2
pgpPEBkogaVY8.pgp
Description: PGP signature