GNU bug report logs - #58887
[PATCH][staging] gnu: vulkan-loader: Add native-search-paths field.

Previous Next

Package: guix-patches;

Reported by: Hilton Chain <hako <at> ultrarare.space>

Date: Sun, 30 Oct 2022 05:43:01 UTC

Severity: normal

Tags: patch

Done: Hilton Chain <hako <at> ultrarare.space>

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 58887 in the body.
You can then email your comments to 58887 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#58887; Package guix-patches. (Sun, 30 Oct 2022 05:43:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hilton Chain <hako <at> ultrarare.space>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 30 Oct 2022 05:43:01 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: guix-patches <at> gnu.org
Subject: [PATCH][staging] gnu: vulkan-loader: Add native-search-paths field.
Date: Sun, 30 Oct 2022 13:41:38 +0800
* gnu/packages/vulkan.scm (vulkan-loader): Add native-search-paths field.
[source]: Change ICD and implicit layers looking up behaviour via snippet.
---
 gnu/packages/vulkan.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index f5c619a2b2..1371860583 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -215,6 +215,22 @@ (define-public vulkan-loader
              (url "https://github.com/KhronosGroup/Vulkan-Loader")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
+       (modules '((guix build utils)))
+       (snippet
+        '(substitute* "loader/loader.c"
+           ;; v1.3.207-
+           (("VK_ICD_FILENAMES_ENV_VAR, NULL")
+            "\"VK_ICD_PATH\", override_paths")
+           (("false, NULL, NULL")
+            "false, \"VK_ILAYER_PATH\", override_paths")
+           ;; v1.3.207+
+           (("VK_ICD_FILENAMES_ENV_VAR")
+            "\"VK_ICD_PATH\"")
+           (("relative_location = VK_ILAYERS_INFO_RELATIVE_DIR;" all)
+            (string-append "override_env = loader_secure_getenv"
+                           "(\"VK_ILAYER_PATH\", inst);" all))
+           (("\\(IMPLICIT_LAYER, \\)NULL" m)
+            (string-append m "override_paths"))))
        (sha256
         (base32
          "15gx9ab6w1sjq9hkpbas7z2f8f47j6mlln6p3w26qmydjj8gfjjv"))))
@@ -251,6 +267,13 @@ (define-public vulkan-loader
        ("wayland" ,wayland)))
     (inputs
      (list vulkan-headers))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "VK_ICD_PATH")
+            (files '("share/vulkan/icd.d")))
+           (search-path-specification
+            (variable "VK_ILAYER_PATH")
+            (files '("share/vulkan/implicit_layer.d")))))
     (home-page
      "https://github.com/KhronosGroup/Vulkan-Loader")
     (synopsis "Khronos official ICD loader and validation layers for Vulkan")

base-commit: 63bf06013820aa26aca7dc8f18cb79403b94e9a5
-- 
2.38.0





Information forwarded to guix-patches <at> gnu.org:
bug#58887; Package guix-patches. (Thu, 01 Dec 2022 15:50:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Hilton Chain <hako <at> ultrarare.space>
Cc: 58887 <at> debbugs.gnu.org
Subject: Re: bug#58887: [PATCH][staging] gnu: vulkan-loader: Add
 native-search-paths field.
Date: Thu, 01 Dec 2022 16:49:37 +0100
Hi,

Hilton Chain <hako <at> ultrarare.space> skribis:

> * gnu/packages/vulkan.scm (vulkan-loader): Add native-search-paths field.
> [source]: Change ICD and implicit layers looking up behaviour via snippet.

One comment:

[...]

> +    (native-search-paths
> +     (list (search-path-specification
> +            (variable "VK_ICD_PATH")
> +            (files '("share/vulkan/icd.d")))
> +           (search-path-specification
> +            (variable "VK_ILAYER_PATH")
> +            (files '("share/vulkan/implicit_layer.d")))))

Should these read “lib” rather than “share”, given that they contain
binaries if I’m not mistaken?

Should it be versioned too, like “lib/vulkan/3.0/icd.d”?

Other than that it LGTM.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#58887; Package guix-patches. (Fri, 23 Dec 2022 07:54:02 GMT) Full text and rfc822 format available.

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

From: Hilton Chain <hako <at> ultrarare.space>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 58887 <at> debbugs.gnu.org
Subject: Re: bug#58887: [PATCH][staging] gnu: vulkan-loader: Add
 native-search-paths field.
Date: Fri, 23 Dec 2022 15:53:36 +0800
Hi Ludo,

> Should these read “lib” rather than “share”, given that they contain
> binaries if I’m not mistaken?

Actually they don't contain binaries, they are configuration files.

FYI, you can take a look at "$(guix build mesa)/share/vulkan/".

As it's been some time since I submitted the patch, I'll dive into the docs again to find out if
adjustments are needed.

Thanks!




Information forwarded to guix-patches <at> gnu.org:
bug#58887; Package guix-patches. (Sun, 18 Jun 2023 16:32:01 GMT) Full text and rfc822 format available.

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

From: Kaelyn <kaelyn.alexi <at> protonmail.com>
To: "58887 <at> debbugs.gnu.org" <58887 <at> debbugs.gnu.org>
Subject: Re: [PATCH][staging] gnu: vulkan-loader: Add native-search-paths
 field.
Date: Sun, 18 Jun 2023 16:31:25 +0000
While the original patch description doesn't mention why the native-search-paths variables and associated snippet are needed, if they are to fix error messages like:


  !! validation layer: libVkLayer_MESA_device_select.so: cannot open shared object file: No such file or directory

when running Vulkan programs including vulkaninfo, then this issue can be closed. Commit 61a326442442f9b09911d35b3a3a48cf5335d7d7 fixed the remaining Vulkan layer manifest files to include the full paths to the shared libraries, which resolved the error messages like the one above about not finding the shared object files for layers without introducing new environment variables.




Reply sent to Hilton Chain <hako <at> ultrarare.space>:
You have taken responsibility. (Mon, 19 Jun 2023 06:15:02 GMT) Full text and rfc822 format available.

Notification sent to Hilton Chain <hako <at> ultrarare.space>:
bug acknowledged by developer. (Mon, 19 Jun 2023 06:15:02 GMT) Full text and rfc822 format available.

Message #19 received at 58887-close <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Kaelyn <kaelyn.alexi <at> protonmail.com>
Cc: 58887-close <at> debbugs.gnu.org
Subject: Re: [bug#58887] [PATCH][staging] gnu: vulkan-loader: Add
 native-search-paths field.
Date: Mon, 19 Jun 2023 14:14:44 +0800
On Mon, 19 Jun 2023 00:31:25 +0800,
Kaelyn via Guix-patches via wrote:
> 
> While the original patch description doesn't mention why the native-search-paths variables and associated snippet are needed, if they are to fix error messages like:
> 
> 
>   !! validation layer: libVkLayer_MESA_device_select.so: cannot open shared object file: No such file or directory
> 
> when running Vulkan programs including vulkaninfo, then this issue can be closed. Commit 61a326442442f9b09911d35b3a3a48cf5335d7d7 fixed the remaining Vulkan layer manifest files to include the full paths to the shared libraries, which resolved the error messages like the one above about not finding the shared object files for layers without introducing new environment variables.

Thank you!




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:12 GMT) Full text and rfc822 format available.

This bug report was last modified 273 days ago.

Previous Next


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