GNU bug report logs - #59453
[PATCH core-updates] gnu: mesa: Fix library paths in Vulkan layer manifests.

Previous Next

Package: guix-patches;

Reported by: Kaelyn Takata <kaelyn.alexi <at> protonmail.com>

Date: Mon, 21 Nov 2022 19:11:01 UTC

Severity: normal

Tags: patch

Done: Kaelyn <kaelyn.alexi <at> protonmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59453 in the body.
You can then email your comments to 59453 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#59453; Package guix-patches. (Mon, 21 Nov 2022 19:11:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kaelyn Takata <kaelyn.alexi <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 21 Nov 2022 19:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kaelyn Takata <kaelyn.alexi <at> protonmail.com>
To: guix-patches <at> gnu.org
Cc: Kaelyn Takata <kaelyn.alexi <at> protonmail.com>
Subject: [PATCH core-updates] gnu: mesa: Fix library paths in Vulkan layer
 manifests.
Date: Mon, 21 Nov 2022 19:09:52 +0000
* gnu/packages/gl.scm (mesa): Fix library paths in Vulkan layer manifests.
---
 gnu/packages/gl.scm | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index dd62fac13e..c26a51cb32 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -488,7 +488,28 @@ (define-public mesa
                                                        file)
                                               (symlink reference file)))
                                         others))))
-                         (delete-duplicates inodes))))))))
+                         (delete-duplicates inodes)))))
+         (add-after 'install 'set-layer-path-in-manifests
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (implicit-path (string-append
+                                    out
+                                    "/share/vulkan/implicit_layer.d/"))
+                    (explicit-path (string-append
+                                    out
+                                    "/share/vulkan/explicit_layer.d/"))
+                    (fix-layer-path
+                     (lambda (layer-name)
+                       (let* ((explicit (string-append explicit-path layer-name ".json"))
+                              (implicit (string-append implicit-path layer-name ".json"))
+                              (manifest (if (file-exists? explicit)
+                                            explicit
+                                            implicit)))
+                         (substitute* manifest
+                           (((string-append "\"lib" layer-name ".so\""))
+                             (string-append "\"" out "/lib/lib" layer-name ".so\"")))))))
+               (for-each fix-layer-path '("VkLayer_MESA_device_select"
+                                          "VkLayer_MESA_overlay"))))))))
     (home-page "https://mesa3d.org/")
     (synopsis "OpenGL and Vulkan implementations")
     (description "Mesa is a free implementation of the OpenGL and Vulkan

base-commit: affaacf4f46639dcc8239a438cad11c2a6ef6c9a
--
2.38.1






Information forwarded to guix-patches <at> gnu.org:
bug#59453; Package guix-patches. (Sat, 21 Jan 2023 15:42:01 GMT) Full text and rfc822 format available.

Message #8 received at 59453 <at> debbugs.gnu.org (full text, mbox):

From: Kaelyn <kaelyn.alexi <at> protonmail.com>
To: guix-devel <guix-devel <at> gnu.org>
Cc: "59453 <at> debbugs.gnu.org" <59453 <at> debbugs.gnu.org>
Subject: [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in
 Vulkan layer manifests.
Date: Sat, 21 Jan 2023 15:41:42 +0000
Hi Guix devs,

Now that it's been a couple of months, I wanted to bump my core-updates patch to Mesa which fixes the library paths in Mesa's Vulkan layer manifest files (https://issues.guix.gnu.org/59453). The patch also resolves https://issues.guix.gnu.org/58251.

Cheers,
Kaelyn




Information forwarded to guix-patches <at> gnu.org:
bug#59453; Package guix-patches. (Sat, 21 Jan 2023 16:17:02 GMT) Full text and rfc822 format available.

Message #11 received at 59453 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: Kaelyn Takata <kaelyn.alexi <at> protonmail.com>
Cc: 59453 <at> debbugs.gnu.org
Subject: Re: [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in
 Vulkan layer manifests.
Date: Sat, 21 Jan 2023 16:16:28 +0000
On 2022-11-21 19:09, Kaelyn Takata via Guix-patches via wrote:
> * gnu/packages/gl.scm (mesa): Fix library paths in Vulkan layer manifests.
> ---
>  gnu/packages/gl.scm | 23 ++++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
> index dd62fac13e..c26a51cb32 100644
> --- a/gnu/packages/gl.scm
> +++ b/gnu/packages/gl.scm
> @@ -488,7 +488,28 @@ (define-public mesa
>                                                         file)
>                                                (symlink reference file)))
>                                          others))))
> -                         (delete-duplicates inodes))))))))
> +                         (delete-duplicates inodes)))))
> +         (add-after 'install 'set-layer-path-in-manifests
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))

Using G-Expressions would be better here, since you're modifying this package,
you could take the opportunity to modernize/rewrite this package definition using G-Expressions.
(Keep the rewrite and this fix in separate commits)

> +                    (implicit-path (string-append
> +                                    out
> +                                    "/share/vulkan/implicit_layer.d/"))
> +                    (explicit-path (string-append
> +                                    out
> +                                    "/share/vulkan/explicit_layer.d/"))
> +                    (fix-layer-path
> +                     (lambda (layer-name)
> +                       (let* ((explicit (string-append explicit-path layer-name ".json"))
> +                              (implicit (string-append implicit-path layer-name ".json"))
> +                              (manifest (if (file-exists? explicit)
> +                                            explicit
> +                                            implicit)))
> +                         (substitute* manifest
> +                           (((string-append "\"lib" layer-name ".so\""))
> +                             (string-append "\"" out "/lib/lib" layer-name ".so\"")))))))
> +               (for-each fix-layer-path '("VkLayer_MESA_device_select"
> +                                          "VkLayer_MESA_overlay"))))))))
>      (home-page "https://mesa3d.org/")
>      (synopsis "OpenGL and Vulkan implementations")
>      (description "Mesa is a free implementation of the OpenGL and Vulkan
> 
> base-commit: affaacf4f46639dcc8239a438cad11c2a6ef6c9a
> --
> 2.38.1
> 
> 
> 
> 
> 





Information forwarded to guix-patches <at> gnu.org:
bug#59453; Package guix-patches. (Sun, 12 Feb 2023 18:22:01 GMT) Full text and rfc822 format available.

Message #14 received at 59453 <at> debbugs.gnu.org (full text, mbox):

From: Kaelyn <kaelyn.alexi <at> protonmail.com>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 59453 <at> debbugs.gnu.org
Subject: Re: [bug#59453] [PATCH core-updates] gnu: mesa: Fix library paths in
 Vulkan layer manifests.
Date: Sun, 12 Feb 2023 18:20:49 +0000
------- Original Message -------
On Saturday, January 21st, 2023 at 4:16 PM, Bruno Victal <mirai <at> makinata.eu> wrote:

>
> On 2022-11-21 19:09, Kaelyn Takata via Guix-patches via wrote:
>
> > * gnu/packages/gl.scm (mesa): Fix library paths in Vulkan layer manifests.
> > ---
> > gnu/packages/gl.scm | 23 ++++++++++++++++++++++-
> > 1 file changed, 22 insertions(+), 1 deletion(-)
> >
> > diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
> > index dd62fac13e..c26a51cb32 100644
> > --- a/gnu/packages/gl.scm
> > +++ b/gnu/packages/gl.scm
> > @@ -488,7 +488,28 @@ (define-public mesa
> > file)
> > (symlink reference file)))
> > others))))
> > - (delete-duplicates inodes))))))))
> > + (delete-duplicates inodes)))))
> > + (add-after 'install 'set-layer-path-in-manifests
> > + (lambda* (#:key outputs #:allow-other-keys)
> > + (let* ((out (assoc-ref outputs "out"))
>
>
> Using G-Expressions would be better here, since you're modifying this package,
> you could take the opportunity to modernize/rewrite this package definition using G-Expressions.
> (Keep the rewrite and this fix in separate commits)

Given the complexity of the mesa package definition including the numerous matches on %current-system, I'm not confident or comfortable in my ability to rewrite mesa's package-arguments to use gexps. I certainly don't want to delay fixing the Vulkan layer library paths on core-updates packages even longer than it already has been trying to rewrite a complex core package.

Cheers,
Kaelyn

>
> > + (implicit-path (string-append
> > + out
> > + "/share/vulkan/implicit_layer.d/"))
> > + (explicit-path (string-append
> > + out
> > + "/share/vulkan/explicit_layer.d/"))
> > + (fix-layer-path
> > + (lambda (layer-name)
> > + (let* ((explicit (string-append explicit-path layer-name ".json"))
> > + (implicit (string-append implicit-path layer-name ".json"))
> > + (manifest (if (file-exists? explicit)
> > + explicit
> > + implicit)))
> > + (substitute* manifest
> > + (((string-append "\"lib" layer-name ".so\""))
> > + (string-append "\"" out "/lib/lib" layer-name ".so\"")))))))
> > + (for-each fix-layer-path '("VkLayer_MESA_device_select"
> > + "VkLayer_MESA_overlay"))))))))
> > (home-page "https://mesa3d.org/")
> > (synopsis "OpenGL and Vulkan implementations")
> > (description "Mesa is a free implementation of the OpenGL and Vulkan
> >
> > base-commit: affaacf4f46639dcc8239a438cad11c2a6ef6c9a
> > --
> > 2.38.1




Information forwarded to guix-patches <at> gnu.org:
bug#59453; Package guix-patches. (Wed, 19 Apr 2023 14:43:02 GMT) Full text and rfc822 format available.

Message #17 received at 59453 <at> debbugs.gnu.org (full text, mbox):

From: Kaelyn <kaelyn.alexi <at> protonmail.com>
To: guix-devel <guix-devel <at> gnu.org>, Andreas Enge <andreas <at> enge.fr>
Cc: "59453 <at> debbugs.gnu.org" <59453 <at> debbugs.gnu.org>
Subject: Mesa vulkan layer path fix for core-updates
Date: Wed, 19 Apr 2023 14:41:57 +0000
Hi,

Some time back I mailed in https://issues.guix.gnu.org/59453 to fix an issue with the manifests for the vulkan layers that ship with mesa. Basically the error is that the manifests don't include the store path to the referenced libraries, only the file name. An example the error can be seen by running "vulkaninfo &| less", where this message is printed a few times:

ERROR: [Loader Message] Code 0 : libVkLayer_MESA_device_select.so: cannot open shared object file: No such file or directory


While I know it is late in the process of preparing core-updates for merging into master, I wanted to ask if it would be possible to have the patch addressed prior to the merge? I just encountered the error message again after having a need to check vulkaninfo and it reminded me of the patch. (The vulkan-validationlayers package that was recently merged to master from staging includes a similar phase for fixing the layer object path in its layer manifest.)

Thanks,
Kaelyn




Information forwarded to guix-patches <at> gnu.org:
bug#59453; Package guix-patches. (Wed, 19 Apr 2023 15:27:01 GMT) Full text and rfc822 format available.

Message #20 received at 59453 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: Kaelyn <kaelyn.alexi <at> protonmail.com>
Cc: guix-devel <guix-devel <at> gnu.org>,
 "59453 <at> debbugs.gnu.org" <59453 <at> debbugs.gnu.org>
Subject: Re: Mesa vulkan layer path fix for core-updates
Date: Wed, 19 Apr 2023 17:26:44 +0200
Hello,

thanks for bringing this back to our attention!

Am Wed, Apr 19, 2023 at 02:41:57PM +0000 schrieb Kaelyn:
> While I know it is late in the process of preparing core-updates for merging into master, I wanted to ask if it would be possible to have the patch addressed prior to the merge?

Given how many packages depend on mesa and their importance, I think it
would be safer to postpone the fix until after the merge; be it in a
dedicated mesa feature branch that could quickly be merged afterwards,
or better yet regroup other changes in this area. (Searching for open mesa
packages on issues.guix.gnu.org returns quite a few matches, this could be
a good occasion to sort them out.)

Andreas





bug closed, send any further explanations to 59453 <at> debbugs.gnu.org and Kaelyn Takata <kaelyn.alexi <at> protonmail.com> Request was from Kaelyn <kaelyn.alexi <at> protonmail.com> to control <at> debbugs.gnu.org. (Sun, 18 Jun 2023 16:16:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Jul 2023 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.