libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does ltmain.sh::temp_rpath not need the same system lib consideratio


From: Nish Aravamudan
Subject: Why does ltmain.sh::temp_rpath not need the same system lib considerations?
Date: Thu, 16 Feb 2017 12:31:28 -0800
User-agent: Mutt/1.6.2-neo (2016-08-21)

I am trying to get to the bottom of an odd build failure on Ubuntu 17.04
with heimdal. I believe the underlying issue is a bug in libtool, but
I'm not confident in my analysis (some of it is also at
https://github.com/heimdal/heimdal/issues/241), but here's what I have,
I would appreciate any feedback!

Using the system sqlite3 (/usr/lib/x86_64-linux-gnu/) via configure, we
end up inserting the above path into LD_LIBRARY_PATH for build-time
generated wrapper scripts and since we also happen to have heimdal
libraries install at the system-level, the system heimdal libraries are
used by the tests instead of the build-local ones. This is bad for two
reasons: a) it fails in this case because of an ABI mismatch and b) we
are trying to test the built libraries, not the system installed ones
when the library in question is built by this package.

It seems like there is rarely, if ever, a case to put a system library
path before a non-system library path in the wrapper script, and in
particular, it seems like ltmain.sh actually detects adding the system
path to compile_rpath and finalize_rpath. Is it correct to do the same
elision in temp_rpath? e.g.

--- a/ltmain.sh
+++ b/ltmain.sh
@@ -8092,9 +8092,16 @@ func_mode_link ()
            # We need to hardcode the library path
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
              # Make sure the rpath contains only unique directories.
-             case $temp_rpath: in
-             *"$absdir:"*) ;;
-             *) func_append temp_rpath "$absdir:" ;;
+             # Skip directories that are in the system default run-time
+             # search path.
+             case " $sys_lib_dlsearch_path " in
+             *" $absdir "*) ;;
+             *)
+               case $temp_rpath: in
+               *"$absdir:"*) ;;
+               *) func_append temp_rpath "$absdir:" ;;
+               esac
+               ;;
              esac
            fi

Doing the above does result in passing testcases, but I'm not sure why
this isn't seen in other environments or if the above change is a bad
idea.

Thanks!
-Nish
 

-- 
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd



reply via email to

[Prev in Thread] Current Thread [Next in Thread]