mklibs patch: fix invalid library search path
If mklibs is called with both --root and --sysroot specified, and
for a library found in rpath, mklibs searches this library in
<sysroot>/<root>/<rpath> which is an invalid path. Since <root>
already points to an absolute directory on host, we should not
add <sysroot> prefix to it. Here is a mklibs patch for this issue.
Lei
* Fix invalid search path for rpath libraries
diff --git a/src/mklibs b/src/mklibs
index ef15147..71ef4da 100755
--- a/src/mklibs
+++ b/src/mklibs
@@ -233,6 +233,9 @@ def find_lib(lib):
for path in lib_path:
if os.access(sysroot + path + "/" + lib, os.F_OK):
return sysroot + path + "/" + lib
+ for path in lib_rpath:
+ if os.access(path + "/" + lib, os.F_OK):
+ return path + "/" + lib
return ""
@@ -447,8 +450,6 @@ for obj in objects.values():
else:
print "warning: " + obj + " may need rpath, but --root not specified"
-lib_path.extend(lib_rpath)
-
passnr = 1
available_libs = []
previous_pass_unresolved = set()
Reply to: