<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 5 December 2016 at 21:08, Khem Raj <span dir="ltr">&lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div class="gmail-h5"><blockquote type="cite"><div>On Dec 5, 2016, at 5:20 AM, Jussi Kukkonen &lt;<a href="mailto:jussi.kukkonen@intel.com" target="_blank">jussi.kukkonen@intel.com</a>&gt; wrote:</div><br class="gmail-m_-7104777156855689810Apple-interchange-newline"><div><br class="gmail-m_-7104777156855689810Apple-interchange-newline"><br style="font-family:times-roman;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote" style="font-family:times-roman;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">On 1 December 2016 at 10:37, Khem Raj<span class="gmail-m_-7104777156855689810Apple-converted-space"> </span><span dir="ltr">&lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;</span><span class="gmail-m_-7104777156855689810Apple-converted-space"> </span>wrote<wbr>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When configure pokes for wayland-protocols isntallations it ended up<br>using the ones from host, which is because it did not account for sysroot<br>prefix<br><br>Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;<br>---<br> .../gstreamer/gstreamer1.0-pl<wbr>ugins-bad.inc         |  2 +-<br> ...G_CONFIG_SYSROOT_DIR-to-pk<wbr>g-config-output.patch | 37 ++++++++++++++++++++++<br> .../gstreamer/<a href="http://gstreamer1.0-plugins-bad_1.10.1.bb/" rel="noreferrer" target="_blank">gstreamer1.0-pl<wbr>ugins-bad_1.10.1.bb</a>   |  1 +<br> 3 files changed, 39 insertions(+), 1 deletion(-)<br> create mode 100644 meta/recipes-multimedia/gstrea<wbr>mer/gstreamer1.0-plugins-bad/<wbr>0001-Prepend-PKG_CONFIG_<wbr>SYSROOT_DIR-to-pkg-config-<wbr>output.patch<br><br>diff --git a/meta/recipes-multimedia/gstr<wbr>eamer/gstreamer1.0-plugins-<wbr>bad.inc b/meta/recipes-multimedia/gstr<wbr>eamer/gstreamer1.0-plugins-<wbr>bad.inc<br>index d26a6a9..d3c5326 100644<br>--- a/meta/recipes-multimedia/gstr<wbr>eamer/gstreamer1.0-plugins-<wbr>bad.inc<br>+++ b/meta/recipes-multimedia/gstr<wbr>eamer/gstreamer1.0-plugins-<wbr>bad.inc<br>@@ -64,7 +64,7 @@ PACKAGECONFIG[srtp]            = &quot;--enable-srtp,--disable-srtp,<wbr>libsrtp&quot;<br> PACKAGECONFIG[uvch264]         = &quot;--enable-uvch264,--disable-uv<wbr>ch264,libusb1 libgudev&quot;<br> PACKAGECONFIG[voaacenc]        = &quot;--enable-voaacenc,--disable-v<wbr>oaacenc,vo-aacenc&quot;<br> PACKAGECONFIG[voamrwbenc]      = &quot;--enable-voamrwbenc,--disable<wbr>-voamrwbenc,vo-amrwbenc&quot;<br>-PACKAGECONFIG[wayland]         = &quot;--enable-wayland,--disable-wa<wbr>yland,wayland-native wayland&quot;<br>+PACKAGECONFIG[wayland]         = &quot;--enable-wayland,--disable-wa<wbr>yland,wayland-native wayland wayland-protocols&quot;<br> PACKAGECONFIG[webp]            = &quot;--enable-webp,--disable-webp,<wbr>libwebp&quot;<br><br> # these plugins have not been ported to 1.0 (yet):<br>diff --git a/meta/recipes-multimedia/gstr<wbr>eamer/gstreamer1.0-plugins-<wbr>bad/0001-Prepend-PKG_CONFIG_<wbr>SYSROOT_DIR-to-pkg-config-<wbr>output.patch b/meta/recipes-multimedia/gstr<wbr>eamer/gstreamer1.0-plugins-<wbr>bad/0001-Prepend-PKG_CONFIG_<wbr>SYSROOT_DIR-to-pkg-config-<wbr>output.patch<br>new file mode 100644<br>index 0000000..eb789df<br>--- /dev/null<br>+++ b/meta/recipes-multimedia/gstr<wbr>eamer/gstreamer1.0-plugins-<wbr>bad/0001-Prepend-PKG_CONFIG_<wbr>SYSROOT_DIR-to-pkg-config-<wbr>output.patch<br>@@ -0,0 +1,37 @@<br>+From c271503d7e233428ac0323c51d6517<wbr>113e26bef7 Mon Sep 17 00:00:00 2001<br>+From: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;<br>+Date: Thu, 1 Dec 2016 00:27:13 -0800<br>+Subject: [PATCH] Prepend PKG_CONFIG_SYSROOT_DIR to pkg-config output<br>+<br>+In cross environment we have to prepend the sysroot to the path found by<br>+pkgconfig since the path returned from pkgconfig does not have sysroot prefixed<br>+it ends up using the files from host system. If build host has wayland installed<br>+the build will succeed but if you dont have wayland-protocols installed on build host then<br>+it wont find the files on build host<br>+<br>+This should work ok with non sysrooted builds too since in those cases PKG_CONFIG_SYSROOT_DIR<br>+will be empty<br>+<br>+Upstream-Status: Pending<br>+<br>+Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;<br>+---<br>+<span class="gmail-m_-7104777156855689810Apple-converted-space"> </span><a href="http://configure.ac/" rel="noreferrer" target="_blank">configure.ac</a><span class="gmail-m_-7104777156855689810Apple-converted-space"> </span>| 2 +-<br>+ 1 file changed, 1 insertion(+), 1 deletion(-)<br>+<br>+diff --git a/<a href="http://configure.ac/" rel="noreferrer" target="_blank">configure.ac</a><span class="gmail-m_-7104777156855689810Apple-converted-space"> </span>b/<a href="http://configure.ac/" rel="noreferrer" target="_blank">configure.ac</a><br>+index f8ac96b..dc87b08 100644<br>+--- a/<a href="http://configure.ac/" rel="noreferrer" target="_blank">configure.ac</a><br>++++ b/<a href="http://configure.ac/" rel="noreferrer" target="_blank">configure.ac</a><br>+@@ -2233,7 +2233,7 @@ AG_GST_CHECK_FEATURE(WAYLAND, [wayland sink], wayland , [<br>+     PKG_CHECK_MODULES(WAYLAND_PRO<wbr>TOCOLS, wayland-protocols &gt;= 1.4, [<br>+       if test &quot;x$wayland_scanner&quot; != &quot;x&quot;; then<br>+         HAVE_WAYLAND=&quot;yes&quot;<br>+-        AC_SUBST(WAYLAND_PROTOCOLS_DAT<wbr>ADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)<br>++        AC_SUBST(WAYLAND_PROTOCOLS_DAT<wbr>ADIR, ${PKG_CONFIG_SYSROOT_DIR}`$PKG<wbr>_CONFIG --variable=pkgdatadir wayland-protocols`)<br></blockquote><div><br></div><div>I believe this breaks multilib because wayland-protocols is allarch so PKG_CONFIG_SYSROOT_DIR may then be incorrect.</div></div></div></blockquote><div><br></div></div></div><div>Realized my last reply is too terse. expanding on it a bit more.</div><div>this is not really the case. Since PKG_CONFIG_SYSROOT_DIR is set to  STAGING_DIR_HOST which is then set to ${STAGING_DIR}/${MACHINE} so effectively its just</div><div>reusing an existing var compared to your case where a new redundant variable is introduced. </div><div><br></div><div>having said that, there could be a multilib issue if pkgdatadir thats in .pc file from wayland-protocols package is using variables like ${libdir} which then are</div><div>multilib dependent, if this is the case then we need to fix .pc file. however when I look at the &lt;target-sysroot&gt;/usr/share/<wbr>pkgconfig/wayland-protocols.pc it has</div><div><br></div><div><div>prefix=/usr</div><div>datarootdir=${prefix}/share</div><div>pkgdatadir=/usr/share/wayland-<wbr>protocols</div><div><br></div><div>seems to be free of multilib deps.</div></div><div><div class="gmail-h5"><br></div></div></div></div></blockquote></div><div class="gmail_extra"><br></div><div class="gmail_extra">It&#39;s not about the .pc file, the issue is that if you build lib32-gstreamer1.0-plugins-bad WAYLAND_PROTOCOLS_DATADIR will end up as (as an example) </div><div class="gmail_extra">    $TMPDIR/sysroots/lib32-qemux86-64/usr/share/wayland-protocols/</div><div class="gmail_extra">but that&#39;s not where wayland protocols are. The actual path is</div><div class="gmail_extra">    $TMPDIR/sysroots/qemux86-64/usr/share/wayland-protocols/</div><div class="gmail_extra"><br></div><div class="gmail_extra">Maybe there should be a generic multilib fix for this but I can&#39;t figure out what it would be...</div><div class="gmail_extra"><br></div><div class="gmail_extra">Jussi</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div></div>