[PATCH wayland v1 1/1] wayland-scanner.pc.in: prepend pc_sysrootdir

Joe Konno joe.konno at linux.intel.com
Fri Sep 16 15:19:24 UTC 2016


On Fri, 16 Sep 2016 10:53:32 +0300
Pekka Paalanen <ppaalanen at gmail.com> wrote:

> On Thu, 15 Sep 2016 15:22:12 -0700
> Joe Konno <joe.konno at linux.intel.com> wrote:
> 
> > From: Joe Konno <joe.konno at 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.konno at 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.paalanen at 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. ^_^

> 
> 
> Thanks,
> pq

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160916/e59351b4/attachment-0001.sig>


More information about the wayland-devel mailing list