Message ID | 0f2a806ee6259147a098e8d672d03ed768fde5fa.1716370579.git.sughosha@disroot.org |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0FF4D27BBE9; Wed, 22 May 2024 10:41:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0338227BBE2 for <patchwork@mira.cbaines.net>; Wed, 22 May 2024 10:41:11 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1s9iSz-0007Su-UP; Wed, 22 May 2024 05:41:01 -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 <Debian-debbugs@debbugs.gnu.org>) id 1s9iSv-0007SC-7G for guix-patches@gnu.org; Wed, 22 May 2024 05:40:57 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1s9iSu-0007ls-VR for guix-patches@gnu.org; Wed, 22 May 2024 05:40:56 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1s9iT0-0000MW-A7 for guix-patches@gnu.org; Wed, 22 May 2024 05:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71109] [PATCH] gnu: vulkan-tools: Wrap binaries with LD_LIBRARY_PATH. Resent-From: Sughosha <sughosha@disroot.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 May 2024 09:41:02 +0000 Resent-Message-ID: <handler.71109.B.17163708161376@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71109 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71109@debbugs.gnu.org Cc: Sughosha <sughosha@disroot.org> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17163708161376 (code B ref -1); Wed, 22 May 2024 09:41:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 May 2024 09:40:16 +0000 Received: from localhost ([127.0.0.1]:54660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1s9iSG-0000M8-Gb for submit@debbugs.gnu.org; Wed, 22 May 2024 05:40:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:34872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <sughosha@disroot.org>) id 1s9iSD-0000M2-5o for submit@debbugs.gnu.org; Wed, 22 May 2024 05:40:15 -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 <sughosha@disroot.org>) id 1s9iQ0-0006dD-O5 for guix-patches@gnu.org; Wed, 22 May 2024 05:37:56 -0400 Received: from layka.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <sughosha@disroot.org>) id 1s9iPy-0007IF-K1 for guix-patches@gnu.org; Wed, 22 May 2024 05:37:56 -0400 X-Virus-Scanned: SPAM Filter at disroot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1716370670; bh=DWDaA1PQfAVzkHq/qB4nBH9HYn2aM4W9/YRc3RZnHig=; h=From:To:Cc:Subject:Date; b=VKl3J8JPWdESZD6LSTZVbJTtMLASI8UjgJogxNNav27vwQJwVal0MKvjkCdELmXym lSAEsgf3q2qELlXJmYeLwQKYr5hmb5LA9PKX0ZN48uga5cjwDvA2zQ3oV6cPUNjbyl L7C6dxvI5gQi2JBZ4M19of4nbmqb9adMMVcTaWMmV0BjpdssiPS3pRB+O9i71aiKmL Ihra74ZR2f3A4JARVL2o7uX5bxhsdoSXTqn+1K3D4dS8WCORZxzP62MpKV2tgz6ktT XQmzrQALD2este7vQ2XUzj73anxrUZzzdRQCcvihCoRxiXnVQExdtu3dqxg0OvRpPs X19u9cuTWWdaw== Date: Wed, 22 May 2024 15:06:19 +0530 Message-ID: <0f2a806ee6259147a098e8d672d03ed768fde5fa.1716370579.git.sughosha@disroot.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.21.23.139; envelope-from=sughosha@disroot.org; helo=layka.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Reply-to: Sughosha <sughosha@disroot.org> X-ACL-Warn: , Sughosha via Guix-patches <guix-patches@gnu.org> From: Sughosha via Guix-patches via <guix-patches@gnu.org> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#71109] gnu: vulkan-tools: Wrap binaries with LD_LIBRARY_PATH.
|
|
Commit Message
Sughosha
May 22, 2024, 9:36 a.m. UTC
This fixes not finding vulkan-loader. * gnu/packages/vulkan.scm (vulkan-tools)[arguments]<#:phases>: Wrap-binaries with LD_LIBRARY_PATH. Change-Id: I9aaf1cf04f70f1da976fa84d2189ca2c01b9520f --- gnu/packages/vulkan.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) base-commit: e9b25a6c6c626a560d28a1f732e6e5d362d584a4
Comments
Hi, This patch looks good to me, and I've confirmed it fixes the issue with vulkaninfo not running. I am curious though as to what caused vulkaninfo to need LD_LIBRARY_PATH, as before the the vulkan updates a couple of months ago (at least as of gitish 4d79a9c from early April), vulkaninfo worked fine without needing LD_LIBRARY_PATH set. The new need does have me a bit concerned that other vulkan apps which used to work may need a similar workaround to keep functioning as expected. Cheers, Kaelyn
Hi, Sughosha <sughosha@disroot.org> skribis: > This fixes not finding vulkan-loader. Could you show how to test it? > + (wrap-program file > + `("LD_LIBRARY_PATH" ":" = > + (,(getenv "LIBRARY_PATH"))))) This is probably a bit too broad because LIBRARY_PATH includes build-time-only dependencies (python, gawk, binutils, bzip2, etc.). Could we explicitly list what needs to be there instead? Also maybe change ‘=’ to ‘suffix’ so users can still override LD_LIBRARY_PATH. Thanks, Ludo’.
On Friday, May 31, 2024 4:08:53 PM IST Ludovic Courtès wrote: > Hi, > > Sughosha <sughosha@disroot.org> skribis: > > This fixes not finding vulkan-loader. > > Could you show how to test it? > > > + (wrap-program file > > + `("LD_LIBRARY_PATH" ":" = > > + (,(getenv "LIBRARY_PATH"))))) > > This is probably a bit too broad because LIBRARY_PATH includes > build-time-only dependencies (python, gawk, binutils, bzip2, etc.). > > Could we explicitly list what needs to be there instead? > > Also maybe change ‘=’ to ‘suffix’ so users can still override > LD_LIBRARY_PATH. > > Thanks, > Ludo’. Hi, Thanks for your review! > Could you show how to test it? Currently if I just run `vulkaninfo`, this error appears: ``` ERROR at /tmp/guix-build-vulkan-tools-1.3.280.0.drv-0/source/vulkaninfo/./ vulkaninfo.h:412: Failed to initialize: Vulkan loader is not installed, not found, or failed to load. ``` I don't know if something should be patched before building itself. But if I run: `LD_LIBRARY_PATH=$(guix build vulkan-loader)/lib vulkaninfo`, the program will be executed without any error. > This is probably a bit too broad because LIBRARY_PATH includes > build-time-only dependencies (python, gawk, binutils, bzip2, etc.). If I wrap only with vulkan-loader's library path also, it works. But would it be a "right" way of wrapping a program. > Also maybe change ‘=’ to ‘suffix’ so users can still override Yes, you are right. I will change it.
Hi, On Friday, May 31st, 2024 at 3:38 AM, Ludovic Courtès <ludo@gnu.org> wrote: > > > Hi, > > Sughosha sughosha@disroot.org skribis: > > > This fixes not finding vulkan-loader. > > > Could you show how to test it? At least for me, the problem shows up simply with vulkan-tools installed (or using "guix shell vulkan-tools") using a guix commit after the latest (1.3.280) vulkan updates. Simply running "vulkaninfo" results in the error: ERROR at /tmp/guix-build-vulkan-tools-1.3.280.0.drv-0/source/vulkaninfo/./vulkaninfo.h:412: Failed to initialize: Vulkan loader is not installed, not found, or failed to load. > > > + (wrap-program file > > + `("LD_LIBRARY_PATH" ":" = > > + (,(getenv "LIBRARY_PATH"))))) > > > This is probably a bit too broad because LIBRARY_PATH includes > build-time-only dependencies (python, gawk, binutils, bzip2, etc.). > > Could we explicitly list what needs to be there instead? A bit of local testing just now suggests setting LD_LIBRARY_PATH to the vulkan-loader package's lib dir should be enough to resolve the error. Cheers, Kaelyn > Also maybe change ‘=’ to ‘suffix’ so users can still override > LD_LIBRARY_PATH. > > Thanks, > Ludo’.
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 4c53a19aba..dcf97e98dd 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -368,7 +368,16 @@ (define-public vulkan-tools (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? - (invoke "./tests/vulkan_tools_tests"))))))) + (invoke "./tests/vulkan_tools_tests")))) + (add-after 'install 'wrap-binaries + (lambda* (#:key outputs #:allow-other-keys) + (for-each + (lambda (file) + (wrap-program file + `("LD_LIBRARY_PATH" ":" = + (,(getenv "LIBRARY_PATH"))))) + (find-files (string-append (assoc-ref outputs "out") + "/bin")))))))) (home-page "https://github.com/KhronosGroup/Vulkan-Tools") (synopsis "Tools and utilities for Vulkan")