From patchwork Wed Jul 10 20:28:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 66105 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0B07327BBEA; Wed, 10 Jul 2024 21:30:15 +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=ham 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 E646927BBE9 for ; Wed, 10 Jul 2024 21:30:13 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRdx0-0002jb-TX; Wed, 10 Jul 2024 16:30:06 -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 ) id 1sRdwy-0002ck-2u for guix-patches@gnu.org; Wed, 10 Jul 2024 16:30:04 -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 ) id 1sRdwx-0004CX-Pl for guix-patches@gnu.org; Wed, 10 Jul 2024 16:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sRdwx-0000wA-0G for guix-patches@gnu.org; Wed, 10 Jul 2024 16:30:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72043] [PATCH 1/3] gnu: mesa: Fix building on aarch64-linux. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Jul 2024 20:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72043 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72043@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 72043-submit@debbugs.gnu.org id=B72043.17206433563454 (code B ref 72043); Wed, 10 Jul 2024 20:30:02 +0000 Received: (at 72043) by debbugs.gnu.org; 10 Jul 2024 20:29:16 +0000 Received: from localhost ([127.0.0.1]:50428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRdwC-0000te-B3 for submit@debbugs.gnu.org; Wed, 10 Jul 2024 16:29:16 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]:59901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRdw9-0000tU-O1 for 72043@debbugs.gnu.org; Wed, 10 Jul 2024 16:29:14 -0400 Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-42660b8dd27so991885e9.3 for <72043@debbugs.gnu.org>; Wed, 10 Jul 2024 13:29:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720643293; x=1721248093; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=fLjziaq19aYq/VLh+OhmixZGeR2D1CiBDFHQSXpl98E=; b=iCxvfcnabo+ha21jBnOK+mWZ5IA3yh3Ke6xC2eBn7rKZZhKqWivUIc4G46TC6vuU49 W58knGatny/B3Yw1WVIiOyoGB0paf12DD5vpdTw/O2MYDk+HzlP+6zKxvUW2uqIejEbb JLViFa3Y0sFWaFz7sR4MpINF9BAltMQokvHXJvdg9txe+3MyIXrZjdGXC6GyUTTbmdpx U3xMDzBY2+y4AX9upONluRzybzOuklrf3BQNJHXXt6m357kIEPT4/rCvDR0+CfLAfdCR cj2DtQ2RfSdvPbL1KJhAjeE3OLDEkPffPJVlUuL5MbT3DM42HiHCAKrqxkKpzZunpcOs wg5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720643293; x=1721248093; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fLjziaq19aYq/VLh+OhmixZGeR2D1CiBDFHQSXpl98E=; b=DcxO6tsXP4Vq8gAZgep5F2ReCHYarFHHgcprg5icJtjG7/H/yAT8nqUtqzNtq8IcvA I4gX17hC6zjgi2cPR7AJC/prY0GDml3h8p0dRMRF3Zww00aK5Gx6DCxPMnhMwCsrtBlD BPAJsxWDNQw96JWMGSdwSmnkxr32IfHUv8BLExEDkNFHckWhAYIMJ1INlho8ivvUsSdi Cum1LowTaamHmQUILxnec1Z6JGKXpciNwO007vmQiYPUHe8/k0sfdsN/6pl9uZBZRA+e EFuMNFMtfKzF/CuOPQSKUzROEUEOr/PU03+m25+B2lmTuk1vwOVWevwq8aJa2TpmqbxK +PGA== X-Gm-Message-State: AOJu0YyrcfeJXg4O4rF20aNjOCyyBZOHICaUC9/0sGBY5TXiBHkXsUHc IJmdI3zC8PoQcf1SsX3zprXAj8bLmR3RtzSHp3SdsHWqsVvIUq8GkRowsO/OR+k= X-Google-Smtp-Source: AGHT+IGpJQi6fSeU7MFxeBU2ifSe0QWdgmxBzT2LgjGZfQZwzvEyb9CGxggJpWbTgO+llhFdnQeIaw== X-Received: by 2002:a05:600c:12d5:b0:426:629f:1550 with SMTP id 5b1f17b1804b1-426707d8a6dmr44655575e9.9.1720643293146; Wed, 10 Jul 2024 13:28:13 -0700 (PDT) Received: from localhost ([141.226.13.214]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4266f737b1bsm94635185e9.32.2024.07.10.13.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jul 2024 13:28:12 -0700 (PDT) From: Efraim Flashner Date: Wed, 10 Jul 2024 23:28:02 +0300 Message-ID: <24cc5fe2eb0275896cc9cb0b8b58abb9a20fe491.1720642893.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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")