<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Fri, Feb 12, 2016 at 12:06 PM Markus Lehtonen &lt;<a href="mailto:markus.lehtonen@linux.intel.com">markus.lehtonen@linux.intel.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Otherwise the nss libs do not get any RPATH/RUNPATH. Consequently, the<br>
.so dependencies of nss libs are always searched from the base lib<br>
directories of the host (i.e. /lib/ and /usr/lib). This causes problems<br>
with nss-native where the .so&#39;s should be searched from the base lib<br>
directories of the sysroot instead of the host file system.<br>
<br>
This particular problem has probably been unnoticed as nss-native is<br>
seldom used and/or most users are likely to have nss libraries installed<br>
on their host system. In this case everything most likely work as<br>
expected.<br>
<br>
[YOCTO #9041]<br>
<br>
Signed-off-by: Markus Lehtonen &lt;<a href="mailto:markus.lehtonen@linux.intel.com" target="_blank">markus.lehtonen@linux.intel.com</a>&gt;<br>
---<br>
 meta/recipes-support/nss/<a href="http://nss_3.21.bb" rel="noreferrer" target="_blank">nss_3.21.bb</a> | 6 +++++-<br>
 1 file changed, 5 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/meta/recipes-support/nss/<a href="http://nss_3.21.bb" rel="noreferrer" target="_blank">nss_3.21.bb</a> b/meta/recipes-support/nss/<a href="http://nss_3.21.bb" rel="noreferrer" target="_blank">nss_3.21.bb</a><br>
index 552fd6c..8b9fb71 100644<br>
--- a/meta/recipes-support/nss/<a href="http://nss_3.21.bb" rel="noreferrer" target="_blank">nss_3.21.bb</a><br>
+++ b/meta/recipes-support/nss/<a href="http://nss_3.21.bb" rel="noreferrer" target="_blank">nss_3.21.bb</a><br>
@@ -91,12 +91,16 @@ do_compile() {<br>
<br>
     export NSS_DISABLE_GTESTS=1<br>
<br>
+    # Need to set RPATH so that chrpath will do its job correctly<br>
+    RPATH=&quot;-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}&quot;<br></blockquote><div><br></div><div>Why are you adding native paths to rpath in a target recipe? If this change is native-only, this should use the class-native override., no?</div></div></div>