<div><br><div class="gmail_quote"><div dir="auto">On Fri, Oct 13, 2017 at 12:24 PM Juro Bystricky &lt;<a href="mailto:juro.bystricky@intel.com">juro.bystricky@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">This patch changes the result of the nettle dlopen-test<br>
from FAIL to PASS. The test used to fail because the test could not<br>
find and load libnettle.so.<br>
This patch fixes this by using absolute path instead of relative.<br>
<br>
This was the only test out of 88 that used to fail.<br>
<br>
Signed-off-by: Juro Bystricky &lt;<a href="mailto:juro.bystricky@intel.com" target="_blank">juro.bystricky@intel.com</a>&gt;<br>
---<br>
 .../nettle/nettle-3.3/dlopen-test.patch              | 20 ++++++++++++++++++++<br>
 meta/recipes-support/nettle/<a href="http://nettle_3.3.bb" rel="noreferrer" target="_blank">nettle_3.3.bb</a>            |  4 ++++<br>
 2 files changed, 24 insertions(+)<br>
 create mode 100644 meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch<br>
<br>
diff --git a/meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch b/meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch<br>
new file mode 100644<br>
index 0000000..c4f0b7e<br>
--- /dev/null<br>
+++ b/meta/recipes-support/nettle/nettle-3.3/dlopen-test.patch<br>
@@ -0,0 +1,20 @@<br>
+Replace relative path of libnettle.so with absolute path so the test<br>
+program can find it.<br>
+Relative paths are not suitable, as the folder strucure for ptest<br>
+is different from the one expected by the nettle testsuite.<br>
+<br>
+Upstream-Status: Inappropriate [embedded specific]<br>
+<br>
+Signed-off-by: Juro Bystricky &lt;<a href="mailto:juro.bystricky@intel.com" target="_blank">juro.bystricky@intel.com</a>&gt;<br>
+<br>
+--- a/testsuite/dlopen-test.c  2016-10-01 00:28:38.000000000 -0700<br>
++++ b/testsuite/dlopen-test.c  2017-10-13 11:08:57.227572860 -0700<br>
+@@ -9,7 +9,7 @@<br>
+ main (int argc UNUSED, char **argv UNUSED)<br>
+ {<br>
+ #if HAVE_LIBDL<br>
+-  void *handle = dlopen (&quot;../libnettle.so&quot;, RTLD_NOW);<br>
++  void *handle = dlopen (&quot;/usr/lib/libnettle.so&quot;, RTLD_NOW);</blockquote><div dir="auto"><br></div><div dir="auto">I think it would be preferred if you could use LD_LIBRARY_PATH to search for it</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
+   int (*get_version)(void);<br>
+   if (!handle)<br>
+     {<br>
diff --git a/meta/recipes-support/nettle/<a href="http://nettle_3.3.bb" rel="noreferrer" target="_blank">nettle_3.3.bb</a> b/meta/recipes-support/nettle/<a href="http://nettle_3.3.bb" rel="noreferrer" target="_blank">nettle_3.3.bb</a><br>
index b76babf..3951678 100644<br>
--- a/meta/recipes-support/nettle/<a href="http://nettle_3.3.bb" rel="noreferrer" target="_blank">nettle_3.3.bb</a><br>
+++ b/meta/recipes-support/nettle/<a href="http://nettle_3.3.bb" rel="noreferrer" target="_blank">nettle_3.3.bb</a><br>
@@ -11,5 +11,9 @@ SRC_URI += &quot;\<br>
             file://check-header-files-of-openssl-only-if-enable_.patch \<br>
             &quot;<br>
<br>
+SRC_URI_append_class-target = &quot;\<br>
+            file://dlopen-test.patch \<br>
+            &quot;<br>
+<br>
 SRC_URI[md5sum] = &quot;10f969f78a463704ae73529978148dbe&quot;<br>
 SRC_URI[sha256sum] = &quot;46942627d5d0ca11720fec18d81fc38f7ef837ea4197c1f630e71ce0d470b11e&quot;<br>
--<br>
2.7.4<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div></div>