all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Katherine Cox-Buday <cox.katherine.e@gmail.com>
To: John Kehayias <john.kehayias@protonmail.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	"Efraim Flashner" <efraim@flashner.co.il>,
	guix-devel@gnu.org
Subject: Re: Packages grow, no longer fit on a 💾
Date: Thu, 19 Jan 2023 08:30:28 -0700	[thread overview]
Message-ID: <87h6wmv8x7.fsf@gmail.com> (raw)
In-Reply-To: <87o7qw969a.fsf@protonmail.com> (John Kehayias's message of "Tue,  17 Jan 2023 21:54:33 +0000")

John Kehayias <john.kehayias@protonmail.com> writes:

>>> Efraim Flashner <efraim@flashner.co.il> skribis:
>>>
>>> I've made some progress on LLVM and I think I have a working LLVM
>>> that can be used as an input for mesa.

This is awesome! Thank you Efraim!

> I don't think there were any errors in building mesa with older LLVM,
> but on current hardware (unfortunately brings in non-free
> considerations) this was necessary. I believe this is the summary:
> <https://www.phoronix.com/news/LLVM-15-Branched>

I can confirm that 3D acceleration would not work until LLVM-15 was
used. I don't understand the entire rendering pipeline anymore, but I
think it had something to do with Vulkan.

> Props to katco on IRC for going through some long building and
> debugging to track this down.

Thanks, John!

Part of the reason this was difficult to test (aside from having to
discover the LLVM part) was discovering that the XORG_DRI_DRIVER_PATH
environment variable wasn't being set correctly despite doing package
rewriting to use a different version of Mesa.

I ended up doing this:

--8<---------------cut here---------------start------------->8---
(define-public (xorg-with-mesa xorg-server mesa)
  "Returns an xorg-server package which will wrap the call to Xorg to include the
correct XORG_DRI_DRIVER_PATH for the mesa package provided."
  (package
   (inherit xorg-server)
   (arguments
    (substitute-keyword-arguments
     (package-arguments xorg-server)
     ((#:phases child-phases '%standard-phases)
      #~(modify-phases #$child-phases
                       (add-after 'install 'wrap
                                  (lambda* (#:key outputs #:allow-other-keys)
                                    (let* ((out (assoc-ref outputs "out"))
                                           (bin (string-append out "/bin"))
                                           (xorg (string-append bin "/Xorg")))
                                      (wrap-program xorg
                                                    '("XORG_DRI_DRIVER_PATH" ":" = (#$(file-append mesa "/lib/dri")))))))))))))
--8<---------------cut here---------------end--------------->8---

But something like this (I'm sure I've gotten the gexps wrong) would have been made it much easier:

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index 5f073d05d3..d626e87073 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -196,7 +196,9 @@ (define-record-type* <xorg-configuration>
   (server           xorg-configuration-server     ;file-like
                     (default xorg-server))
   (server-arguments xorg-configuration-server-arguments ;list of strings
-                    (default %default-xorg-server-arguments)))
+                    (default %default-xorg-server-arguments))
+  (mesa             xorg-configuration-mesa ; package
+                    (default mesa)))
 
 (define (xorg-configuration->file config)
   "Compute an Xorg configuration file corresponding to CONFIG, an
@@ -362,7 +364,7 @@ (define* (xorg-wrapper #:optional (config (xorg-configuration)))
   (define exp
     ;; Write a small wrapper around the X server.
     #~(begin
-        (setenv "XORG_DRI_DRIVER_PATH" (string-append #$mesa "/lib/dri"))
+        (setenv "XORG_DRI_DRIVER_PATH" (string-append #$(xorg-configuration-mesa config) "/lib/dri"))
         (setenv "XKB_BINDIR" (string-append #$xkbcomp "/bin"))
 
         (let ((X (string-append #$(xorg-configuration-server config) "/bin/X")))
--8<---------------cut here---------------end--------------->8---

--
Katherine


  reply	other threads:[~2023-01-19 15:31 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-14 22:07 Packages grow, no longer fit on a 💾 Ludovic Courtès
2023-01-15  5:51 ` kiasoc5
2023-01-15  8:07 ` Liliana Marie Prikler
2023-01-16  2:09   ` Maxim Cournoyer
2023-01-16  5:17     ` Liliana Marie Prikler
2023-01-16 13:27       ` Maxim Cournoyer
2023-01-17 16:15     ` Ludovic Courtès
2023-01-15 12:56 ` Akib Azmain Turja
2023-01-15 17:00 ` pelzflorian (Florian Pelz)
2023-01-17 16:25   ` Ludovic Courtès
2023-01-17 23:05     ` zimoun
2023-01-17 23:49       ` zimoun
2023-01-18 21:04         ` Grandfathering store paths considered harmful (was: Packages grow, no longer fit on a 💾) Liliana Marie Prikler
2023-01-19 14:28           ` Grandfathering store paths considered harmful Ludovic Courtès
2023-01-19 18:10             ` Liliana Marie Prikler
2023-01-19 14:14       ` Packages grow, no longer fit on a 💾 Ludovic Courtès
2023-01-20 10:51         ` Simon Tournier
2023-01-20 14:54           ` Maxim Cournoyer
2023-01-18  2:41     ` kiasoc5
2023-01-18  8:43       ` indieterminacy
2023-01-19 14:32       ` Ludovic Courtès
2023-01-20 11:06         ` Simon Tournier
2023-01-17  8:06 ` Efraim Flashner
2023-01-17 16:18   ` Ludovic Courtès
2023-01-17 21:54     ` John Kehayias
2023-01-19 15:30       ` Katherine Cox-Buday [this message]
2023-01-17 15:06 ` Simon Tournier
2023-01-19 14:34   ` Ludovic Courtès
2023-01-18 20:44 ` Paul Jewell via Development of GNU Guix and the GNU System distribution.
2023-01-19 13:04   ` Joshua Branson
2023-01-19 14:37   ` Ludovic Courtès
2023-01-19 16:12     ` Katherine Cox-Buday
2023-01-19 18:07   ` Akib Azmain Turja
2023-01-20 15:30     ` Csepp
2023-01-20 17:34       ` Akib Azmain Turja
2023-01-21 12:29         ` bokr
2023-01-21 15:55           ` Akib Azmain Turja
2023-01-20 12:11   ` Simon Tournier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6wmv8x7.fsf@gmail.com \
    --to=cox.katherine.e@gmail.com \
    --cc=efraim@flashner.co.il \
    --cc=guix-devel@gnu.org \
    --cc=john.kehayias@protonmail.com \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.