diff mbox

[06/10] gnu: mesa: Enable wayland support.

Message ID 20160718165552.1480-6-david@craven.ch
State New
Headers show

Commit Message

David Craven July 18, 2016, 4:55 p.m. UTC
* gnu/packages/gl.scm (mesa): Enable configure-flags required by wayland.
---
 gnu/packages/gl.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Ludovic Courtès July 19, 2016, 8:47 p.m. UTC | #1
David Craven <david@craven.ch> skribis:

> * gnu/packages/gl.scm (mesa): Enable configure-flags required by wayland.

This patch and the other patches that touch libdrm and mesa look good
but… they trigger a lot of rebuild, so we need to “schedule” them.

Currently the build farm is a bit overwhelmed as a consequence of the
recent outage, and there are already a couple of update branches waiting
(python-updates and core-updates).

Do these patches introduce API incompatibilities or things like that?
If not, I think we should group them with one of the other updates,
probably python-updates.

Thoughts?

Ludo’.
David Craven July 19, 2016, 8:55 p.m. UTC | #2
Sounds good. Just wondering what's the policy on default build options
in guixsd? Leaning more towards enable everything than enable as
little as possible? Or do you decide on a case by case basis? Just
curious...
Ludovic Courtès July 21, 2016, 12:13 p.m. UTC | #3
Hi!

David Craven <david@craven.ch> skribis:

> Sounds good. Just wondering what's the policy on default build options
> in guixsd? Leaning more towards enable everything than enable as
> little as possible? Or do you decide on a case by case basis? Just
> curious...

It’s mostly on a case-by-case basis.

An important criterion to decide whether to add an optional dependency
or feature is its popularity over extra-space ratio.

For instance, I suspect Wayland is not used much with Guix.  Thus, we
should check how adding Wayland support affects the size of Mesa’s
closure, using ‘guix size’:

  https://www.gnu.org/software/guix/manual/html_node/Invoking-guix-size.html

If the overhead is “small”, that’s fine; otherwise, that may suggest
leaving it disabled in the default Mesa.

Ludo’.
David Craven July 21, 2016, 12:19 p.m. UTC | #4
When trying to run guix size on a custom built package I get a no
substitue information available message...

David
Efraim Flashner July 21, 2016, 12:29 p.m. UTC | #5
On Thu, Jul 21, 2016 at 02:19:26PM +0200, David Craven wrote:
> When trying to run guix size on a custom built package I get a no
> substitue information available message...
> 

You're going to have to build it first both ways, once with and once
without the wayland support.
Efraim Flashner July 21, 2016, 12:38 p.m. UTC | #6
On Thu, Jul 21, 2016 at 03:29:37PM +0300, Efraim Flashner wrote:
> On Thu, Jul 21, 2016 at 02:19:26PM +0200, David Craven wrote:
> > When trying to run guix size on a custom built package I get a no
> > substitue information available message...
> > 
> 
> You're going to have to build it first both ways, once with and once
> without the wayland support.
> 

`guix size mesa' -> 203.0 MiB
`guix size mesa wayland' -> 214.6 MiB
wayland = 1.4
libxml2 = 10.0
libffi = 0.1
       ------
      ~ 11.5 MiB
Ludovic Courtès July 21, 2016, 4:02 p.m. UTC | #7
David Craven <david@craven.ch> skribis:

> When trying to run guix size on a custom built package I get a no
> substitue information available message...

Quoting the manual:

     When the package passed to ‘guix size’ is available in the store,
  ‘guix size’ queries the daemon to determine its dependencies, and
  measures its size in the store, similar to ‘du -ms --apparent-size’
  (*note (coreutils)du invocation::).

     When the given package is _not_ in the store, ‘guix size’ reports
  information based on the available substitutes (*note Substitutes::).
  This makes it possible it to profile disk usage of store items that are
  not even on disk, only available remotely.

Maybe the package in question was neither in your store, nor on the
substitute server?

HTH,
Ludo’.
David Craven July 21, 2016, 4:04 p.m. UTC | #8
Ah I'm still rebuilding after a rebase, that's probably the issue then.
David Craven July 29, 2016, 7:28 a.m. UTC | #9
So is this going into the main mesa package? Or should I submit a
mesa-wayland package instead?
Ludovic Courtès July 29, 2016, 2:57 p.m. UTC | #10
David Craven <david@craven.ch> skribis:

