[PATCH core-updates] gnu: mesa: Update to 21.1.4.

  • Done
  • quality assurance status badge
Details
5 participants
  • Irfan S
  • John Kehayias
  • Kaelyn
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Irfan S
Severity
normal
I
I
Irfan S wrote on 2 Jul 2021 17:10
(address . guix-patches@gnu.org)
87r1ggkayo.fsf@irfus.in
Toggle diff (113 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index cc5131b28d..bd4c8a381a 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -237,7 +237,7 @@ also known as DXTn or DXTC) for Mesa.")
(define-public mesa
(package
(name "mesa")
- (version "20.2.6")
+ (version "21.1.4")
(source
(origin
(method url-fetch)
@@ -249,9 +249,7 @@ also known as DXTn or DXTC) for Mesa.")
version "/mesa-" version ".tar.xz")))
(sha256
(base32
-
"1nw5k2qrlcrp5bljy1lmyybgl525y0h44synkbbirw92qv3a6b7i"))
- (patches
- (search-patches "mesa-skip-tests.patch"))))
+
"02z9g6zpkg1p1sm8f84xdi7v2n7x534x9pn565bvcr411527y5qz"))))
(build-system meson-build-system)
(propagated-inputs
`(;; The following are in the Requires.private field of
gl.pc.
@@ -278,7 +276,9 @@ also known as DXTn or DXTC) for Mesa.")
(_
`()))
("wayland" ,wayland)
- ("wayland-protocols" ,wayland-protocols)))
+ ("wayland-protocols" ,wayland-protocols)
+ ("libglvnd" ,libglvnd) ;required for glvnd
support
+ ("libclc" ,libclc))) ;required for opencl
support
(native-inputs
`(("bison" ,bison)
("flex" ,flex)
@@ -307,15 +307,16 @@ also known as DXTn or DXTC) for Mesa.")
;; omx requires libomxil-bellagio
"-Dplatforms=x11,wayland"
"-Dglx=dri" ;Thread Local Storage, improves
performance
- ;; "-Dopencl=true"
+ "-Dopencl=true"
;; "-Domx=true"
- "-Dosmesa=gallium"
- "-Dgallium-xa=enabled"
+ "-Dosmesa=true"
+ "-Dgallium-xa=true"
+ "-Dglvnd=true"
;; features required by wayland
- "-Dgles2=enabled"
- "-Dgbm=enabled"
- "-Dshared-glapi=enabled"
+ "-Dgles2=true"
+ "-Dgbm=true"
+ "-Dshared-glapi=true"
;; Explicitly enable Vulkan on some architectures.
,@(match (%current-system)
@@ -417,8 +418,8 @@ also known as DXTn or DXTC) for Mesa.")
(let ((out (assoc-ref outputs "out"))
(bin (assoc-ref outputs "bin")))
;; Not all architectures have the Vulkan overlay
control script.
- (mkdir-p (string-append bin "/bin"))
- (call-with-output-file (string-append bin
"/bin/.empty")
+ (mkdir-p (string-append out "/bin"))
+ (call-with-output-file (string-append out
"/bin/.empty")
(const #t))
(copy-recursively (string-append out "/bin")
(string-append bin "/bin"))
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 97fc921436..f7b4e95b9c 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -638,7 +638,7 @@ rasterisation.")
(define-public libdrm
(package
(name "libdrm")
- (version "2.4.104")
+ (version "2.4.106")
(source (origin
(method url-fetch)
(uri (string-append
@@ -646,7 +646,7 @@ rasterisation.")
version ".tar.xz"))
(sha256
(base32
-
"1jqvx9c23hgwhq109zqj6vg3ng40pcvh3r1k2fn1a424qasxhsnn"))))
+
"1m3vwpabjg3az84vmyxi96jyd7rrqm6qkhk1gq41w5wv89aarn4j"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
@@ -663,7 +663,8 @@ rasterisation.")
(replace 'check
(lambda _
(invoke "meson" "test" "--timeout-multiplier"
"5"))))))
- (inputs
+ (propagated-inputs
+ ;; libpciaccess is in Requires.private of libdrm_intel.pc
`(("libpciaccess" ,libpciaccess)))
(native-inputs
`(("pkg-config" ,pkg-config)))
J
J
John Kehayias wrote on 2 Jul 2021 21:29
(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
hlhUQjHk36ZkQCUStjx2cQXSaEn-ArAoqQ7Vf1gwik6c5R6mFeOuMYOgQzc8JdXz3_g5RMoP5DWYV3tVMC0jGtjIOOlB2DVZXvb4TZpOREw=@protonmail.com
I can confirm this builds for me on different computers as well, and would be great to have updated in guix. This is a bigger version jump since the current version is more than 6 months old and upstream continues with frequent bug fix releases.
J
J
John Kehayias wrote on 5 Jul 2021 17:35
(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
jiKz00xP3i3YsGlN1G6BLevhAjMHDXJJd3-cSOml_yupQlbuwnxvLLjS9MCEJ1k_1jZ0y9XidCMLEmHyfDO6fVWROVtpRDSnccRjYyl3PXE=@protonmail.com
libepoxy doesn't build (patch paths?). On #guix there was discussion of fixing these problems, could an updated patch be sent here for testing?
J
J
John Kehayias wrote on 8 Jul 2021 03:35
(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
Y2Pt7fXnOkPW1ICO2GebafVzz9qSkEtAGRvVFCT7BhUn2B97bRkwkQrSbGyQsFRJM44fxThX7qxkHX13YGXgm7Dy3NsxnyPAelIQAdINF04=@protonmail.com
??????? Original Message ???????

On Monday, July 5th, 2021 at 11:35 AM:

Toggle quote (2 lines)
> libepoxy doesn't build (patch paths?). On #guix there was discussion of fixing these problems, could an updated patch be sent here for testing?

This was easy to solve: I switched where libepoxy was looking for EGL and GL libraries to use libglvnd rather than mesa, as well as adding libglvnd as an input. Also added libglvnd as an input into xorg-server.

Looking at other packages that depend on e.g. libepoxy/mesa/etc. seems like many will need libglvnd as an input now? Is that what we want to move to (I take it is optional, but perhaps a move in the right direction)?

In either case, I'd love to see this in core-updates so we can make fixes to dependent packages as needed, since there are many that depend on mesa, libepoxy, xorg-server, and so on.
J
J
John Kehayias wrote on 8 Jul 2021 04:24
(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
QLnXzdkAyMlNlQT8dThOoBGtUi2tbhTfEmmQkbE2jED-NsdqdKMD_CJmai1GDhJQ_Gdb4NvuXC84k0qf5yfzB2hCHJGtNohIAZLJF6-TceU=@protonmail.com
??????? Original Message ???????

On Wednesday, July 7th, 2021 at 9:35 PM:

Toggle quote (12 lines)
> ??????? Original Message ???????
>
> On Monday, July 5th, 2021 at 11:35 AM:
>
> > libepoxy doesn't build (patch paths?). On #guix there was discussion of fixing these problems, could an updated patch be sent here for testing?
>
> This was easy to solve: I switched where libepoxy was looking for EGL and GL libraries to use libglvnd rather than mesa, as well as adding libglvnd as an input. Also added libglvnd as an input into xorg-server.
>
> Looking at other packages that depend on e.g. libepoxy/mesa/etc. seems like many will need libglvnd as an input now? Is that what we want to move to (I take it is optional, but perhaps a move in the right direction)?
>
> In either case, I'd love to see this in core-updates so we can make fixes to dependent packages as needed, since there are many that depend on mesa, libepoxy, xorg-server, and so on.

As a followup, looks like libglvnd is optional for building mesa, and without that change I think it is just a drop in version bump. I'm not sure about dependents generally, but libepoxy and xorg-server needed no changes.

So, shall we reduce this patch to just a Mesa update, and then libglvnd as a separate issue? I think that one would require changing/adding inputs to all GL packages, as they should link to libglvnd rather than any vendor's GL directly, if I understand correctly.

With just a version change I think this should be easily merged, can anyone else weigh in on that?
J
J
John Kehayias wrote on 8 Jul 2021 17:40
(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
BQrzHJLVQjFdhpZvR_NV2rqGaVlbj7IY_NT8pcNAGQA-9IeWQDPpk1A1bRF76EXDg6wfqlIsqwixnjEiL7tRoXJhnqQKYj5N_hBQ3WDg374=@protonmail.com
Hello,

Here is a patch for just the minimal Mesa version bump. I reverted option changes to match the previous version (and wasn't sure with there being a mesa-opencl package already).

All Mesa tests pass for me too (on x86_64), so mesa-skip-tests.patch is not applied, as per original patch here. src/compiler/glsl/tests/cache_test.c has moved to src/util/tests/cache and has changed. However, the test works for me (compiling on foreign distro). The i686 part of the patch can still be applied, but will need someone to test.

This is just the Mesa change, it relies on libdrm update in https://issues.guix.gnu.org/49412

I think other than the tests patch, should be good to go, can someone review and check the i686 patch so we can move ahead with this?

Thanks,
John
From a67d3224c13e6a3339865177d3a54489f5d0f582 Mon Sep 17 00:00:00 2001
From: John Kehayias <john.kehayias@protonmail.com>
Date: Thu, 8 Jul 2021 11:15:48 -0400
Subject: [PATCH] gnu: mesa: Update to 21.1.4.

* gnu/packages/gl.scm (mesa): Update to 21.1.4.
---
gnu/packages/gl.scm | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

Toggle diff (46 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index cc5131b28d..70762faefd 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -237,7 +237,7 @@ also known as DXTn or DXTC) for Mesa.")
(define-public mesa
(package
(name "mesa")
- (version "20.2.6")
+ (version "21.1.4")
(source
(origin
(method url-fetch)
@@ -249,9 +249,7 @@ also known as DXTn or DXTC) for Mesa.")
version "/mesa-" version ".tar.xz")))
(sha256
(base32
- "1nw5k2qrlcrp5bljy1lmyybgl525y0h44synkbbirw92qv3a6b7i"))
- (patches
- (search-patches "mesa-skip-tests.patch"))))
+ "02z9g6zpkg1p1sm8f84xdi7v2n7x534x9pn565bvcr411527y5qz"))))
(build-system meson-build-system)
(propagated-inputs
`(;; The following are in the Requires.private field of gl.pc.
@@ -309,7 +307,7 @@ also known as DXTn or DXTC) for Mesa.")
"-Dglx=dri" ;Thread Local Storage, improves performance
;; "-Dopencl=true"
;; "-Domx=true"
- "-Dosmesa=gallium"
+ "-Dosmesa=true"
"-Dgallium-xa=enabled"
;; features required by wayland
@@ -417,8 +415,8 @@ also known as DXTn or DXTC) for Mesa.")
(let ((out (assoc-ref outputs "out"))
(bin (assoc-ref outputs "bin")))
;; Not all architectures have the Vulkan overlay control script.
- (mkdir-p (string-append bin "/bin"))
- (call-with-output-file (string-append bin "/bin/.empty")
+ (mkdir-p (string-append out "/bin"))
+ (call-with-output-file (string-append out "/bin/.empty")
(const #t))
(copy-recursively (string-append out "/bin")
(string-append bin "/bin"))
--
2.32.0
M
M
Maxime Devos wrote on 8 Jul 2021 22:55
Re: [bug#49339] [PATCH core-updates] gnu: mesa: Update to 21.1.4.
1aa813b7dee2233dd82ae3d74d175fc68e28fdd5.camel@telenet.be
John Kehayias via Guix-patches via schreef op do 08-07-2021 om 01:35 [+0000]:
Toggle quote (10 lines)
> ??????? Original Message ???????
>
> On Monday, July 5th, 2021 at 11:35 AM:
>
> > libepoxy doesn't build (patch paths?). On #guix there was discussion of fixing these problems, could an updated patch be sent here for testing?
>
> This was easy to solve: I switched where libepoxy was looking for EGL and GL libraries to use libglvnd rather than mesa, as well as adding libglvnd as an input. Also added libglvnd as an input into xorg-server.
>
> Looking at other packages that depend on e.g. libepoxy/mesa/etc. seems like many will need libglvnd as an input now? Is that what we want to move to (I take it is optional, but perhaps a move in the right direction)?

If with this update of mesa, (almost) every package using mesa also needs libglvnd,
then why not add 'libglvnd' to the propagated-inputs mesa, for about the same reasons
that 'atk' has 'glib' in 'propagated-inputs'?

Not sure if the comparison applies though.

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOdmWxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mQKAQDYLUYTOWqDP58kM69LYgPuVAN9
Q1vlWGe+kosIKbyV0QD/UCTHNBdMBm9tc0JEdIMPrvHbKF3olvpaRKmM/HnfMAw=
=UC7T
-----END PGP SIGNATURE-----


J
J
John Kehayias wrote on 9 Jul 2021 04:41
(name . Maxime Devos)(address . maximedevos@telenet.be)(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
_GQD4UBisH4wjKiOm3O6fzv8b1vdI890mQCX4gX6FQB7pXuDXpAU-mLiKMPRDMKu9vp_UFBUcOs6mlIKuKAbZ9W1lPQ5QnwhPBc2fra-Yow=@protonmail.com
??????? Original Message ???????

On Thursday, July 8th, 2021 at 4:55 PM, Maxime Devos wrote:

Toggle quote (24 lines)
> John Kehayias via Guix-patches via schreef op do 08-07-2021 om 01:35 [+0000]:
>
> > ??????? Original Message ???????
> >
> > On Monday, July 5th, 2021 at 11:35 AM:
> >
> > > libepoxy doesn't build (patch paths?). On #guix there was discussion of fixing these problems, could an updated patch be sent here for testing?
> >
> > This was easy to solve: I switched where libepoxy was looking for EGL and GL libraries to use libglvnd rather than mesa, as well as adding libglvnd as an input. Also added libglvnd as an input into xorg-server.
> >
> > Looking at other packages that depend on e.g. libepoxy/mesa/etc. seems like many will need libglvnd as an input now? Is that what we want to move to (I take it is optional, but perhaps a move in the right direction)?
>
> If with this update of mesa, (almost) every package using mesa also needs libglvnd,
>
> then why not add 'libglvnd' to the propagated-inputs mesa, for about the same reasons
>
> that 'atk' has 'glib' in 'propagated-inputs'?
>
> Not sure if the comparison applies though.
>
> Greetings,
>
> Maxime

Hi Maxime,

That sounds like a good idea, but I think there may be some kinks to work out. Adding libglvnd to propagated-inputs of Mesa does lead to the successful building of dependents (tested on libepoxy and virtualgl, for example). However, libepoxy fails on a test because it doesn't find libGL. That is no longer in Mesa's lib but from libglvnd if I'm understanding correctly. May just be a problem with the test since building works (which checks for GL).

Anyway, perhaps we want to tackle libglvnd separately? I don't think it is specific to the Mesa version change, but more of how we want to handle gl across packages. Still, it will involve changes to how we build Mesa as well as possibly other packages. I'm not sure that the Mesa version change will require other changes in dependent packages (I can only test a few on my own).

How do you think we should proceed?

John
M
M
Maxime Devos wrote on 9 Jul 2021 14:48
(name . John Kehayias)(address . john.kehayias@protonmail.com)(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
ff9db3620a35942a1d0aba98bcd85bbd3a85cf7e.camel@telenet.be
John Kehayias schreef op vr 09-07-2021 om 02:41 [+0000]:
Toggle quote (1 lines)
>
[...]
Toggle quote (13 lines)
> > If with this update of mesa, (almost) every package using mesa also needs libglvnd,
> >
> > then why not add 'libglvnd' to the propagated-inputs mesa, for about the same reasons
> >
> > that 'atk' has 'glib' in 'propagated-inputs'?
> >
> > Not sure if the comparison applies though.
> > [...]

> That sounds like a good idea, but I think there may be some kinks to work out. Adding libglvnd to propagated-inputs of Mesa does lead to the successful building of dependents (tested on libepoxy and virtualgl, for example).
> However, libepoxy fails on a test because it doesn't find libGL.
> That is no longer in Mesa's lib but from libglvnd if I'm understanding correctly. May just be a problem with the test since building works (which checks for GL).

Warning: I've no idea how building mesa and libglvnd works,
how linking against mesa and libglvnd works, and how mesa and libglvnd
work, besides ‘you can use the GL_... functions to do GL stuff’.

That said, it appears some package definitions expect "libGL.so" to be in mesa.
(Search for "/lib/libGL" and "lib/libEGL" with 'git grep -F"').
I've found about twenty such occurences, including libepoxy.

So it appears that adding libglvnd to the propagated-inputs and fixing
these twenty package definitions should be doable.

Looking at libepoxy in particular:

(let ((python (assoc-ref inputs "python"))
(mesa (assoc-ref inputs "mesa")))
(substitute* "src/gen_dispatch.py"
(("/usr/bin/env python") python))
(substitute* (find-files "." "\\.[ch]$")
(("libGL.so.1") (string-append mesa "/lib/libGL.so.1"))
(("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1")))
#t))))))

it seems like the test failure isn't a false positive, as libGL.so.1 is searched
for in the wrong location.

Toggle quote (5 lines)
>
> Anyway, perhaps we want to tackle libglvnd separately? I don't think it is specific to the Mesa version change, but more of how we want to handle gl across packages. Still, it will involve changes to how we build Mesa as well as possibly other packages. I'm not sure that the Mesa version change will require other changes in dependent packages (I can only test a few on my own).
>
> How do you think we should proceed?

I'd suggest adding libglvnd to propagated-inputs
and adjusting the twenty package definitions to refer
to libglvnd, and testing some graphical applications.

"mesa-utils" has "glxdemo" and "glxheads" and has few dependencies,
maybe start with that?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOhFgRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vsDAQDfiVAjfmuRpFS3StY4McBcAJzT
DuAC6G9EELLQ5cfN5AEA9tEbt+W1imHek2Wri3dx3P71odK2NDD4xJkZ9x3kpAI=
=TIEx
-----END PGP SIGNATURE-----


J
J
John Kehayias wrote on 9 Jul 2021 17:34
(name . Maxime Devos)(address . maximedevos@telenet.be)(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
vGU4MgkOeG3Tx8QPbrAdj_cb2L3IC00Eb8_NUmByhEJ-bH44AkG_mE3TuQcktoi2qdYCoy3Nxj6xlzCsPWjOlvMXUfU1YJdlASPWkZv7tj0=@protonmail.com
??????? Original Message ???????

On Friday, July 9th, 2021 at 8:48 AM, Maxime Devos wrote:

Toggle quote (6 lines)
> Warning: I've no idea how building mesa and libglvnd works,
>
> how linking against mesa and libglvnd works, and how mesa and libglvnd
>
> work, besides ‘you can use the GL_... functions to do GL stuff’.
>
No worries, I also know very little here (just learning about libglvnd), so I'm no expert. However, I think it will be a little more complicated because libglvnd is meant to dispatch to a vendor's GL libraries at runtime. Meaning it will need to know where these libraries exist, which may require some changes for Guix.

Toggle quote (32 lines)
> That said, it appears some package definitions expect "libGL.so" to be in mesa.
>
> (Search for "/lib/libGL" and "lib/libEGL" with 'git grep -F"').
>
> I've found about twenty such occurences, including libepoxy.
>
> So it appears that adding libglvnd to the propagated-inputs and fixing
>
> these twenty package definitions should be doable.
>
> Looking at libepoxy in particular:
>
> (let ((python (assoc-ref inputs "python"))
>
> (mesa (assoc-ref inputs "mesa")))
>
> (substitute* "src/gen_dispatch.py"
>
> (("/usr/bin/env python") python))
>
> (substitute* (find-files "." "\\.[ch]$")
>
> (("libGL.so.1") (string-append mesa "/lib/libGL.so.1"))
>
> (("libEGL.so.1") (string-append mesa "/lib/libEGL.so.1")))
>
> #t))))))
>
> it seems like the test failure isn't a false positive, as libGL.so.1 is searched
>
> for in the wrong location.
>
While I think getting builds and tests to pass is not so bad, I don't know that it will actually work the way it is supposed to (see above). I'm also a bit limited in what I can test directly. (For one thing, I'm on a foreign distro right now, which complicates GL testing. For example, Nix has https://github.com/guibou/nixGLfor the "OpenGL problem" which may be something we should look at for this as well.)

Toggle quote (14 lines)
> > Anyway, perhaps we want to tackle libglvnd separately? I don't think it is specific to the Mesa version change, but more of how we want to handle gl across packages. Still, it will involve changes to how we build Mesa as well as possibly other packages. I'm not sure that the Mesa version change will require other changes in dependent packages (I can only test a few on my own).
> >
> > How do you think we should proceed?
>
> I'd suggest adding libglvnd to propagated-inputs
>
> and adjusting the twenty package definitions to refer
>
> to libglvnd, and testing some graphical applications.
>
> "mesa-utils" has "glxdemo" and "glxheads" and has few dependencies,
>
> maybe start with that?
>
The more I think about it, the more I think we should tackle a change to Guix's GL system separately. The original patch enabled libglvnd in Mesa, but that has been around for a while and is not new to 21.1.x. I worry doing them at the same time would introduce two sources for anything breaking, though I hope the move to 21.1.x doesn't require any big changes elsewhere.

Personally, I'd like to see Mesa 21.1.x updated and make sure dependents are okay. We can then have a separate patch series that enables libglvnd in Mesa and adjusts all packages. We would need some people who can test that actually use different GL vendors to see that libglvnd does what it is supposed to. Perhaps Irfan can weigh in, since in their original patch they did have libglvnd and may have tested that it works.

Any experts on Mesa/libglvnd here to chime in? Is the minimal Mesa version update patch okay if we want to libglvnd separately?

Thanks,
John
I
I
Irfan S wrote on 13 Jul 2021 06:45
(address . 49339@debbugs.gnu.org)
87sg0iyg82.fsf@irfus.in
I did test building some dependents of mesa with libglvnd.
libepoxy, in particular, needed the change that Maxime points out
will affect some 20 or so other packages as well. With that made,
I was able to build and boot into a functioning graphical
environment on xorg-server. I can work on patching all packages
that look for libgl.so/libegl.so from mesa to use libglvnd
instead, as Maxime suggested. But I agree with John that getting
an updated mesa, with or without libglvnd, into core-updates now
would be preferable than being delayed to the next freeze cycle.
If that is a concern, then maybe this patch can be pushed as is.

Cheers,
Irfan
J
J
John Kehayias wrote on 13 Jul 2021 17:42
(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
dkTlAfePFapzHFIlkXh864EhymFKjGy0gpGKSYj3oOE4bCAsKxsEAgZ9Ca0g_Mn_6jA4FJjXwxahmdusAEcCeEi6xBZI9gIAMekN4YvQwiI=@protonmail.com
Hi everyone,

Final update, we still need the mesa-skip-tests.patch, but only for the i686 part (second half). The other part of the patch is not needed as the test passes.

Here is the final version of the patch to just update Mesa to 21.1.4. Note this depends on the libdrm update of https://issues.guix.gnu.org/49412Mesa builds as well as descendants I've tried (like xorg and friends).

Shall we get this merged and set the libglvnd updates after (in case we run into the core-updates freeze)? That would work well for me at least.

Thanks everyone,
John
J
J
John Kehayias wrote on 13 Jul 2021 18:26
(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
s_56Wkw6Gng1yMpobChu6yLYyAMd4xzGR1r9wrY6X0oSRi7FS9yC18ll6tt6xA-cFDJ9Y6XiQ_3v2BJ4HUAhQkFy5yC02vuzKw867EdA8is=@protonmail.com
??????? Original Message ???????

On Tuesday, July 13th, 2021 at 11:42 AM, John Kehayias <john.kehayias@protonmail.com> wrote:

Toggle quote (12 lines)
> Hi everyone,
>
> Final update, we still need the mesa-skip-tests.patch, but only for the i686 part (second half). The other part of the patch is not needed as the test passes.
>
> Here is the final version of the patch to just update Mesa to 21.1.4. Note this depends on the libdrm update of https://issues.guix.gnu.org/49412 Mesa builds as well as descendants I've tried (like xorg and friends).
>
> Shall we get this merged and set the libglvnd updates after (in case we run into the core-updates freeze)? That would work well for me at least.
>
> Thanks everyone,
>
> John

I forgot the copyright line, though I think this should be for Irfan. Here is mine, just in case:

Toggle diff (12 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index cc5131b28d..f9b6ed9891 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
J
J
John Kehayias wrote on 27 Jul 2021 23:54
(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
9BP6BfIqSQHSXQF79ytA6BYUeMlF07ymemMi6wpkDEOZ37-waZwdekebnVWUu6UCL6AKwebIl3qR9kv-mEzot0Z-OkdGWo_A0wqltVqyIds=@protonmail.com
Toggle quote (42 lines)
> ??????? Original Message ???????
>
> On Tuesday, July 13th, 2021 at 11:42 AM, John Kehayias wrote:
>
> > Hi everyone,
> >
> > Final update, we still need the mesa-skip-tests.patch, but only for the i686 part (second half). The other part of the patch is not needed as the test passes.
> >
> > Here is the final version of the patch to just update Mesa to 21.1.4. Note this depends on the libdrm update of https://issues.guix.gnu.org/49412 Mesa builds as well as descendants I've tried (like xorg and friends).
> >
> > Shall we get this merged and set the libglvnd updates after (in case we run into the core-updates freeze)? That would work well for me at least.
> >
> > Thanks everyone,
> >
> > John
>
> I forgot the copyright line, though I think this should be for Irfan. Here is mine, just in case:
>
> diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
>
> index cc5131b28d..f9b6ed9891 100644
>
> --- a/gnu/packages/gl.scm
>
> +++ b/gnu/packages/gl.scm
>
> @@ -15,6 +15,7 @@
>
> ;;; Copyright © 2020 Giacomo Leidi goodoldpaul@autistici.org
>
> ;;; Copyright © 2020 Maxim Cournoyer maxim.cournoyer@gmail.com
>
> ;;; Copyright © 2020 Kei Kebreau kkebreau@posteo.net
>
> +;;; Copyright © 2021 John Kehayias john.kehayias@protonmail.com
>
> ;;;
>
> ;;; This file is part of GNU Guix.
>
> ;;;

Apologies, the full patch was missing before. It is attached as v2 with changes noted previously (would be great to give Irfan credit here as well). Still depends on libdrm being updated, see https://issues.guix.gnu.org/49412

Thanks!

John
* gnu/packages/gl.scm (mesa): Update to 21.1.4.
* gnu/packages/patches/mesa-skip-tests.patch: Remove cache_test.c as it is no
longer needed (test passes).
---
gnu/packages/gl.scm | 11 ++++++-----
gnu/packages/patches/mesa-skip-tests.patch | 20 --------------------
2 files changed, 6 insertions(+), 25 deletions(-)

Toggle diff (68 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index cc5131b28d..f9b6ed9891 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -237,7 +238,7 @@ also known as DXTn or DXTC) for Mesa.")
(define-public mesa
(package
(name "mesa")
- (version "20.2.6")
+ (version "21.1.4")
(source
(origin
(method url-fetch)
@@ -249,7 +250,7 @@ also known as DXTn or DXTC) for Mesa.")
version "/mesa-" version ".tar.xz")))
(sha256
(base32
- "1nw5k2qrlcrp5bljy1lmyybgl525y0h44synkbbirw92qv3a6b7i"))
+ "02z9g6zpkg1p1sm8f84xdi7v2n7x534x9pn565bvcr411527y5qz"))
(patches
(search-patches "mesa-skip-tests.patch"))))
(build-system meson-build-system)
@@ -309,7 +310,7 @@ also known as DXTn or DXTC) for Mesa.")
"-Dglx=dri" ;Thread Local Storage, improves performance
;; "-Dopencl=true"
;; "-Domx=true"
- "-Dosmesa=gallium"
+ "-Dosmesa=true"
"-Dgallium-xa=enabled"
;; features required by wayland
@@ -417,8 +418,8 @@ also known as DXTn or DXTC) for Mesa.")
(let ((out (assoc-ref outputs "out"))
(bin (assoc-ref outputs "bin")))
;; Not all architectures have the Vulkan overlay control script.
- (mkdir-p (string-append bin "/bin"))
- (call-with-output-file (string-append bin "/bin/.empty")
+ (mkdir-p (string-append out "/bin"))
+ (call-with-output-file (string-append out "/bin/.empty")
(const #t))
(copy-recursively (string-append out "/bin")
(string-append bin "/bin"))
diff --git a/gnu/packages/patches/mesa-skip-tests.patch b/gnu/packages/patches/mesa-skip-tests.patch
index 2622d5d312..8f587ea7ef 100644
--- a/gnu/packages/patches/mesa-skip-tests.patch
+++ b/gnu/packages/patches/mesa-skip-tests.patch
@@ -1,23 +1,3 @@
-disk_cache_create() here looks up the users home directory from <pwd.h>
-which resolves to "/" in the build environment. I could not find an easy
-way to set the home directory to something else, so we disable this test
-for now.
-
---- a/src/compiler/glsl/tests/cache_test.c
-+++ b/src/compiler/glsl/tests/cache_test.c
-@@ -170,11 +170,6 @@
- unsetenv("MESA_GLSL_CACHE_DIR");
- unsetenv("XDG_CACHE_HOME");
-
-- cache = disk_cache_create("test", "make_check", 0);
-- expect_non_null(cache, "disk_cache_create with no environment variables");
--
-- disk_cache_destroy(cache);
--
- /* Test with XDG_CACHE_HOME set */
- setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1);
- cache = disk_cache_create("test", "make_check", 0);
-
This test fails on i686-linux. I couldn't come up with a regex that
could be used to disable it just on i686-linux, so we disable it
completely with this patch:
--
2.32.0
K
K
Kaelyn wrote on 28 Jul 2021 23:35
[PATCH core-updates] gnu: mesa: Update to 21.1.4.
(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
bZbZ9Fi1eUtDj06cHu8cZv1BB-1kxpfHAPPsC3pgdoeGuiu1MPaxxPaT1jz918WnoN7E7ou2zIjHIHlu8qNT6D-u1U-TADNWH5S6kKOojT4=@protonmail.com
Hi,

As a bit of bug-tracking reference, this patch supersedes the 20.3.4 update submitted back in Feb (that judging from the comments didn't land because of a core-updates freeze at the time): https://issues.guix.gnu.org/46672

There are also several older mesa update tickets that are still open but can probably be closed since the main branch has 20.2.4 built against LLVM 11:
* https://issues.guix.gnu.org/44558"Mesa isn't update to date"
* https://issues.guix.gnu.org/44584"[PATCH] Update mesa to 20.2.2"
* https://issues.guix.gnu.org/44585"[PATCH] Update mesa to use LLVM 11"
* https://issues.guix.gnu.org/44586"[PATCH] Mesa updated to 20.2.2 (staging)"

Cheers,
Kaelyn
J
J
John Kehayias wrote on 29 Jul 2021 06:52
[bug#49339] [PATCH core-updates] gnu: mesa: Update to 21.1.6.
(name . 49339@debbugs.gnu.org)(address . 49339@debbugs.gnu.org)
porF62NW175MdklHsQWgYkcwmPEyiXyx4f4jWUpWQ6YT-Xqj1_EqC07KEG9du4rghHlYEbdCouQTZPANbS26EXm241x8fC4_mjBEvIHh65A=@protonmail.com
Noticed that Mesa has had a few quick bug fix releases, here is v3 of the patch now to update Mesa to 21.1.6. I've tested that it builds, and since these are bug fix releases there should be no major changes.

Thanks!
John
gnu: mesa: Update to 21.1.6.

* gnu/packages/gl.scm (mesa): Update to 21.1.6.
* gnu/packages/patches/mesa-skip-tests.patch: Remove cache_test.c as it is no
longer needed (test passes).
---
gnu/packages/gl.scm | 11 ++++++-----
gnu/packages/patches/mesa-skip-tests.patch | 20 --------------------
2 files changed, 6 insertions(+), 25 deletions(-)

Toggle diff (68 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index cc5131b28d..d1a8dc0efa 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Kei Kebreau <kkebreau@posteo.net>
+;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -237,7 +238,7 @@ also known as DXTn or DXTC) for Mesa.")
(define-public mesa
(package
(name "mesa")
- (version "20.2.6")
+ (version "21.1.6")
(source
(origin
(method url-fetch)
@@ -249,7 +250,7 @@ also known as DXTn or DXTC) for Mesa.")
version "/mesa-" version ".tar.xz")))
(sha256
(base32
- "1nw5k2qrlcrp5bljy1lmyybgl525y0h44synkbbirw92qv3a6b7i"))
+ "0dwyk7cxlwna24ap23i8i92a2qcc6xhp16i03zzakpqiz4i03jxi"))
(patches
(search-patches "mesa-skip-tests.patch"))))
(build-system meson-build-system)
@@ -309,7 +310,7 @@ also known as DXTn or DXTC) for Mesa.")
"-Dglx=dri" ;Thread Local Storage, improves performance
;; "-Dopencl=true"
;; "-Domx=true"
- "-Dosmesa=gallium"
+ "-Dosmesa=true"
"-Dgallium-xa=enabled"
;; features required by wayland
@@ -417,8 +418,8 @@ also known as DXTn or DXTC) for Mesa.")
(let ((out (assoc-ref outputs "out"))
(bin (assoc-ref outputs "bin")))
;; Not all architectures have the Vulkan overlay control script.
- (mkdir-p (string-append bin "/bin"))
- (call-with-output-file (string-append bin "/bin/.empty")
+ (mkdir-p (string-append out "/bin"))
+ (call-with-output-file (string-append out "/bin/.empty")
(const #t))
(copy-recursively (string-append out "/bin")
(string-append bin "/bin"))
diff --git a/gnu/packages/patches/mesa-skip-tests.patch b/gnu/packages/patches/mesa-skip-tests.patch
index 2622d5d312..8f587ea7ef 100644
--- a/gnu/packages/patches/mesa-skip-tests.patch
+++ b/gnu/packages/patches/mesa-skip-tests.patch
@@ -1,23 +1,3 @@
-disk_cache_create() here looks up the users home directory from <pwd.h>
-which resolves to "/" in the build environment. I could not find an easy
-way to set the home directory to something else, so we disable this test
-for now.
-
---- a/src/compiler/glsl/tests/cache_test.c
-+++ b/src/compiler/glsl/tests/cache_test.c
-@@ -170,11 +170,6 @@
- unsetenv("MESA_GLSL_CACHE_DIR");
- unsetenv("XDG_CACHE_HOME");
-
-- cache = disk_cache_create("test", "make_check", 0);
-- expect_non_null(cache, "disk_cache_create with no environment variables");
--
-- disk_cache_destroy(cache);
--
- /* Test with XDG_CACHE_HOME set */
- setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1);
- cache = disk_cache_create("test", "make_check", 0);
-
This test fails on i686-linux. I couldn't come up with a regex that
could be used to disable it just on i686-linux, so we disable it
completely with this patch:
--
2.32.0
L
L
Ludovic Courtès wrote on 31 Jul 2021 12:33
Re: bug#49339: [PATCH core-updates] gnu: mesa: Update to 21.1.4.
(name . John Kehayias)(address . john.kehayias@protonmail.com)
87bl6iydq0.fsf_-_@gnu.org
Hi John,

John Kehayias <john.kehayias@protonmail.com> skribis:

Toggle quote (6 lines)
> gnu: mesa: Update to 21.1.6.
>
> * gnu/packages/gl.scm (mesa): Update to 21.1.6.
> * gnu/packages/patches/mesa-skip-tests.patch: Remove cache_test.c as it is no
> longer needed (test passes).

Applied, thanks!

[...]

Toggle quote (3 lines)
> - "-Dosmesa=gallium"
> + "-Dosmesa=true"

Is this expected to change anything feature-wise?

BTW, please generate the patch with ‘git format-patch’ next time; that
makes it easier to apply with ‘git am’.

Ludo’.
Closed
J
J
John Kehayias wrote on 31 Jul 2021 16:01
(name . Ludovic Courtès)(address . ludo@gnu.org)
2fXn5RUIcG4gBJO1RyeQ-k5Xnfdl6mMqC67RPYszH7xWD3xtBDfdHz813xDcz3LDhqJh1_Z3H-KAxGprEn8ambEv0YJOTATB_VRLtsvqvUo=@protonmail.com
Hi Ludo’,

On Saturday, July 31st, 2021 at 6:33 AM, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (14 lines)
> Hi John,
>
> John Kehayias john.kehayias@protonmail.com skribis:
>
> > gnu: mesa: Update to 21.1.6.
> >
> > - gnu/packages/gl.scm (mesa): Update to 21.1.6.
> > - gnu/packages/patches/mesa-skip-tests.patch: Remove cache_test.c as it is no
> >
> > longer needed (test passes).
>
> Applied, thanks!
>

Great, thank you!

Toggle quote (13 lines)
> [...]
>
> > - "-Dosmesa=gallium"
> >
> >
> >
> > - "-Dosmesa=true"
> >
> >
>
> Is this expected to change anything feature-wise?
>

Mesa at v21 removed the software OSMesa driver (see https://www.phoronix.com/scan.php?page=news_item&px=Classic-OSMesa-Retires). We were already using the gallium driver so I think there is no change for us, but the compile flag changed to a boolean: true for what was before gallium, based on my reading of the change https://cgit.freedesktop.org/mesa/mesa/commit/?id=ee802372180a2b4460cc7abb53438e45c6b6f1e4

Toggle quote (5 lines)
> BTW, please generate the patch with ‘git format-patch’ next time; that
>
> makes it easier to apply with ‘git am’.
>

Will do, sorry about that (I think I did do that but may have manually altered the header).

By the way, I'm looking now and see mesa-opencl failing, I'll take a look (perhaps an option change or library location?).

John
Closed
L
L
Ludovic Courtès wrote on 2 Aug 2021 15:27
(name . John Kehayias)(address . john.kehayias@protonmail.com)
87lf5kvuxl.fsf@gnu.org
Hi,

John Kehayias <john.kehayias@protonmail.com> skribis:

Toggle quote (2 lines)
> On Saturday, July 31st, 2021 at 6:33 AM, Ludovic Courtès <ludo@gnu.org> wrote:

[...]

Toggle quote (13 lines)
>> > - "-Dosmesa=gallium"
>> >
>> >
>> >
>> > - "-Dosmesa=true"
>> >
>> >
>>
>> Is this expected to change anything feature-wise?
>>
>
> Mesa at v21 removed the software OSMesa driver (see https://www.phoronix.com/scan.php?page=news_item&px=Classic-OSMesa-Retires ). We were already using the gallium driver so I think there is no change for us, but the compile flag changed to a boolean: true for what was before gallium, based on my reading of the change https://cgit.freedesktop.org/mesa/mesa/commit/?id=ee802372180a2b4460cc7abb53438e45c6b6f1e4

Makes sense, thanks for explaining!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 49339@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 49339
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch