<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10288</bug_id>
          
          <creation_ts>2016-09-15 23:15:42 +0000</creation_ts>
          <short_desc>mesa and wayland: mesa master now requires native wayland-scanner in order to build</short_desc>
          <delta_ts>2016-12-05 11:43:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>graphics</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joe Konno">joe.konno</reporter>
          <assigned_to name="Jussi Kukkonen">jku</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66234</commentid>
    <comment_count>0</comment_count>
    <who name="Joe Konno">joe.konno</who>
    <bug_when>2016-09-15 23:15:42 +0000</bug_when>
    <thetext>Beginning with mesa master commit:
  * https://cgit.freedesktop.org/mesa/mesa/commit/?id=95f3e5861c3dec5d029ee2f07b8ebce6e2f73af1

If building a layer with wayland supported, Mesa will require a native wayland-scanner in order to build mesa. At this point, if that mesa commit (or newer) is bitbake&apos;d with wayland support, the build will fail, as mesa&apos;s autotools will run &apos;pkg-config --variable=wayland_scanner wayland-scanner&apos; and get back:
  * /usr/bin/wayland-scanner

Note sysrootdir is not appended.

In the meantime, I&apos;ve submitted a patch to wayland to (hopefully) add a few smarts to the wayland-scanner.pc file, though there&apos;s no guarantee it will be accepted:
  * https://lists.freedesktop.org/archives/wayland-devel/2016-September/031073.html

From a bb wayland patch:

&quot;&quot;&quot;
build: always build wayland-scanner

The previous idiom for building a cross-compiled Wayland is to build once for
the build host (with --enable-scanner --disable-libraries) to get a
wayland-scanner binary that can then be used in a cross-compile (with
--disable-scanner).  The problem with this is that the cross wayland is missing
a wayland-scanner binary, which means you then can&apos;t do any Wayland development
on the target.

Instead, always build wayland-scanner for the target and change
--enable/disable-scanner to --with/without-host-scanner.  Normal builds use the
default of --without-host-scanner and run the wayland-scanner it just built, and
cross-compiled builds pass --with-host-scanner to use a previously built host
scanner but still get a wayland-scanner to install.

(a theoretically neater solution would be to build two scanners if required (one
to run and one to install), but automake makes this overly complicated)
&quot;&quot;&quot;

It would seem, given mesa master, we will need to install a wayland-scanner-native and a wayland-scanner for a correct build and installation.

I&apos;ll do what I can locally, but any thoughts or insight would be appreciated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66248</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-09-16 15:28:41 +0000</bug_when>
    <thetext>We&apos;ll just need to do what we did with weston: make mesa depend on wayland-native and patch the configure.ac to insert the sysroot.  Thanks for the headsup.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66254</commentid>
    <comment_count>2</comment_count>
    <who name="Joe Konno">joe.konno</who>
    <bug_when>2016-09-16 16:20:07 +0000</bug_when>
    <thetext>Thanks Ross. As it happens, Wayland devs nack&apos;ed the pkg-config pc_sysrootdir patch I submitted (for reasons that are now perfectly obvious). I&apos;ll see what I can whip up locally on the wayland and mesa front.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68391</commentid>
    <comment_count>3</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-11-17 09:05:21 +0000</bug_when>
    <thetext>I&apos;ve sent a patch that just disables the pkg-config lookup and trusts that the correct wayland-scanner is in path (which is true on yocto). 

I&apos;m also talking with the wayland folks about what the best solution would be... It&apos;s quite important to find the wayland-scanner that really matches the libwayland you are compiling with so the current mesa approach is actually very good for everyone else except cross-compiling weirdos. So maybe the best thing they can do is a suggestion to scanner users (like mesa) to add a &quot;--with-wayland-scanner&quot; config option.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68831</commentid>
    <comment_count>4</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-12-05 11:43:18 +0000</bug_when>
    <thetext>commit 354d0bc4a38307a866888df64c9e6d9049560c0f
Author: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
Date:   Thu Nov 17 17:21:03 2016 +0200

    mesa: Upgrade 12.0.3 -&gt; 13.0.1
    
    New major release with OpenGL 4.4 support. Dependency on libudev has
    been removed.
    
    * Rebase replace_glibc_check_with_linux.patch
    * Add patch to find native wayland-scanner
    * Add PACKAGECONFIG[osmesa], disabled by default
    * package osmesa header correctly
    
    (From OE-Core rev: be60ffcbbdcd370f9d367db887d31a8ccc6b2519)
    
    Signed-off-by: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
    Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>