> So is this going into the main mesa package? Or should I submit a
> mesa-wayland package instead?

(Please keep a bit of context when replying.)

In my last message I gave you the main criterion for deciding whether to
add Wayland support in Mesa so that you could decide whether to it was
worthy:

  https://lists.gnu.org/archive/html/guix-devel/2016-07/msg00840.html

What did ‘guix size’ reveal, and what does it suggest?  :-)

Thanks,
Ludo’.
David Craven July 29, 2016, 3:26 p.m. UTC | #11
> What did ‘guix size’ reveal, and what does it suggest?  :-)

Efraim did an estimate of about 10 MB, my measurement was 30MB but
that includes the spirv toolchain and virtio driver. Are these
boundaries measurements close enough for a decision? I can do a more
precise measurement if you want... I guess we can live with 10-15MB =P
But I'm probably biases xD
Ludovic Courtès July 30, 2016, 10:22 p.m. UTC | #12
David Craven <david@craven.ch> skribis:

>> What did ‘guix size’ reveal, and what does it suggest?  :-)
>
> Efraim did an estimate of about 10 MB, my measurement was 30MB but
> that includes the spirv toolchain and virtio driver.

Comparing ‘guix size mesa’ to ‘guix size mesa wayland’ shows a 6%
increase (203 to 214 MiB), which sounds reasonable, indeed.

Go for it!

Ludo’.
Ludovic Courtès July 30, 2016, 10:23 p.m. UTC | #13
David Craven <david@craven.ch> skribis:

>> What did ‘guix size’ reveal, and what does it suggest?  :-)

I wrote “go for it”, but I should have added “not now”.  :-)

Mesa has 467 dependents, which we cannot afford to rebuild at the
moment.

Could you keep it on hold?

Thanks,
Ludo’.
David Craven Aug. 5, 2016, 2:31 p.m. UTC | #14
So now that 0.11.0 was merged can the update to mesa 12.0.0 go into
core-updates?
Leo Famulari Aug. 7, 2016, 3:01 a.m. UTC | #15
On Fri, Aug 05, 2016 at 04:31:25PM +0200, David Craven wrote:
> So now that 0.11.0 was merged can the update to mesa 12.0.0 go into
> core-updates?

We need to make the new core-updates branch, but there is a hiccup:

http://lists.gnu.org/archive/html/guix-devel/2016-08/msg00456.html

Please hold :)
Leo Famulari Aug. 22, 2016, 7:36 p.m. UTC | #16
On Sat, Aug 06, 2016 at 11:01:43PM -0400, Leo Famulari wrote:
> On Fri, Aug 05, 2016 at 04:31:25PM +0200, David Craven wrote:
> > So now that 0.11.0 was merged can the update to mesa 12.0.0 go into
> > core-updates?
> 
> We need to make the new core-updates branch, but there is a hiccup:
> 
> http://lists.gnu.org/archive/html/guix-devel/2016-08/msg00456.html
> 
> Please hold :)

FYI the core-updates branch is now ready :)
diff mbox

Patch

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 6e635a3..67bab1b 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -223,7 +223,8 @@  also known as DXTn or DXTC) for Mesa.")
         ("makedepend" ,makedepend)
         ("presentproto" ,presentproto)
         ("s2tc" ,s2tc)
-        ("udev" ,eudev)))
+        ("udev" ,eudev)
+        ("wayland" ,wayland)))
     (native-inputs
       `(("pkg-config" ,pkg-config)
         ("python" ,python-2)))
@@ -233,12 +234,16 @@  also known as DXTn or DXTC) for Mesa.")
          "--with-gallium-drivers=r600,svga,swrast,nouveau"
          ;; Enable various optional features.  TODO: opencl requires libclc,
          ;; omx requires libomxil-bellagio
-         "--with-egl-platforms=x11,drm"
+         "--with-egl-platforms=x11,drm,wayland"
          "--enable-glx-tls"        ;Thread Local Storage, improves performance
          ;; "--enable-opencl"
          ;; "--enable-omx"
          "--enable-osmesa"
          "--enable-xa"
+         ;; features required by wayland
+         "--enable-gles2"
+         "--enable-gbm"
+         "--enable-shared-glapi"
 
          ;; on non-intel systems, drop i915 and i965
          ;; from the default dri drivers