unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: The Man <squishypinkelephant@gmail.com>
To: 73071@debbugs.gnu.org
Subject: [bug#73071] [PATCH mesa-updates 0/8] Various updates for mesa to 24.2.2
Date: Tue, 17 Sep 2024 19:35:51 -0500	[thread overview]
Message-ID: <CAPfwWajKNu8OjXrb-=WM7zhvc4O3A3F1QHGkU7J4nVVdcR5QsA@mail.gmail.com> (raw)
In-Reply-To: <cover.1725634153.git.john.kehayias@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 3437 bytes --]

Hello, In the interest of creating a future where mesa properly works
alongside libglvnd i think there's a few options:

- simply adding "-Dglvnd=true" to mesa configure-flags and tediously adding
libglvnd to the inputs of every package that links to LibGL, as well as
patching anything problematic as mentioned in
https://issues.guix.gnu.org/49339#8

- create an abomination, the ONE MESA TO RULE THEM ALL. an example follows:

(define-public mesa/new
  (package
    (inherit mesa)
    (arguments
      (substitute-keyword-arguments (package-arguments mesa)
        ((#:configure-flags flags ''())
          #~(append #$flags
            (list "-Dglvnd=true")))
        ((#:phases phases ''())
          (with-imported-modules '((guix build union))
          #~(modify-phases #$phases
            (add-before 'validate-runpath 'unionize
              (lambda _ ;; unionize with libglvnd, fixing all problems
                (use-modules (ice-9 match)
                             (guix build union))
                (union-build (string-append #$output "/tmp")
                  '#$(list (this-package-input "libglvnd"))
                  #:create-all-directories? #t)
                (copy-recursively (string-append #$output "/tmp") #$output)
                (delete-file-recursively (string-append #$output "/tmp"))
                ;; leftovers from building with old mesa.
                ;; some packages still link to these.
                ;; remove for rebuilding after applying graft?
                (symlink (string-append #$output "/lib/libEGL.so.1")
                         (string-append #$output "/lib/libEGL.so.1.0.0"))
                (symlink (string-append #$output "/lib/libGLESv1_CM.so.1")
                         (string-append #$output
"/lib/libGLESv1_CM.so.1.1.0"))
                (symlink (string-append #$output "/lib/libGLESv2.so.2")
                         (string-append #$output "/lib/libGLESv2.so.2.0.0"))
                (symlink (string-append #$output "/lib/libGL.so.1")
                         (string-append #$output "/lib/libGL.so.1.2.0"))))
            (add-after 'install 'fix-paths
              (lambda _
                (substitute*
                  (string-append #$output
"/share/glvnd/egl_vendor.d/50_mesa.json")
                  (("libEGL_mesa")
                    (string-append #$output "/lib/libEGL_mesa")))))
            (add-after 'fix-paths 'add-external-egl
              (lambda _
                (mkdir-p (string-append #$output
"/share/egl/egl_external_platform.d")))))))))
    (native-search-paths (append (package-native-search-paths mesa)
     (list
      (search-path-specification
       (variable "__EGL_VENDOR_LIBRARY_DIRS")
       (files '("share/glvnd/egl_vendor.d")))
      (search-path-specification
       (variable "GBM_BACKENDS_PATH")
       (files '("lib")))
      (search-path-specification
       (variable "XDG_DATA_DIRS")
       (files '("share")))
      (search-path-specification
       (variable "__EGL_EXTERNAL_PLATFORM_CONFIG_DIRS")
       (files '("share/egl/egl_external_platform.d"))))))
    (inputs (modify-inputs (package-inputs mesa)
      (prepend libglvnd)))))

Using this to graft over mesa is a filthy answer to the "GL problem". no
rebuilding necessary, it seems to "just work".

Other distributions have settled on packaging mesa build for working with
libglvnd and most software seems to expect such.
Perhaps there's another solution?

[-- Attachment #2: Type: text/html, Size: 4493 bytes --]

      parent reply	other threads:[~2024-09-18  0:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 15:00 [bug#73071] [PATCH mesa-updates 0/8] Various updates for mesa to 24.2.2 John Kehayias via Guix-patches via
2024-09-06 15:05 ` [bug#73071] [PATCH mesa-updates 1/8] gnu: libdrm: Update to 2.4.123 John Kehayias via Guix-patches via
2024-09-06 15:06 ` [bug#73071] [PATCH mesa-updates 2/8] gnu: wayland-protocols: Update to 1.37 John Kehayias via Guix-patches via
2024-09-06 15:07 ` [bug#73071] [PATCH mesa-updates 3/8] gnu: Remove wayland-protocols-next John Kehayias via Guix-patches via
2024-09-06 15:07 ` [bug#73071] [PATCH mesa-updates 4/8] gnu: vulkan-headers: Hard-code libvulkan.so file name John Kehayias via Guix-patches via
2024-09-06 15:07 ` [bug#73071] [PATCH mesa-updates 5/8] gnu: volk: Hard-code path of vulkan-loader for dynamic loading John Kehayias via Guix-patches via
2024-09-06 15:07 ` [bug#73071] [PATCH mesa-updates 6/8] gnu: llvm-for-mesa: Update to llvm-18 John Kehayias via Guix-patches via
2024-09-06 15:07 ` [bug#73071] [PATCH mesa-updates 7/8] gnu: llvm-for-mesa: Build all targets John Kehayias via Guix-patches via
2024-09-06 15:08 ` [bug#73071] [PATCH mesa-updates 8/8] gnu: mesa: Update to 24.2.2 John Kehayias via Guix-patches via
2024-09-09  3:43 ` [bug#73071] [PATCH mesa-updates 0/8] Various updates for mesa " John Kehayias via Guix-patches via
2024-09-09 16:12 ` [bug#73071] [PATCH mesa-updates] gnu: mesa: Enable NVK driver for x86_64 architecture aurtzy
2024-09-16  2:59   ` John Kehayias via Guix-patches via
2024-09-17  1:50     ` [bug#73071] [PATCH mesa-updates 0/8] Various updates for mesa to 24.2.2 aurtzy
2024-09-18  0:35 ` The Man [this message]

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to='CAPfwWajKNu8OjXrb-=WM7zhvc4O3A3F1QHGkU7J4nVVdcR5QsA@mail.gmail.com' \
    --to=squishypinkelephant@gmail.com \
    --cc=73071@debbugs.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).