Bug 7931

Summary: No wayland-scanner in target or nativesdk packages
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Daniel Kuhne <dakuit00>
Component: graphicsAssignee: Ross Burton <ross.burton>
Status: VERIFIED FIXED QA Contact: Cristina Agurida <cristina-danielax.agurida>
Severity: normal    
Priority: Medium CC: cristina-danielax.agurida, meta.mr.watcher, meta.watcher, poky.bs.watcher, poky.watcher, ross.burton
Version: 1.7   
Target Milestone: 1.9   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Daniel Kuhne 2015-06-29 11:55:50 UTC
When populating sdk for i686 SDKMACHINE on a x86_64 machine, wayland-scanner is missing in the nativesdk. We can find wayland-scanner in x86_64-linux sysroot, but not in i686-nativelinux-* sysroot.

Steps to reproduce:

A. use x86_64 buildmachine
B. add SDKMACHINE="i686" to your local.conf
C. bitbake core-image-weston
D. bitbake -c populate_sdk core-image-weston
E. install sdk out of tmp/deploy/sdk
F. find wayland-scanner in installation path - or - search tmp/sysroots for wayland-scanner

You will not be able to find wayland-scanner in sdk installation path or in i686-* sysroot in tmp/sysroots.

Correct behavior: We should be able to find wayland-scanner in the nativesdk (SDKMACHINE) to be used on sdk machines different to the build machine.
Comment 1 Ross Burton 2015-06-29 12:45:02 UTC
To rephrase this bug report:

It would be good if core-image-weston's SDK included the weston and wayland SDK packages.  In theory wayland is moderately trivial:

BBCLASSEXTEND="native nativesdk"
EXTRA_OECONF_class-nativesdk = "--enable-scanner"

But that then tries to execute the built scanner during the build, which won't work:

| /bin/mkdir -p protocol/ && ./wayland-scanner client-header < /data/poky-master/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-wayland/1.6.0-r0/wayland-1.6.0/protocol/wayland.xml > protocol/wayland-client-protocol.h
| /bin/bash: ./wayland-scanner: No such file or directory
| /bin/bash: ./wayland-scanner: No such file or directory
| /bin/bash: ./wayland-scanner: No such file or directory

File not found as the loader can't find the interpretter, as that's in the sysroot.  I get this as my SDK is for x86-64, if it were for ARM it would be running an ARM binary.

Looks like we need to fix the build process to build wayland-scanner twice - once to run at buuld time and once to install.
Comment 2 Ross Burton 2015-07-01 22:21:19 UTC
$ bb contents nativesdk-wayland
[...]
nativesdk-wayland-dev
/opt/poky/1.8+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/wayland-scanner
Comment 3 Ross Burton 2015-09-21 12:56:13 UTC
Fixed in oe-core 1f19083eb8453d794c9532b9252d1ab2d330ec6e
Comment 4 Cristina Agurida 2015-10-21 13:09:37 UTC
Verified on master: a9053ac0829eb01f6f002587854d01e47a78e6f0