On Fri, 16 Sep 2016 17:30:18 +0200 Arnaud Vrac <raw...@gmail.com> wrote:
> On Fri, Sep 16, 2016 at 5:19 PM, Joe Konno <joe.ko...@linux.intel.com> > wrote: > > > On Fri, 16 Sep 2016 10:53:32 +0300 > > Pekka Paalanen <ppaala...@gmail.com> wrote: > > > > > On Thu, 15 Sep 2016 15:22:12 -0700 > > > Joe Konno <joe.ko...@linux.intel.com> wrote: > > > > > > > From: Joe Konno <joe.ko...@intel.com> > > > > > > > > In a cross-compilation environment with packages depending on > > > > wayland-scanner, ensure the path to wayland-scanner is correct. Without > > > > this patch, the path will _not_ point to the target environment but to > > > > the host's, potentially leading to breakage. > > > > > > > > https://bugs.freedesktop.org/show_bug.cgi?id=97828 > > > > > > > > Signed-off-by: Joe Konno <joe.ko...@intel.com> > > > > --- > > > > src/wayland-scanner.pc.in | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/src/wayland-scanner.pc.in b/src/wayland-scanner.pc.in > > > > index 7b2a4c92e0e3..ec11a0bc982c 100644 > > > > --- a/src/wayland-scanner.pc.in > > > > +++ b/src/wayland-scanner.pc.in > > > > @@ -2,7 +2,7 @@ prefix=@prefix@ > > > > exec_prefix=@exec_prefix@ > > > > datarootdir=@datarootdir@ > > > > pkgdatadir=@datadir@/@PACKAGE@ > > > > -wayland_scanner=@bindir@/wayland-scanner > > > > +wayland_scanner=${pc_sysrootdir}/@bindir@/wayland-scanner > > > > > > > > Name: Wayland Scanner > > > > Description: Wayland scanner > > > > > > Hi, > > > > > > ok, so pc_sysrootdir points to the sysroot. I would just like to > > > confirm that this really does what you intend. wayland-scanner is a > > > build tool to be run on the host. Such tools get installed into the > > > sysroot even when compiled for the host, not the target, yes? > > > > > > I read both http://dev.gentoo.org/~mgorny/pkg-config-spec.html and > > > https://autotools.io/pkgconfig/cross-compiling.html but couldn't > > > actually understand what is going on, perhaps because I never > > > cross-compile. > > > > > > Hence I cannot offer a Reviewed-by, but I can offer: > > > Acked-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> > > > > > > (Not for the 1.12.0 release.) > > > > > > Are you using binary-compatible arches for both host and target? I'd > > > like to see a test on a setup where the binaries are completely > > > incompatible so that the host != target difference is obvious. > > > > I'm struggling with this particular cross-compilation scenario as well, as > > there's a fair bit of wonky overhead involved in the build process I'm > > dealing > > with. Figured I'd introduce the patch and solicit feedback early while I > > continue digging. > > > > Your points are fair and the feedback's appreciated. I'll see about testing > > this out a bit more with an incompatible binary target-- right now my host > > is > > Intel-based and my target is also Intel-based. > > > > I'll reply back once I feel convinced one way or the other. ^_^ > > > > Hi Joe, > > I believe your patch is not right, as pq says the sysroot normally contains > the code compiled for the target, which might not be compatible with the > host. > > I think the proper way to do this is to compile wayland for the host > separately, and use ${CHOST}-pkg-config instead of pkg-config to get the > wayland-scanner path. In practice you would call > x86_64-linux-gnu-pkg-config --variable=wayland_scanner. The > x86_64-linux-gnu-pkg-config utility will look for pkgconfig files in the > host sysroot, instead of the target sysroot, allowing this use case to work. > > Unfortunately not many packages do this correctly... > > Regards, > Arnaud Thanks a mil, Arnaud. I appreciate your feedback. Some of my observations are making more sense now, and I'm increasingly convinced this patch I submitted isn't the solution Wayland's looking for (or needs). Apologies for cluttering the list, Pekka and folks. I don't think this patch as-is should be considered for inclusion. Cheers, and thanks again!
pgpL8y4sOKtLK.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel