GNU bug report logs - #65155
[PATCH] gnu: mesa: Add native-search-paths.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: dan <i@HIDDEN>; Keywords: patch; dated Tue, 8 Aug 2023 18:10:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 65155 <at> debbugs.gnu.org:


Received: (at 65155) by debbugs.gnu.org; 6 Mar 2024 05:56:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 06 00:56:33 2024
Received: from localhost ([127.0.0.1]:49477 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rhkGX-0008Vs-19
	for submit <at> debbugs.gnu.org; Wed, 06 Mar 2024 00:56:33 -0500
Received: from mail-40134.protonmail.ch ([185.70.40.134]:14619)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <john.kehayias@HIDDEN>) id 1rhkGV-0008Vd-1E
 for 65155 <at> debbugs.gnu.org; Wed, 06 Mar 2024 00:56:31 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1709704554; x=1709963754;
 bh=8+sn1xX3GlBAx4eW8BJZpoOmhFF6vOrHBRgm3rnGstM=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=IkxzWF9uV7YPzfgaNZ69PNpO58sKGgtSEtUiBnHbQUnYN8wRBzfVhwXslKeKAY2Us
 HbvAOWVaLJujCAIPx1PFdF0/ZztIRfM9Nx9JgHLHMBxzoHtGInotV3gnKDFRXREsdG
 Nj0TkB6RtuwSsSJEDJ9TRcJUaGmNqwdCDZThfuD34W2g0mTc6mWSv+IRf1ill3rYFt
 1wZi6kwQMfLUL5O6InIzMQ53XOj5NrbOWcGC57rhHjmx6V1/zw9FdsqqL7bjWMuJQh
 ld6HFsgKLHsTY+1bnIiP328SA0FBbJm0d/WR+aIVQsorNONoFNNDSW5mxI84HkZCUh
 g5WSM8cB4RkYw==
Date: Wed, 06 Mar 2024 05:55:35 +0000
To: David Elsing <david.elsing@HIDDEN>
From: John Kehayias <john.kehayias@HIDDEN>
Subject: Re: [bug#65155] [PATCH] gnu: mesa: Add native-search-paths.
Message-ID: <87r0gn7vl9.fsf@HIDDEN>
In-Reply-To: <86jznanbrf.fsf@HIDDEN>
References: <86jznanbrf.fsf@HIDDEN>
Feedback-ID: 7805494:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65155
Cc: 65155 <at> debbugs.gnu.org, i@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi David and dan,

On Sun, Feb 11, 2024 at 05:36 PM, David Elsing wrote:

> Hello,
>
> John Kehayias <john.kehayias@HIDDEN> writes:
>
>> So perhaps this belongs in vulkan-loader? Although I admit I'm less sure
>> for XDG_* related paths. Is there a test case or something we can see if
>> this does what is intended for vulkan?
>
> I also noticed the same problem and agree that the search path belongs
> in the vulkan-loader package:
>
> diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
> index 285d6be7f5..98ce979652 100644
> --- a/gnu/packages/vulkan.scm
> +++ b/gnu/packages/vulkan.scm
> @@ -303,6 +303,11 @@ (define-public vulkan-loader
>             wayland))
>      (inputs
>       (list vulkan-headers libxrandr))
> +    (native-search-paths
> +     (list
> +      (search-path-specification
> +       (variable "XDG_DATA_DIRS")
> +       (files '("share")))))
>      (home-page
>       "https://github.com/KhronosGroup/Vulkan-Loader")
>      (synopsis "Khronos official ICD loader and validation layers for Vul=
kan")
>

Thanks for the diff, which I also tried.

>
> I tested it with
>
> guix shell -C vulkan-tools vulkan-loader mesa --no-grafts -- vulkaninfo
>
> which works with the patch applied. As documented in [1], vulkan-loader
> still needs to be part of the profile for the search path to take effect.
>
> Cheers,
> David
>
> [1] https://guix.gnu.org/manual/en/html_node/Search-Paths.html

Yes, this also works for me. It is also works on my machine when
dropping "mesa" and the "-C" without this diff; presumably because of
how my environment exists and XDG_DATA_DIRS. Probably in most desktop
setups things already work for Vulkan (or we'd have more bug reports?)
with any typical desktop/graphical packages. Still, this seems like this
should be more explicit like in the above diff for exactly the case of
things like containers or minimal testing environments.

I can apply such a change on mesa-updates soon when I make the other
mesa/vulkan/etc. updates we have pending. Feel free to submit a more
formal patch here so I can credit you as the author, though I should be
able to do the same on my own anyway.

Thanks for the diff and testing!

John





Information forwarded to guix-patches@HIDDEN:
bug#65155; Package guix-patches. Full text available.

Message received at 65155 <at> debbugs.gnu.org:


Received: (at 65155) by debbugs.gnu.org; 11 Feb 2024 17:37:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 11 12:37:28 2024
Received: from localhost ([127.0.0.1]:34314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rZDlg-0000zf-9u
	for submit <at> debbugs.gnu.org; Sun, 11 Feb 2024 12:37:28 -0500
Received: from mout02.posteo.de ([185.67.36.66]:51377)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <david.elsing@HIDDEN>) id 1rZDle-0000zM-Fg
 for 65155 <at> debbugs.gnu.org; Sun, 11 Feb 2024 12:37:27 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id C9505240104
 for <65155 <at> debbugs.gnu.org>; Sun, 11 Feb 2024 18:37:03 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1707673023; bh=6/mGmQnj2T9P51FX7tmYBXxATYeXLMGLjSXsgI13KkA=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=B3VG+iqr40Xblw44NzU1nX5bRkMXr6x9bIjzDLcA/32o1Fm1VCwKIjjO+WGAtKGLS
 t1iPW2LEqxF5sbDqCBPdU5w6OAGnG08QNcrJZwv22JIM4xVTLNFCd6AzMZmMbnw+RS
 C0gWAlnVXS33NvqQrwdlLtUKCDVB78YxHUyR0jW/SMsYlYblThMYfL0/K7Ei/AXu5e
 TKamMec9elgfadQrMjtn4QF0xLaBnlAbYSHTrjAICdYiMob5XkxtRHRcx9+GARou/S
 VYKVCJhJCLfkac9gYdIeQlQJ/xCcvcKzLep+0PsLRtOdBeEDi1AFjIojCZPBS8gcRv
 UZI/pOuUmJkHA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4TXvsp2b4nz6txq;
 Sun, 11 Feb 2024 18:37:02 +0100 (CET)
From: David Elsing <david.elsing@HIDDEN>
To: John Kehayias <john.kehayias@HIDDEN>
Subject: Re: [bug#65155] [PATCH] gnu: mesa: Add native-search-paths.
In-Reply-To: <87msuy8lte.fsf@HIDDEN> (message from John Kehayias on
 Tue, 28 Nov 2023 05:54:25 +0000)
Date: Sun, 11 Feb 2024 17:36:52 +0000
Message-ID: <86jznanbrf.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65155
Cc: 65155 <at> debbugs.gnu.org, i@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

John Kehayias <john.kehayias@HIDDEN> writes:

> So perhaps this belongs in vulkan-loader? Although I admit I'm less sure
> for XDG_* related paths. Is there a test case or something we can see if
> this does what is intended for vulkan?

I also noticed the same problem and agree that the search path belongs
in the vulkan-loader package:

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 285d6be7f5..98ce979652 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -303,6 +303,11 @@ (define-public vulkan-loader
            wayland))
     (inputs
      (list vulkan-headers libxrandr))
+    (native-search-paths
+     (list
+      (search-path-specification
+       (variable "XDG_DATA_DIRS")
+       (files '("share")))))
     (home-page
      "https://github.com/KhronosGroup/Vulkan-Loader")
     (synopsis "Khronos official ICD loader and validation layers for Vulkan")
--8<---------------cut here---------------end--------------->8---

I tested it with
--8<---------------cut here---------------start------------->8---
guix shell -C vulkan-tools vulkan-loader mesa --no-grafts -- vulkaninfo
--8<---------------cut here---------------end--------------->8---
which works with the patch applied. As documented in [1], vulkan-loader
still needs to be part of the profile for the search path to take effect.

Cheers,
David

[1] https://guix.gnu.org/manual/en/html_node/Search-Paths.html




Information forwarded to guix-patches@HIDDEN:
bug#65155; Package guix-patches. Full text available.

Message received at 65155 <at> debbugs.gnu.org:


Received: (at 65155) by debbugs.gnu.org; 28 Nov 2023 05:54:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 28 00:54:45 2023
Received: from localhost ([127.0.0.1]:45339 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r7r3V-0008MC-Ab
	for submit <at> debbugs.gnu.org; Tue, 28 Nov 2023 00:54:45 -0500
Received: from mail-4322.protonmail.ch ([185.70.43.22]:37359)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <john.kehayias@HIDDEN>) id 1r7r3S-0008Lu-UU
 for 65155 <at> debbugs.gnu.org; Tue, 28 Nov 2023 00:54:43 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1701150870; x=1701410070;
 bh=oOLc8+afqSROYbddsdsLo5ZAEbL2QhUBXyXy+4txSVM=;
 h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:
 Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector;
 b=G14EJEcPhCRAlyZUxpnOh85nFpr02rcKEnj41XHmO6+POoDq3Rf6LLm7+PisMc859
 HiTwALfvBXGeHKkFRmxzRyqdkGCYSqD5MAuBjhPD9NrrS/0AuvmoKk31bUSvzWEkNJ
 vdVJZ7yWPIgkh17I+7QqH20Q4R2p/1DjRtgvepxL0XWJlD7bkQbdlcBVx/Vbe3mRaa
 t2KerVwavdCcJ0yH/l4ARLpBp1/jbkDDIhuttZJ5eq7/GBp0gx9elXYsYBXC7hZaC7
 ZBfYtwTbckmuv1ZgncnsF4np7lvutA9VOBcsOsaXfHkkN0uKY8gt8az7ukFrhExptb
 q/LkcRdgb71fg==
Date: Tue, 28 Nov 2023 05:54:25 +0000
To: dan <i@HIDDEN>
From: John Kehayias <john.kehayias@HIDDEN>
Subject: Re: [bug#65155] [PATCH] gnu: mesa: Add native-search-paths.
Message-ID: <87msuy8lte.fsf@HIDDEN>
Feedback-ID: 7805494:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65155
Cc: 65155 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Sorry for the long overdue reply here.

On Wed, Aug 09, 2023 at 02:08 AM, dan wrote:

> * gnu/packages/gl.scm (mesa) [native-search-paths]: Export XDG_DATA_DIRS.
>
> According to
> https://vulkan.lunarg.com/doc/view/1.3.231.1/linux/loader_and_layer_inter=
face.html,
> Vulkan loader search for manifest files in several directories.  Some of =
them
> are in the $HOME directory, some of them are set during compile-time.  We
> don't raelly want vulkan-loader to depend on mesa during compile-time, si=
nce
> we couldn't assume that mesa is the only package providing Vulkan drivers=
.
> Thus, it's better for us to export XDG_DATA_DIRS in mesa, so that when bo=
th
> packages are installed, Vulkan loader could find the corresponding Vulkan
> drivers by environment varaible.
>

I'm not sure if this patch does what you intend. A search-path is
defined in the package that consumes the path, meaning the package that
looks there for something. The environment variable is then set whenever
there is package also in the profile that populates the specified
directory.

So perhaps this belongs in vulkan-loader? Although I admit I'm less sure
for XDG_* related paths. Is there a test case or something we can see if
this does what is intended for vulkan?

(This did not make it into the just merged mesa-updates but happy to do
it on the next round, which could also include changes to vulkan
packages if they need a branch.)

Apologies for the wait on this one, since I had looked at it a while
ago!

John

> ---
>  gnu/packages/gl.scm | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
> index b53b42a9ba..583cd5a945 100644
> --- a/gnu/packages/gl.scm
> +++ b/gnu/packages/gl.scm
> @@ -18,6 +18,7 @@
>  ;;; Copyright =C2=A9 2021, 2022, 2023 John Kehayias <john.kehayias@proto=
nmail.com>
>  ;;; Copyright =C2=A9 2022 Petr Hodina <phodina@HIDDEN>
>  ;;; Copyright =C2=A9 2023 Kaelyn Takata <kaelyn.alexi@HIDDEN>
> +;;; Copyright =C2=A9 2023 dan <i@HIDDEN>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -518,7 +519,11 @@ (define-public mesa
>              ;; Ensure the Mesa VDPAU drivers can be found.
>              (variable "VDPAU_DRIVER_PATH")
>              (separator #f)
> -            (files '("lib/vdpau")))))
> +            (files '("lib/vdpau")))
> +           (search-path-specification
> +            ;; Ensure the Vulkan drivers can be found by Vulkan loader.
> +            (variable "XDG_DATA_DIRS")
> +            (files '("share")))))
>      (home-page "https://mesa3d.org/")
>      (synopsis "OpenGL and Vulkan implementations")
>      (description "Mesa is a free implementation of the OpenGL and Vulkan
>
> base-commit: 4547bc6fa3142dca77f7fc912368aeff31bd6e53





Information forwarded to guix-patches@HIDDEN:
bug#65155; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Aug 2023 18:09:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 08 14:09:10 2023
Received: from localhost ([127.0.0.1]:37750 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qTR8o-00089n-6T
	for submit <at> debbugs.gnu.org; Tue, 08 Aug 2023 14:09:10 -0400
Received: from lists.gnu.org ([2001:470:142::17]:44826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <i@HIDDEN>) id 1qTR8l-00089b-SG
 for submit <at> debbugs.gnu.org; Tue, 08 Aug 2023 14:09:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <i@HIDDEN>) id 1qTR8g-0004oH-Fi
 for guix-patches@HIDDEN; Tue, 08 Aug 2023 14:09:02 -0400
Received: from out2-smtp.messagingengine.com ([66.111.4.26])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <i@HIDDEN>) id 1qTR8e-0003ad-IT
 for guix-patches@HIDDEN; Tue, 08 Aug 2023 14:09:02 -0400
Received: from compute6.internal (compute6.nyi.internal [10.202.2.47])
 by mailout.nyi.internal (Postfix) with ESMTP id 88A275C0085
 for <guix-patches@HIDDEN>; Tue,  8 Aug 2023 14:08:58 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute6.internal (MEProxy); Tue, 08 Aug 2023 14:08:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dan.games; h=cc
 :content-transfer-encoding:content-type:content-type:date:date
 :from:from:in-reply-to:message-id:mime-version:reply-to:sender
 :subject:subject:to:to; s=fm1; t=1691518138; x=1691604538; bh=gA
 uIjpJp/Qlao6ix71VyWHxSYueDrKgdvxQLNpeqWj0=; b=bHjLcv0vIuyy//CVQt
 yhXVKVtl9p8nxbit35x+F06p5iLDdZpRf26JPRWTlMLpcjTP2I3KhOedyKFyheaY
 B12Jb42pDsdHRfdX2ZSGBLcgRkZAJWD6v3s0LqP9bNwxOltTgmkFigqwyzir5esO
 qmxoxBorUynuwTnVtxsfvfIW3VU5msxbpsSCD3XGiqnFsv0vNp7nzvG8lmV7y+DO
 Z7Rp7TKul6mo28eBcv0xrmMe7jvZS1YT7xnrxNtDnRiAgVlXOV5A0QkWz5SOVMr5
 UK8VnFVWuxPPmfxpL5sKkaQNHfmyBEuJ3AchV0iYkz5CRjqEUX8YiuJwhWtEYlHp
 zVkw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :content-type:date:date:feedback-id:feedback-id:from:from
 :in-reply-to:message-id:mime-version:reply-to:sender:subject
 :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm3; t=1691518138; x=1691604538; bh=gAuIjpJp/Qlao
 6ix71VyWHxSYueDrKgdvxQLNpeqWj0=; b=x4b3nLJe2zoCLg8o/dLUMjcBzFr4B
 ViEB9eclGt7PwDtc03EisXNooXmSACIYXp2U1xk62i8O3bKE1ZZAq5jw4Ek0qPOP
 KwgTDTvy8VjO7Tf1ZfFiOGPSBIu/pCRumhPkcG/AxjlQHILgoxVqLyZfrIsmCrgR
 +hDrrcIBFqvtpCfXy4mI6EodkIn/ZH5lMA0izOhUcc43NgKPYdHu320XTVINwGeT
 r4EdoYxGhC7bZFxPrIay+W0DuX9uD2mHnvr22v4PbIzjfYQ/L9es1afvCm/3xACG
 TXWwmVF+d5MVXkRKo2nlOuc68kEIuAJjrazfT0Euyo40ZYyFV6T09MZew==
X-ME-Sender: <xms:uoTSZEsuo_Hq-qV_jElhCPa5bkFTE07tr1vhbWhmxv15-hZDpxsWWQ>
 <xme:uoTSZBc0LH0FYtvL2fcg3tUQh0Y1HWOChMdd_t6QPpCKCuSy-kAsdZmoTRCBz6mEA
 U9jHvjD60dRxTYgauk>
X-ME-Received: <xmr:uoTSZPwvM_EVZdA0XlFw5pL1AxIdaWklBrOn4C5Xq1Der23Ty3kWGRwCLZEJpmFrj_XQUfBqVuJ3>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrledvgdduvddtucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofggtgfgsehtkeertd
 ertdejnecuhfhrohhmpegurghnuceoihesuggrnhdrghgrmhgvsheqnecuggftrfgrthht
 vghrnhepgefhueehteevkeeihffggeefudehhfeujefhteefvddvieeigefhudekkeekhf
 elnecuffhomhgrihhnpehluhhnrghrghdrtghomhdpmhgvshgrfegurdhorhhgnecuvehl
 uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihesuggrnhdrgh
 grmhgvsh
X-ME-Proxy: <xmx:uoTSZHNCG7kWue7LYHHQwTEcYgkFXazms26CsvCDkJCNJ493ZnhXhw>
 <xmx:uoTSZE9hlob-nCv7PGuCZtJEgssDYRPhCrXLqGyc3Po_QiKfsg-ojQ>
 <xmx:uoTSZPUELyEipc9ORVnsV_BYcvfGPPZ1AgxaPJhHHD_Mbf4LChgkiA>
 <xmx:uoTSZNIyJNcLYlTgYdOFDs5gpScTbU2j-n1vGHZr97HZaicA4s4_0A>
Feedback-ID: i3b5946ed:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA for
 <guix-patches@HIDDEN>; Tue, 8 Aug 2023 14:08:57 -0400 (EDT)
From: dan <i@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: mesa: Add native-search-paths.
Date: Wed,  9 Aug 2023 02:08:49 +0800
Message-ID: <20230808180851.32652-1-i@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=66.111.4.26; envelope-from=i@HIDDEN;
 helo=out2-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* gnu/packages/gl.scm (mesa) [native-search-paths]: Export XDG_DATA_DIRS.

According to
https://vulkan.lunarg.com/doc/view/1.3.231.1/linux/loader_and_layer_interface.html,
Vulkan loader search for manifest files in several directories.  Some of them
are in the $HOME directory, some of them are set during compile-time.  We
don't raelly want vulkan-loader to depend on mesa during compile-time, since
we couldn't assume that mesa is the only package providing Vulkan drivers.
Thus, it's better for us to export XDG_DATA_DIRS in mesa, so that when both
packages are installed, Vulkan loader could find the corresponding Vulkan
drivers by environment varaible.

---
 gnu/packages/gl.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index b53b42a9ba..583cd5a945 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -18,6 +18,7 @@
 ;;; Copyright © 2021, 2022, 2023 John Kehayias <john.kehayias@HIDDEN>
 ;;; Copyright © 2022 Petr Hodina <phodina@HIDDEN>
 ;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@HIDDEN>
+;;; Copyright © 2023 dan <i@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -518,7 +519,11 @@ (define-public mesa
             ;; Ensure the Mesa VDPAU drivers can be found.
             (variable "VDPAU_DRIVER_PATH")
             (separator #f)
-            (files '("lib/vdpau")))))
+            (files '("lib/vdpau")))
+           (search-path-specification
+            ;; Ensure the Vulkan drivers can be found by Vulkan loader.
+            (variable "XDG_DATA_DIRS")
+            (files '("share")))))
     (home-page "https://mesa3d.org/")
     (synopsis "OpenGL and Vulkan implementations")
     (description "Mesa is a free implementation of the OpenGL and Vulkan

base-commit: 4547bc6fa3142dca77f7fc912368aeff31bd6e53
-- 
2.41.0





Acknowledgement sent to dan <i@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#65155; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 6 Mar 2024 06:00:01 UTC

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