unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 72043@debbugs.gnu.org
Cc: Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#72043] [PATCH core-updates 1/3] gnu: mesa: Fix building on aarch64-linux.
Date: Mon, 15 Jul 2024 19:47:35 +0300	[thread overview]
Message-ID: <24cc5fe2eb0275896cc9cb0b8b58abb9a20fe491.1720642893.git.efraim@flashner.co.il> (raw)
Message-ID: <20240715164735.pv30nc1S2RhY-BYrHQ6c8nptgvQW20ai1g2KkESsrEg@z> (raw)
In-Reply-To: <cover.1720642893.git.efraim@flashner.co.il>

* gnu/packages/gl.scm (mesa)[inputs]: When building for aarch64-linux
use clang-18 and llvm-18 instead of llvm-for-mesa.
[native-inputs]: When building for aarch64-linux add libclc.
[arguments]: Adjust the 'disable-failing-test phase when building for
aarch64-linux to skip a test.
(mesa-opencl)[native-inputs]: When building for aarch64-linux don't add
clang-15.
* gnu/packages/check.scm (python-lit),
* gnu/packages/llvm.scm (libclc),
* gnu/packages/vulkan.scm (spirv-llvm-translator): Add a note about it
being a dependency for mesa.

Change-Id: I0bf5ab019ffd0626ad2d0c38bafceec401e3c886
---
 gnu/packages/check.scm  |  1 +
 gnu/packages/gl.scm     | 56 +++++++++++++++++++++++++----------------
 gnu/packages/llvm.scm   |  1 +
 gnu/packages/vulkan.scm |  1 +
 4 files changed, 38 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index bc341943f02..c24878937f3 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -2577,6 +2577,7 @@ (define-public python-hypothesmith
 programs, something like CSmith, a random generator of C programs.")
     (license license:mpl2.0)))
 
+;; WARNING: This package is a dependency of mesa.
 (define-public python-lit
   (package
     (name "python-lit")
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 80ba2cdcb09..43a452acb6a 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -320,19 +320,24 @@ (define-public mesa
            libxxf86vm
            xorgproto))
     (inputs
-     (list elfutils                  ;libelf required for r600 when using llvm
-           expat
-           (force libva-without-mesa)
-           libxml2
-           libxrandr
-           libxvmc
-           llvm-for-mesa
-           vulkan-loader
-           wayland
-           wayland-protocols
-           `(,zstd "lib")))
+     (append
+       (if (target-aarch64?)
+           (list clang-18
+                 llvm-18)
+           (list llvm-for-mesa))
+       (list elfutils                   ;libelf required for r600 when using llvm
+             expat
+             (force libva-without-mesa)
+             libxml2
+             libxrandr
+             libxvmc
+             vulkan-loader
+             wayland
+             wayland-protocols
+             `(,zstd "lib"))))
     (native-inputs
-     (cons* bison
+     (append
+      (list bison
             flex
             gettext-minimal
             glslang
@@ -340,13 +345,16 @@ (define-public mesa
             python-libxml2              ;for OpenGL ES 1.1 and 2.0 support
             python-mako
             python-wrapper
-            (@ (gnu packages base) which)
-            (if (%current-target-system)
-              (list cmake-minimal-cross
-                    pkg-config-for-build
-                    wayland
-                    wayland-protocols)
-              '())))
+            (@ (gnu packages base) which))
+      (if (target-aarch64?)
+          (list libclc)
+          '())
+      (if (%current-target-system)
+          (list cmake-minimal-cross
+                pkg-config-for-build
+                wayland
+                wayland-protocols)
+          '())))
     (outputs '("out" "bin"))
     (arguments
      (list
@@ -464,6 +472,10 @@ (define-public mesa
                   ;; https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091).
                   `((substitute* "src/util/meson.build"
                       ((".*'tests/u_debug_stack_test.cpp',.*") ""))))
+                 ("aarch64-linux"
+                  ;; Disable some of the llvmpipe tests.
+                  `((substitute* "src/gallium/drivers/llvmpipe/meson.build"
+                      (("'lp_test_format', ") ""))))
                  ("armhf-linux"
                   ;; Disable some of the llvmpipe tests.
                   `((substitute* "src/gallium/drivers/llvmpipe/meson.build"
@@ -586,8 +598,10 @@ (define-public mesa-opencl
      (modify-inputs (package-inputs mesa)
        (prepend libclc)))
     (native-inputs
-     (modify-inputs (package-native-inputs mesa)
-       (prepend clang-15)))))
+     (if (target-aarch64?)
+         (package-native-inputs mesa)
+         (modify-inputs (package-native-inputs mesa)
+           (prepend clang-15))))))
 
 (define-public mesa-opencl-icd
   (package/inherit mesa-opencl
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index a1a2c9dc1b9..b32b4b5955c 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -1915,6 +1915,7 @@ (define-public libcxx+libcxxabi-6
     (native-inputs
      (list clang-6 llvm-6 libcxxabi-6))))
 
+;; WARNING: This package is a dependency of mesa.
 (define-public libclc
   (package
     (name "libclc")
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 25542c1e064..befd5325b58 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -152,6 +152,7 @@ (define-public spirv-cross
 SPIR-V, aiming to emit GLSL or MSL that looks like human-written code.")
     (license license:asl2.0)))
 
+;; WARNING: This package is a dependency of mesa.
 (define-public spirv-llvm-translator
   (package
     (name "spirv-llvm-translator")
-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





  reply	other threads:[~2024-07-15 16:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 20:25 [bug#72043] [CORE-UPDATES PATCH 0/3] Fix mesa for aarch64-linux Efraim Flashner
2024-07-10 20:28 ` Efraim Flashner [this message]
2024-07-15 16:47   ` [bug#72043] [PATCH core-updates 1/3] gnu: mesa: Fix building on aarch64-linux Efraim Flashner
2024-07-10 20:28 ` [bug#72043] [PATCH 2/3] gnu: python-lit: Update to 18.1.8 Efraim Flashner
2024-07-15 16:47   ` [bug#72043] [PATCH core-updates " Efraim Flashner
2024-07-10 20:28 ` [bug#72043] [PATCH 3/3] gnu: libclc: " Efraim Flashner
2024-07-15 16:47   ` [bug#72043] [PATCH core-updates " Efraim Flashner
2024-07-17 16:06 ` bug#72043: [CORE-UPDATES PATCH 0/3] Fix mesa for aarch64-linux Efraim Flashner

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=24cc5fe2eb0275896cc9cb0b8b58abb9a20fe491.1720642893.git.efraim@flashner.co.il \
    --to=efraim@flashner.co.il \
    --cc=72043@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).