From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SPgyKFzl+2DpXAAAgWs5BA (envelope-from ) for ; Sat, 24 Jul 2021 12:03:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 0Iz3I1zl+2AtEwAA1q6Kng (envelope-from ) for ; Sat, 24 Jul 2021 10:03:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 504BF16436 for ; Sat, 24 Jul 2021 12:03:08 +0200 (CEST) Received: from localhost ([::1]:41790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7EUs-0004QF-TI for larch@yhetil.org; Sat, 24 Jul 2021 06:03:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7EUo-0004Q7-Ra for guix-patches@gnu.org; Sat, 24 Jul 2021 06:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7EUo-0004nh-Kc for guix-patches@gnu.org; Sat, 24 Jul 2021 06:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7EUo-0006OV-Aa for guix-patches@gnu.org; Sat, 24 Jul 2021 06:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49717] [PATCH] gnu: mesa-opencl-icd: Use absolute path for the library. Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 24 Jul 2021 10:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49717 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49717@debbugs.gnu.org Cc: Ivan Gankevich X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162712093224513 (code B ref -1); Sat, 24 Jul 2021 10:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Jul 2021 10:02:12 +0000 Received: from localhost ([127.0.0.1]:45176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7ETz-0006NI-O9 for submit@debbugs.gnu.org; Sat, 24 Jul 2021 06:02:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:57520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7ETv-0006N9-TN for submit@debbugs.gnu.org; Sat, 24 Jul 2021 06:02:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7ETu-0004Ni-Tx for guix-patches@gnu.org; Sat, 24 Jul 2021 06:02:07 -0400 Received: from mail.spbu.ru ([195.70.197.23]:52911 helo=cgp2.pu.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1m7ETr-00046j-UM for guix-patches@gnu.org; Sat, 24 Jul 2021 06:02:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=cOyOkR/i91Q74l209IpBnuxa+EaRJzXj6ITdDQn6QLM=; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From; b=HV2rogOmSUt3rLGu2E3Unaf93QZ5+L/aYR1afo70F63wXkTTkVN0yle9+6HAj6OWtAHFDXLKkK KokJ6CVOEPRmhW9PI10WlCEdSSC4rqBGKcMYf1+Ll0+J4tBxeKrqEpUvOusKb7cZqR957SuDsv2Eo wz/JJQnegoc6CD9mJ091KcTXFvLuco9ecWltfQNm4IjBOuRHQveFxk1L6lJnczDduQEwcFLnWUr1D G+KaNKwpOdAwpUZPwUAcTeYC5zmPxkRIKjSYv51l3pmnRVvSavnuEFR+Z8vqlD3yWZUYPxkNT5trW aFFn/jBi/6MCgOTw1h17G/6ZjvU4NVw2/F3sw== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost.localdomain) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 173889491; Sat, 24 Jul 2021 13:01:58 +0300 From: Ivan Gankevich Date: Sat, 24 Jul 2021 13:01:28 +0300 Message-Id: <20210724100127.8034-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=195.70.197.23; envelope-from=i.gankevich@spbu.ru; helo=cgp2.pu.ru X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627120988; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=RZjsoyWjui0Yov16Q4AWosRd98e7UjW+U8+yAlJssfY=; b=XI8LaWczWxDiKu0QXwcCueKWVx7SQnPDIlVoJmvDizZO7nf4M/E79pJOjTmM80tFmTVEqQ VWHFeU6oSuLIUsrk/rOIk0hd2PsAdyCtufmODmYvQOZeY8ym8OnjJgma267O7betA7N/nu Lpp2HRpMrrZjivDYNseUJLDkKXisg2vCSwLQu02eirptDdhgFMkmq/tkR9NyCrSOdV+w6R LDLBVbKSslrT+awTqzHXQQDhckuC2pOo1+ijt2q5SHr+5ADLxrqGZxDa9PCRVI12ym1XRO ULdfxjA4OjADatqmJROgd2wE3zKUbrKHGydXZs5CjP+V/XI6m8iVPy4mU65T2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627120988; a=rsa-sha256; cv=none; b=tpp0Ds13GNROCvtQzAcwWT0zSaQp8IA7tx5WcXORK3SoL2UnJeOatllweu5ab39XG99u7P k2YmsUasMw2OQawmyDCO8easx9quTdtBhuWQpomjF/dPr2KeufDITS8qYQ9DwSQjleYS7Y VlWjT9YydGunE8HYbn1zii/i207DEu4UDmYwRVdYF16e52DBffkvhnHf2N/PxC+ZXuz3mM DLwVK3dstPPHNtzTy43vUISuFs0jFLn5FKFbG5NjugHaV6TcRzz4QgVhJJyHdZSjp/CCZP Kfq721vESKpsMXJ+cJ8/0DLeA6LepvbLypcJYFEARcNkeyeMRMnojM0Em9MaVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spbu.ru header.s=20180812 header.b=HV2rogOm; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.58 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spbu.ru header.s=20180812 header.b=HV2rogOm; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 504BF16436 X-Spam-Score: 3.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: t5Zo5ok3XTNx * gnu/packages/gl.scm (mesa-opencl-icd): Use absolute path for OpenCL platform library in "mesa.icd" file. With this patch setting LD_LIBRARY_PATH=$LIBRARY_PATH is no longer needed to run OpenCL applications. --- gnu/packages/gl.scm | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index c14e7c0d53..f693efb36b 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -475,10 +475,26 @@ from software emulation to complete hardware acceleration for modern GPUs.") (package/inherit mesa-opencl (name "mesa-opencl-icd") (arguments - (substitute-keyword-arguments (package-arguments mesa) - ((#:configure-flags flags) - `(cons "-Dgallium-opencl=icd" - ,(delete "-Dgallium-opencl=standalone" flags))))))) + (substitute-keyword-arguments (package-arguments mesa) + ((#:configure-flags flags) + `(cons "-Dgallium-opencl=icd" + ,(delete "-Dgallium-opencl=standalone" flags))) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'install 'mesa-icd-absolute-path + (lambda _ + ;; Use absolute path for OpenCL platform library. + ;; Otherwise we would have to set LD_LIBRARY_PATH=LIBRARY_PATH + ;; for ICD in our applications to find OpenCL platform. + (use-modules (guix build utils) + (ice-9 textual-ports)) + (let* ((out (assoc-ref %outputs "out")) + (mesa-icd (string-append out "/etc/OpenCL/vendors/mesa.icd")) + (old-path (call-with-input-file mesa-icd get-string-all)) + (new-path (string-append out "/lib/" (string-trim-both old-path)))) + (if (file-exists? new-path) + (call-with-output-file mesa-icd + (lambda (port) (format port "~a\n" new-path))))))))))))) (define-public mesa-headers (package/inherit mesa -- 2.32.0