[PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2.

  • Done
  • quality assurance status badge
Details
3 participants
  • aurtzy
  • Efraim Flashner
  • John Kehayias
Owner
unassigned
Submitted by
aurtzy
Severity
normal
A
A
aurtzy wrote on 8 Mar 13:32 +0100
(address . guix-patches@gnu.org)
cover.1709899566.git.aurtzy@gmail.com
Hello!

This series of patches updates Mesa to the latest stable version with the NVK
Vulkan driver for NVIDIA GPUs enabled for x86_64 systems.

Mesa 24.0.2 depends on a newer version of libdrm (>= 2.4.119), which is
pending in another issue (https://issues.guix.gnu.org/68845).

Some packages (rust-syn-2.0.39, rust-proc-macro2-1.0.70, rust-quote-1.0.33)
were added specifically to be used as sources that satisfy explicit versions
of dependencies required by Mesa (for NVK). Would it be better to inline
origins in the change-subproject-sources phase? The same question also
applies for the rust-unicode-ident-1 source.

Currently, the Rust dependencies are found in the build by substituting the
fallback https://* URLs in the relevant ./subprojects/*.wrap files with
file://*, then relying on the fallback to "download" from the store. It
seemed a bit hacky doing it this way, but I'm not aware of a better solution.

A newer Meson version is also required for NVK (>= 1.3.0), which this patch
series adds a new variable for.

x86_64-linux and i686-linux have been tested to successfully build.

Cheers,

aurtzy

aurtzy (6):
gnu: Add meson-1.3.
gnu: Add rust-syn-2.0.39.
gnu: Add rust-proc-macro2-1.0.70.
gnu: Add rust-quote-1.0.33.
gnu: Add rust-bindgen-cli-0.69.
gnu: mesa: Update to 24.0.2.

gnu/packages/build-tools.scm | 14 ++++++
gnu/packages/crates-io.scm | 95 ++++++++++++++++++++++++++++++++++++
gnu/packages/gl.scm | 68 +++++++++++++++++++-------
3 files changed, 160 insertions(+), 17 deletions(-)


base-commit: 0b5cbca689b2f91949e191ca256ffc9bb48c1141
--
2.41.0
A
A
aurtzy wrote on 8 Mar 21:27 +0100
[PATCH mesa-updates 1/6] gnu: Add meson-1.3.
(address . 69637@debbugs.gnu.org)(name . aurtzy)(address . aurtzy@gmail.com)
d4225144ebd1c7ce423ad13e6f422b764dfce9d7.1709899566.git.aurtzy@gmail.com
* gnu/packages/build-tools.scm (meson-1.3): New variable.

Change-Id: I3c280851d0ecd116572e982db7a0e90045bcd682
---
gnu/packages/build-tools.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 15d88ded80..e25266820f 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022, 2023 Juliana Sims <juli@incana.org>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -343,6 +344,19 @@ (define-public meson/newer
(base32
"073vf8059nzs6p5aaqr5wva4pgl81540szdb5yw9yhyajwgm8jyh"))))))
+(define-public meson-1.3
+ (package
+ (inherit meson/newer)
+ (version "1.3.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/mesonbuild/meson/"
+ "releases/download/" version "/meson-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1ajvkcyly1nsxwjc2vly1vlvfjrwpfnza5prfr104wxhr18b8bj9"))))))
+
(define-public meson-python
(package
(name "meson-python")
--
2.41.0
A
A
aurtzy wrote on 8 Mar 21:27 +0100
[PATCH mesa-updates 2/6] gnu: Add rust-syn-2.0.39.
(address . 69637@debbugs.gnu.org)(name . aurtzy)(address . aurtzy@gmail.com)
497c6f4e446c987388767ae86b1108bc533c8454.1709899566.git.aurtzy@gmail.com
* gnu/packages/crates-io.scm (rust-syn-2.0.39): New variable.

Change-Id: I148a87e6927adb897da410c29edec28cc0d5687d
---
gnu/packages/crates-io.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 1a08748392..9be241da4b 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -42,6 +42,7 @@
;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
;;; Copyright © 2024 Suhail Singh <suhail@bayesians.ca>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -66817,6 +66818,20 @@ (define-public rust-syn-2
a syntax tree of Rust source code.")
(license (list license:expat license:asl2.0))))
+(define-public rust-syn-2.0.39
+ (package
+ (inherit rust-syn-2)
+ (name "rust-syn")
+ (version "2.0.39")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "syn" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ymyhxnk1yi4pzf72qk3lrdm9lgjwcrcwci0hhz5vx7wya88prr3"))))))
+
(define-public rust-syn-1
(package
(name "rust-syn")
--
2.41.0
A
A
aurtzy wrote on 8 Mar 21:27 +0100
[PATCH mesa-updates 3/6] gnu: Add rust-proc-macro2-1.0.70.
(address . 69637@debbugs.gnu.org)(name . aurtzy)(address . aurtzy@gmail.com)
3a952dcb0a2e3d00ec5660e7aac12c0e8469b09e.1709899566.git.aurtzy@gmail.com
* gnu/packages/crates-io.scm (rust-proc-macro2-1.0.70): New variable.

Change-Id: I4b567bee92c789cb189df2a6e022c2cdcd11bcdb
---
gnu/packages/crates-io.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 9be241da4b..bf2ea0ff6b 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -49651,6 +49651,20 @@ (define-public rust-proc-macro2-1
in terms of the upstream unstable API.")
(license (list license:asl2.0 license:expat))))
+(define-public rust-proc-macro2-1.0.70
+ (package
+ (inherit rust-proc-macro2-1)
+ (name "rust-proc-macro2")
+ (version "1.0.70")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "proc-macro2" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0fzxg3dkrjy101vv5b6llc8mh74xz1vhhsaiwrn68kzvynxqy9rr"))))))
+
(define-public rust-proc-macro2-0.4
(package
(inherit rust-proc-macro2-1)
--
2.41.0
A
A
aurtzy wrote on 8 Mar 21:27 +0100
[PATCH mesa-updates 4/6] gnu: Add rust-quote-1.0.33.
(address . 69637@debbugs.gnu.org)(name . aurtzy)(address . aurtzy@gmail.com)
4baeb5b7aaeccf009b60aebd5bac3492695600d3.1709899566.git.aurtzy@gmail.com
* gnu/packages/crates-io.scm (rust-quote-1.0.33): New variable.

Change-Id: I45591530fe0644ded11bd0048519ac59de82eec9
---
gnu/packages/crates-io.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index bf2ea0ff6b..97dfc03525 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -52524,6 +52524,19 @@ (define-public rust-quote-1
(description "Quasi-quoting macro quote!(...)")
(license (list license:asl2.0 license:expat))))
+(define-public rust-quote-1.0.33
+ (package
+ (inherit rust-quote-1)
+ (name "rust-quote")
+ (version "1.0.33")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "quote" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1biw54hbbr12wdwjac55z1m2x2rylciw83qnjn564a3096jgqrsj"))))))
+
(define-public rust-quote-0.6
(package
(inherit rust-quote-1)
--
2.41.0
A
A
aurtzy wrote on 8 Mar 21:27 +0100
[PATCH mesa-updates 5/6] gnu: Add rust-bindgen-cli-0.69.
(address . 69637@debbugs.gnu.org)(name . aurtzy)(address . aurtzy@gmail.com)
b558be5e5c5b9956fbcc2378ffabb51312c4ac68.1709899566.git.aurtzy@gmail.com
* gnu/packages/crates-io.scm (rust-bindgen-cli-0.69): New variable.

Change-Id: I0841f34d73acf4e161c9f0ba0c6543d7f0d03092
---
gnu/packages/crates-io.scm | 53 ++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 97dfc03525..150b8884b1 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -6182,6 +6182,59 @@ (define-public rust-bindgen-0.69
bindings to C and C++ libraries.")
(license license:bsd-3)))
+(define-public rust-bindgen-cli-0.69
+ (package
+ (inherit rust-bindgen-0.69)
+ (name "rust-bindgen-cli")
+ (version "0.69.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rust-lang/rust-bindgen.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0mksvspqymdypgflgx6xqfxdr9a5wwx534imgcnn3mk7ffz0sqlm"))))
+ (arguments
+ (cons*
+ ;; 1 test case fails (header_ptr32_has_different_size_h); related issue:
+ ;; https://github.com/rust-lang/rust-bindgen/issues/2638
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (bindgen (string-append bin "/bindgen"))
+ (llvm-dir (string-append
+ (assoc-ref inputs "clang")
+ "/lib")))
+ (mkdir-p bin)
+ (copy-file "target/release/bindgen" bindgen)
+ (wrap-program bindgen
+ `("LIBCLANG_PATH" = (,llvm-dir)))))))
+ (substitute-keyword-arguments (package-arguments rust-bindgen-0.69)
+ ((#:skip-build? _)
+ #f)
+ ((#:cargo-inputs original-inputs)
+ `(("rust-bindgen" ,rust-bindgen-0.69)
+ ("rust-block" ,rust-block-0.1)
+ ("rust-clap" ,rust-clap-complete-4)
+ ("rust-env-logger" ,rust-env-logger-0.10)
+ ("rust-libloading" ,rust-libloading-0.7)
+ ("rust-objc" ,rust-objc-0.2)
+ ("rust-owo-colors" ,rust-owo-colors-3)
+ ("rust-prettyplease" ,rust-prettyplease-0.2)
+ ("rust-quickcheck" ,rust-quickcheck-0.4)
+ ("rust-similar" ,rust-similar-2)
+ ,@original-inputs)))))
+ (native-inputs
+ (modify-inputs (package-native-inputs rust-bindgen-0.69)
+ (prepend clang)))))
+
(define-public rust-bindgen-0.66
(package
(inherit rust-bindgen-0.69)
--
2.41.0
A
A
aurtzy wrote on 8 Mar 21:27 +0100
[PATCH mesa-updates 6/6] gnu: mesa: Update to 24.0.2.
(address . 69637@debbugs.gnu.org)(name . aurtzy)(address . aurtzy@gmail.com)
45e5551106c45c40822f85a9e5e26276a23cb24d.1709899566.git.aurtzy@gmail.com
* gnu/packages/gl.scm (mesa): Update to 24.0.2.

Change-Id: Ic4176f8a747bcb4c5210af6ccb4569589192e4a7
---
gnu/packages/gl.scm | 68 +++++++++++++++++++++++++++++++++------------
1 file changed, 51 insertions(+), 17 deletions(-)

Toggle diff (129 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index f8dc8c1d9d..156c7cacbe 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,8 +41,10 @@ (define-module (gnu packages gl)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages crates-io)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
#:use-module (gnu packages flex)
@@ -55,6 +58,7 @@ (define-module (gnu packages gl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages rust)
#:use-module (gnu packages tls)
#:use-module (gnu packages video)
#:use-module (gnu packages vulkan)
@@ -297,17 +301,17 @@ (define libva-without-mesa
(define-public mesa
(package
(name "mesa")
- (version "23.3.2")
+ (version "24.0.2")
(source
- (origin
- (method url-fetch)
- (uri (list (string-append "https://archive.mesa3d.org/"
- "mesa-" version ".tar.xz")
- (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
- "mesa-" version ".tar.xz")))
- (sha256
- (base32
- "1p4swrbmz3kb1805kdj973hf8virgmix4m9qprmcb2bgl4gviz1w"))))
+ (origin
+ (method url-fetch)
+ (uri (list (string-append "https://archive.mesa3d.org/"
+ "mesa-" version ".tar.xz")
+ (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
+ "mesa-" version ".tar.xz")))
+ (sha256
+ (base32
+ "1s69asdh7cz10abr63q8qdiamdcy7cjkzd9yp398wvfhva78mqll"))))
(build-system meson-build-system)
(propagated-inputs
;; The following are in the Requires.private field of gl.pc.
@@ -340,15 +344,22 @@ (define-public mesa
python-mako
python-wrapper
(@ (gnu packages base) which)
- (if (%current-target-system)
- (list cmake-minimal-cross
- pkg-config-for-build
- wayland
- wayland-protocols)
- '())))
+ (append
+ (if (%current-target-system)
+ (list cmake-minimal-cross
+ pkg-config-for-build
+ wayland
+ wayland-protocols)
+ '())
+ (if (target-x86-64?)
+ (list clang-15
+ rust-bindgen-cli-0.69
+ rust)
+ '()))))
(outputs '("out" "bin"))
(arguments
(list
+ #:meson meson-1.3
#:configure-flags
#~(list
#$@(cond
@@ -381,7 +392,9 @@ (define-public mesa
;; Explicitly enable Vulkan on some architectures.
#$@(cond
- ((or (target-x86-32?) (target-x86-64?))
+ ((target-x86-64?)
+ '("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast,nouveau-experimental"))
+ ((target-x86-32?)
'("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast"))
((or (target-ppc64le?) (target-ppc32?))
'("-Dvulkan-drivers=amd,swrast"))
@@ -478,6 +491,27 @@ (define-public mesa
(("'lp_test_arit', ") ""))))
(_
'((display "No tests to disable on this architecture.\n"))))))
+ (add-after 'unpack 'change-subproject-sources
+ ;; Subproject source URLs are patched to point to the store,
+ ;; which avoids an attempt to download them mid-build.
+ (lambda _
+ (for-each
+ (lambda (subproject)
+ (let ((file (car subproject))
+ (input (cdr subproject)))
+ (substitute* file
+ (("https.*/download")
+ (string-append "file://" input)))))
+ '#$(if (target-x86-64?)
+ #~(("subprojects/syn.wrap"
+ . #$(package-source rust-syn-2.0.39))
+ ("subprojects/unicode-ident.wrap"
+ . #$(package-source rust-unicode-ident-1))
+ ("subprojects/quote.wrap"
+ . #$(package-source rust-quote-1.0.33))
+ ("subprojects/proc-macro2.wrap"
+ . #$(package-source rust-proc-macro2-1.0.70)))
+ '()))))
(add-before 'configure 'fix-dlopen-libnames
(lambda _
(let ((out #$output))
--
2.41.0
E
E
Efraim Flashner wrote on 12 Mar 09:11 +0100
Re: [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2.
(name . aurtzy)(address . aurtzy@gmail.com)
ZfAOQX6ZYguWEx9d@3900XT
On Fri, Mar 08, 2024 at 07:32:39AM -0500, aurtzy wrote:
Toggle quote (14 lines)
> Hello!
>
> This series of patches updates Mesa to the latest stable version with the NVK
> Vulkan driver for NVIDIA GPUs enabled for x86_64 systems.
>
> Mesa 24.0.2 depends on a newer version of libdrm (>= 2.4.119), which is
> pending in another issue (https://issues.guix.gnu.org/68845).
>
> Some packages (rust-syn-2.0.39, rust-proc-macro2-1.0.70, rust-quote-1.0.33)
> were added specifically to be used as sources that satisfy explicit versions
> of dependencies required by Mesa (for NVK). Would it be better to inline
> origins in the change-subproject-sources phase? The same question also
> applies for the rust-unicode-ident-1 source.

Are there other architectures which have rust based drivers? x86_64
isn't the only architecture which has rust building on it.

Toggle quote (5 lines)
> Currently, the Rust dependencies are found in the build by substituting the
> fallback https://* URLs in the relevant ./subprojects/*.wrap files with
> file://*, then relying on the fallback to "download" from the store. It
> seemed a bit hacky doing it this way, but I'm not aware of a better solution.

The crates are also available in
%output/share/cargo/registry/name-version.crate, although I can't think
of a good way to address them by name without using find-files.

I would personally replace the versions requested by mesa with whatever
version we happen to have in guix so that we don't have to add special
versions just for mesa.

Toggle quote (31 lines)
> A newer Meson version is also required for NVK (>= 1.3.0), which this patch
> series adds a new variable for.
>
> x86_64-linux and i686-linux have been tested to successfully build.
>
> Cheers,
>
> aurtzy
>
> aurtzy (6):
> gnu: Add meson-1.3.
> gnu: Add rust-syn-2.0.39.
> gnu: Add rust-proc-macro2-1.0.70.
> gnu: Add rust-quote-1.0.33.
> gnu: Add rust-bindgen-cli-0.69.
> gnu: mesa: Update to 24.0.2.
>
> gnu/packages/build-tools.scm | 14 ++++++
> gnu/packages/crates-io.scm | 95 ++++++++++++++++++++++++++++++++++++
> gnu/packages/gl.scm | 68 +++++++++++++++++++-------
> 3 files changed, 160 insertions(+), 17 deletions(-)
>
>
> base-commit: 0b5cbca689b2f91949e191ca256ffc9bb48c1141
> --
> 2.41.0
>
>
>
>

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXwDkEACgkQQarn3Mo9
g1HtHw//cIa+VDIBim9wckA82Q/Gbz+gt5KU9Gw3UYwbXIC6CtvJSu9GeOsQ8XL3
PPst+DFO5v9f/VrX8QSzWlKutWt3nV7mNrscaJfzWYHzNpkHgJuR3U7L/yYkoU1q
jlYwMCe60VjhT8kD5qNJIwHo2uUl2dUAVytUBEy6gsEMNlB1V9sJCxYp30bfZ1j2
krV0ySREy8kLbOKh/XrT2L5KxOo6v6vKuwV3I+/M8/p+eTiNs8kNtmBjbxJm6wK5
gc1WPw4S+2+s4FSupc55pHMbxfd5tBpE0VaWitxmoCgJ4w4O+scamO7rgaOXabqe
sb405Sr6UyZJ0dJV1ofGMNNO3K5hyZ+kxFAT0+9nAAhBlskjczXzhWasyDi+3P9F
eDIP3e8MQ/Z5X/CI1WlMe21yg7ZyFJLx8PNQ39GHIwQIs71zv7iCmyWB5OC3OYCV
GbnWgZYfJ7pBVK7jwVVS5UNlRVEGXWAA3PaMUI4pQCesqThMHC4POdRzR+iJtn0F
RT6zhFHFPVBz/2rV+OumIfkMezMxlcxrj8iPynSsPgpZogPWo8bpeKv/bn/IMUlT
BUCRcCaiCx9qgVxSrCiY5PQ+4nYTafk1FXp9BXDoK/Tqv+XJbz4Fg+eqGo66zF87
zmErSf8gRKnhndYOvZ7hdys+53omEnlai84TUTbT2+q11pxG+SM=
=cl3g
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 12 Mar 12:54 +0100
Re: [bug#69637] [PATCH mesa-updates 5/6] gnu: Add rust-bindgen-cli-0.69.
(name . aurtzy)(address . aurtzy@gmail.com)(address . 69637@debbugs.gnu.org)
ZfBCWkRJNXcE1iwW@3900XT
I've applied rust-bindgen-cli to the master branch. I renamed it to
remove the version at the end and I switched to the crate-uri since
there's no tests in the bindgen-cli folder of the bindgen git repo.

I also moved it to the rust-apps module and added the shell completions.

--
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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXwQloACgkQQarn3Mo9
g1GjHQ//eTbXe3bhmHtVXjKCFjBYk0kXhrewzQT2/d/EtqyZtHGfKortYrdpkS1h
tcXR9obc0ovx2Xa4+39QzZNG6d4aJr4hsA2gcjMidHomuunzgv4AvLkJAG1qOeiu
c4kYDXlYrRCnO++xkyE28I9JBRZAVKwzQaqm9bslPThcFZ6qVaa1ahS04VMGDlSj
dkgY9oFjloyK4hzoqSdAs9MXImFYYzGk/XxEOn/45XcxLtukW9sxvijv7XOnLDVY
F/3eoV9xS6XQEi+CJ1c7ip4yffIo659tSUBsuVC4xV+XwuaYunnphEwX8jGCLqbY
WlETgnaEvhn2Ki1MQl5QRWNddiGKs/82ZhuOWrrkON9mkFbtF+02GSBZiqpCzKl+
2cgs4zo9uL3dlwL8RisV3OOKlcXrZfHn6T1R8AceJa6lKF1vH2ela+mGFKgjeB2R
2Q2hbD/Q6PJlCL0bL1W0y6WGLg+qXEef1VjpVxiptwTNuyFPyoGkgNkx2H5IxkzR
vEB4kpxoIbzkbZSXpBYR9Yx3alPq+Xv+vuA3XUCXESSaQkdkqQfVz4OXnmSzbGKK
Zm6fP03OCthRRTQRVnQt4bMQfxqOXV/e953cUNeZ9MS+1hJGfmdIX6PVj5x2bZCs
DhzX+hMhlXDGX5GgzwZXL06UfnI26NjZ1v2kufCGTPHycNi5lIg=
=iFwr
-----END PGP SIGNATURE-----


A
A
aurtzy wrote on 21 Mar 02:52 +0100
Re: [bug#69637] [PATCH mesa-updates 0/6] gnu: mesa: Update to 24.0.2.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
e1b635d9-ec51-4b5f-ab44-c6e5cb6a01e6@gmail.com
On 3/12/24 04:11, Efraim Flashner wrote:
Toggle quote (2 lines)
> Are there other architectures which have rust based drivers? x86_64
> isn't the only architecture which has rust building on it.
There doesn't appear to be any official documentation stating
architecture requirements for Mesa with NVK/Rust, however I have added
few new inputs other than rust to get NVK working. I've only done
extensive testing with x86_64 so I was unsure of potential issues with
including this on other architectures (other than i686 not building rust).
Toggle quote (8 lines)
> The crates are also available in
> %output/share/cargo/registry/name-version.crate, although I can't think
> of a good way to address them by name without using find-files.
>
> I would personally replace the versions requested by mesa with whatever
> version we happen to have in guix so that we don't have to add special
> versions just for mesa.

I have/had tried a few approaches to use the crates already available in
Guix with no success so far. I've outlined the approaches below; still
looking into solutions, but perhaps there's something I'm missing or
haven't tried yet?

- Simply including crates as (native-)inputs does not make them
discoverable by meson.

- Mesa uses these *.wrap files which specify the rust dependency
versions, source URLs, and tar hashes. I currently get the build working
by relying on meson to fall back to "downloading" from a patched source
URL (pointing to store), although it still has to match the hash.

- I recently discovered a way to disable the hash requirement so I could
use a different input version (i.e. one from Guix), but doing it causes
"File src/lib.rs does not exist" errors. I'm still looking into this
right now, as it seems promising.

- Old IRC logs point to projects like newsboat and librsvg which also
mix cargo with with another build system, but these start with
cargo-build-system with phases added/replaced from the second build
system. Cargo.toml doesn't exist in Mesa either (which
cargo-build-system seems to depend on), so experimenting with using
cargo-build-system didn't yield much.

I wanted to look more into the third bullet before responding, but I
felt it would be unfortunate to have this information rot while trying
to make time for hacking - hopefully it's still useful.

Cheers,

aurtzy
Attachment: file
J
J
John Kehayias wrote on 21 Mar 05:39 +0100
(name . aurtzy)(address . aurtzy@gmail.com)
87msqs19ms.fsf@protonmail.com
Hi aurtzy and Efraim,

On Wed, Mar 20, 2024 at 09:52 PM, aurtzy wrote:

Toggle quote (11 lines)
> On 3/12/24 04:11, Efraim Flashner wrote:
>
> Are there other architectures which have rust based drivers? x86_64
> isn't the only architecture which has rust building on it.
>
> There doesn't appear to be any official documentation stating architecture requirements for Mesa with
> NVK/Rust, however I have added few new inputs other than rust to get NVK working. I've only done extensive
> testing with x86_64 so I was unsure of potential issues with including this on other architectures (other than
> i686 not building rust).
>

I guess this is the main question, if we will try to enable the NVK
driver for other architectures, if that is supported. We could also
leave it for the known working x86_64 to start. I would say we could
provide a mesa variant package for testing, but that might be
difficult as far as I know (e.g. trying to get Xorg to use a different
mesa package looked difficult from what I saw others try).

We could try just checking for where rust is available (is that just
supported-systems for the rust package, or do we have other logic?)
and building with NVK to see what fails... Though with how long it can
take us to build on other architectures, that might take a while to
find out and then correct.

Toggle quote (34 lines)
> The crates are also available in
> %output/share/cargo/registry/name-version.crate, although I can't think
> of a good way to address them by name without using find-files.
>
> I would personally replace the versions requested by mesa with whatever
> version we happen to have in guix so that we don't have to add special
> versions just for mesa.
>
> I have/had tried a few approaches to use the crates already available in Guix with no success so far. I've
> outlined the approaches below; still looking into solutions, but perhaps there's something I'm missing or
> haven't tried yet?
>
> - Simply including crates as (native-)inputs does not make them discoverable by meson.
>
> - Mesa uses these *.wrap files which specify the rust dependency versions, source URLs, and tar hashes. I
> currently get the build working by relying on meson to fall back to "downloading" from a patched source URL
> (pointing to store), although it still has to match the hash.
>
> - I recently discovered a way to disable the hash requirement so I could use a different input version (i.e. one
> from Guix), but doing it causes "File src/lib.rs does not exist" errors. I'm still looking into this right now, as it
> seems promising.
>
> - Old IRC logs point to projects like newsboat and librsvg which also mix cargo with with another build
> system, but these start with cargo-build-system with phases added/replaced from the second build system.
> Cargo.toml doesn't exist in Mesa either (which cargo-build-system seems to depend on), so experimenting
> with using cargo-build-system didn't yield much.
>
> I wanted to look more into the third bullet before responding, but I felt it would be unfortunate to have this
> information rot while trying to make time for hacking - hopefully it's still useful.
>
> Cheers,
>
> aurtzy

Thanks for this additional info, aurtzy, and your work on this!

Efraim, any thoughts on the rust related stuff based on these other
attempts? I'm not familiar enough with rust, rust packaging, or what
mesa is doing in the meson builds to comment right now.

I would like to get the build farm cranking on the updates I have
queued for mesa-updates (cairo, libdrm, mesa, vulkan). We could also
do just the version update of mesa to start, or just NVK on x86_64,
leaving future changes for the next round. I don't have a preference
myself, other than wanting to get this branch moving with these
updates.

Thoughts?

And thanks both of you again!
John
E
E
Efraim Flashner wrote on 21 Mar 11:58 +0100
(name . John Kehayias)(address . john.kehayias@protonmail.com)
ZfwS51BC5dqwpoBc@3900XT
Attachment: file
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmX8EuEACgkQQarn3Mo9
g1E27g//b+dJiln9bLhTma3mMzEdR1f+ZkszyVDyQGehsKGFUVEZOR8nOuE9bplY
IbeUo57ruipEvT/KSoG6SVHneEr625KJIbR618onhdOvHSbFo6+lQyOPUcEX+WSV
XE6C5nMr0ZejIbCbB45mDBE7xTopDdqg196OuG3KqMTXBj8aCcBnlL0GR1fv9Qrm
2g4JTQvo/NZtyyE4pVbdi6iNCz9BPj3dhH4Tqi8T5OUtgI2Jprbe8G+04GqbpxgB
5BYNaxO9NDD/P1QOgsWSH8zKx92KBvIlBNEITYafwbHeQvyfY0tW8nVR/gHrUhKP
aDMbpn5qI8SrhVweNvT3LDWZz0hixxcc2Jnz28OmjQWeN29U2TQHNikzEt/D5mER
zn+QXGemImYMO35LrZ31sxx0Q0eVs4Pcrwjeb1I/aneTJkPoWsXIynE7TQmdLM9/
57c6cKHSgnxgfamLxd+m9LSGkZrWLV9hgsbBGpiHp8HN7jVCRk3VmpErVvz34CfN
47Dz90FoCxH46qBsMyhjRL498YCrIFwRRRqw33Z6njs0BIbDJY6oldQu8GZdc9qN
JW1nJRFf0SNs3sWeAkUpiQi6G9PL5sgdOR6BouSVq9dmKH1OLFphMoUvJIp0+uH5
Wh+A+HbrW6udz7r7FR2FYJ6+5j3VXKLXhRBOv6HgD165SdEeO3s=
=Ka1j
-----END PGP SIGNATURE-----


A
A
aurtzy wrote on 22 Mar 08:24 +0100
[PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3.
(address . 69637@debbugs.gnu.org)
cover.1711091869.git.aurtzy@gmail.com
New patchset coming in. Mesa has been updated to 24.0.3, and I've added TODO
comments for future work as suggested.

Toggle quote (7 lines)
> I would like to get the build farm cranking on the updates I have
> queued for mesa-updates (cairo, libdrm, mesa, vulkan). We could also
> do just the version update of mesa to start, or just NVK on x86_64,
> leaving future changes for the next round. I don't have a preference
> myself, other than wanting to get this branch moving with these
> updates.

NVK on 24.0.3 is also still considered experimental, so if that's a concern we
could save this work for 24.1 when it's planned to move out of this stage.

Toggle quote (16 lines)
> I also tried a couple of different options. The one that I most want
> involved using with-output-to-file to rewrite the wrap file and
> replacing all the fields. I borrowed the file-sha256 function from
> guix/build/cargo-utils.scm to get the source_hash. In the end I wasn't
> able to get the gexp and un-gexp bits working to actually get the file
> written.
>
> When I kept a failed build I saw that the 'directory' field is the
> directory into which meson writes the meson.build file, which is why
> using a different version of the rust crate caused problems with
> src/lib.rs not existing. I suppose we could start from your patch and
> then, after running substitute, extract the tarball into either a
> hardcoded path (determined after manually reading the sources) or we can
> extract the 'directory' field by reading the sources and then untar the
> source there.

Noted, thanks Efraim! I'll keep looking into this.

Best,

aurtzy

aurtzy (5):
gnu: Add meson-1.3.
gnu: Add rust-syn-2.0.39.
gnu: Add rust-proc-macro2-1.0.70.
gnu: Add rust-quote-1.0.33.
gnu: mesa: Update to 24.0.3.

gnu/packages/build-tools.scm | 14 +++++++
gnu/packages/crates-io.scm | 42 +++++++++++++++++++
gnu/packages/gl.scm | 80 ++++++++++++++++++++++++++++--------
3 files changed, 118 insertions(+), 18 deletions(-)


base-commit: 3d2966e0b7dbf15a5cb497037ace73d1be92febf
--
2.41.0
A
A
aurtzy wrote on 22 Mar 08:33 +0100
[PATCH mesa-updates v2 1/5] gnu: Add meson-1.3.
(address . 69637@debbugs.gnu.org)
e7252cb897982c870d5b8c3d5447276a905d8db3.1711091869.git.aurtzy@gmail.com
* gnu/packages/build-tools.scm (meson-1.3): New variable.

Change-Id: I3c280851d0ecd116572e982db7a0e90045bcd682
---
gnu/packages/build-tools.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 15d88ded80..e25266820f 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -15,6 +15,7 @@
;;; Copyright © 2021 qblade <qblade@protonmail.com>
;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022, 2023 Juliana Sims <juli@incana.org>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -343,6 +344,19 @@ (define-public meson/newer
(base32
"073vf8059nzs6p5aaqr5wva4pgl81540szdb5yw9yhyajwgm8jyh"))))))
+(define-public meson-1.3
+ (package
+ (inherit meson/newer)
+ (version "1.3.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/mesonbuild/meson/"
+ "releases/download/" version "/meson-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1ajvkcyly1nsxwjc2vly1vlvfjrwpfnza5prfr104wxhr18b8bj9"))))))
+
(define-public meson-python
(package
(name "meson-python")
--
2.41.0
A
A
aurtzy wrote on 22 Mar 08:33 +0100
[PATCH mesa-updates v2 2/5] gnu: Add rust-syn-2.0.39.
(address . 69637@debbugs.gnu.org)
e2935cbc941c45d086bdb31af8941eef0a0024dd.1711091869.git.aurtzy@gmail.com
* gnu/packages/crates-io.scm (rust-syn-2.0.39): New variable.

Change-Id: I148a87e6927adb897da410c29edec28cc0d5687d
---
gnu/packages/crates-io.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index a67d3d74bb..be33ea973f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -42,6 +42,7 @@
;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
;;; Copyright © 2024 Suhail Singh <suhail@bayesians.ca>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -66818,6 +66819,20 @@ (define-public rust-syn-2
a syntax tree of Rust source code.")
(license (list license:expat license:asl2.0))))
+(define-public rust-syn-2.0.39
+ (package
+ (inherit rust-syn-2)
+ (name "rust-syn")
+ (version "2.0.39")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "syn" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0ymyhxnk1yi4pzf72qk3lrdm9lgjwcrcwci0hhz5vx7wya88prr3"))))))
+
(define-public rust-syn-1
(package
(name "rust-syn")
--
2.41.0
A
A
aurtzy wrote on 22 Mar 08:33 +0100
[PATCH mesa-updates v2 3/5] gnu: Add rust-proc-macro2-1.0.70.
(address . 69637@debbugs.gnu.org)
419ca69cd489680104483785562757be1672bfdc.1711091869.git.aurtzy@gmail.com
* gnu/packages/crates-io.scm (rust-proc-macro2-1.0.70): New variable.

Change-Id: I4b567bee92c789cb189df2a6e022c2cdcd11bcdb
---
gnu/packages/crates-io.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index be33ea973f..c5aff774b3 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -49652,6 +49652,20 @@ (define-public rust-proc-macro2-1
in terms of the upstream unstable API.")
(license (list license:asl2.0 license:expat))))
+(define-public rust-proc-macro2-1.0.70
+ (package
+ (inherit rust-proc-macro2-1)
+ (name "rust-proc-macro2")
+ (version "1.0.70")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "proc-macro2" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0fzxg3dkrjy101vv5b6llc8mh74xz1vhhsaiwrn68kzvynxqy9rr"))))))
+
(define-public rust-proc-macro2-0.4
(package
(inherit rust-proc-macro2-1)
--
2.41.0
A
A
aurtzy wrote on 22 Mar 08:33 +0100
[PATCH mesa-updates v2 4/5] gnu: Add rust-quote-1.0.33.
(address . 69637@debbugs.gnu.org)
85034c7fb34fb078a10e8f2db41708ec533ae8e4.1711091869.git.aurtzy@gmail.com
* gnu/packages/crates-io.scm (rust-quote-1.0.33): New variable.

Change-Id: I45591530fe0644ded11bd0048519ac59de82eec9
---
gnu/packages/crates-io.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index c5aff774b3..0a788fc5ef 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -52525,6 +52525,19 @@ (define-public rust-quote-1
(description "Quasi-quoting macro quote!(...)")
(license (list license:asl2.0 license:expat))))
+(define-public rust-quote-1.0.33
+ (package
+ (inherit rust-quote-1)
+ (name "rust-quote")
+ (version "1.0.33")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "quote" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1biw54hbbr12wdwjac55z1m2x2rylciw83qnjn564a3096jgqrsj"))))))
+
(define-public rust-quote-0.6
(package
(inherit rust-quote-1)
--
2.41.0
A
A
aurtzy wrote on 22 Mar 08:33 +0100
[PATCH mesa-updates v2 5/5] gnu: mesa: Update to 24.0.3.
(address . 69637@debbugs.gnu.org)
06ab73253d226155792ae2817c74d0f8d790db14.1711091869.git.aurtzy@gmail.com
* gnu/packages/gl.scm (mesa): Update to 24.0.3.

Change-Id: Ic4176f8a747bcb4c5210af6ccb4569589192e4a7
---
gnu/packages/gl.scm | 80 +++++++++++++++++++++++++++++++++++----------
1 file changed, 62 insertions(+), 18 deletions(-)

Toggle diff (142 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index f8dc8c1d9d..0265716ac0 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2024 aurtzy <aurtzy@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -40,8 +41,10 @@ (define-module (gnu packages gl)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages bison)
+ #:use-module (gnu packages build-tools)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages crates-io)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
#:use-module (gnu packages flex)
@@ -55,6 +58,8 @@ (define-module (gnu packages gl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages rust)
+ #:use-module (gnu packages rust-apps)
#:use-module (gnu packages tls)
#:use-module (gnu packages video)
#:use-module (gnu packages vulkan)
@@ -297,17 +302,17 @@ (define libva-without-mesa
(define-public mesa
(package
(name "mesa")
- (version "23.3.2")
+ (version "24.0.3")
(source
- (origin
- (method url-fetch)
- (uri (list (string-append "https://archive.mesa3d.org/"
- "mesa-" version ".tar.xz")
- (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
- "mesa-" version ".tar.xz")))
- (sha256
- (base32
- "1p4swrbmz3kb1805kdj973hf8virgmix4m9qprmcb2bgl4gviz1w"))))
+ (origin
+ (method url-fetch)
+ (uri (list (string-append "https://archive.mesa3d.org/"
+ "mesa-" version ".tar.xz")
+ (string-append "ftp://ftp.freedesktop.org/pub/mesa/"
+ "mesa-" version ".tar.xz")))
+ (sha256
+ (base32
+ "1gpx3glifdvyw2fxigiannrxkdfhag6b6h0nxab3azbvlfickbkp"))))
(build-system meson-build-system)
(propagated-inputs
;; The following are in the Requires.private field of gl.pc.
@@ -340,15 +345,23 @@ (define-public mesa
python-mako
python-wrapper
(@ (gnu packages base) which)
- (if (%current-target-system)
- (list cmake-minimal-cross
- pkg-config-for-build
- wayland
- wayland-protocols)
- '())))
+ (append
+ (if (%current-target-system)
+ (list cmake-minimal-cross
+ pkg-config-for-build
+ wayland
+ wayland-protocols)
+ '())
+ ;; NVK-specific inputs
+ (if (target-x86-64?)
+ (list clang-15
+ rust-bindgen-cli
+ rust)
+ '()))))
(outputs '("out" "bin"))
(arguments
(list
+ #:meson meson-1.3
#:configure-flags
#~(list
#$@(cond
@@ -379,9 +392,12 @@ (define-public mesa
"-Dgbm=enabled"
"-Dshared-glapi=enabled"
- ;; Explicitly enable Vulkan on some architectures.
+ ;; Explicitly enable Vulkan on some architectures. TODO: Identify other
+ ;; architectures where nouveau (NVK) works and enable it for them
#$@(cond
- ((or (target-x86-32?) (target-x86-64?))
+ ((target-x86-64?)
+ '("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast,nouveau-experimental"))
+ ((target-x86-32?)
'("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast"))
((or (target-ppc64le?) (target-ppc32?))
'("-Dvulkan-drivers=amd,swrast"))
@@ -478,6 +494,34 @@ (define-public mesa
(("'lp_test_arit', ") ""))))
(_
'((display "No tests to disable on this architecture.\n"))))))
+ #$@(if (target-x86-64?)
+ #~((add-after 'unpack 'change-subproject-sources
+ ;; Patch subproject source URLs to point to the store, which lets
+ ;; meson correctly identify rust inputs and avoid an attempt to
+ ;; download them mid-build.
+ (lambda _
+ (for-each
+ (match-lambda
+ ((file input)
+ (substitute* file
+ (("source_url = .*$")
+ "")
+ (("source_hash = .*$")
+ "")
+ (("(source_filename = ).*$" all assign)
+ (string-append assign input "\n")))))
+ ;; TODO: Patch mesa to allow for using sources with different
+ ;; versions so we don't have to package these crates
+ ;; specifically for mesa.
+ '(("subprojects/syn.wrap"
+ #$(package-source rust-syn-2.0.39))
+ ("subprojects/unicode-ident.wrap"
+ #$(package-source rust-unicode-ident-1))
+ ("subprojects/quote.wrap"
+ #$(package-source rust-quote-1.0.33))
+ ("subprojects/proc-macro2.wrap"
+ #$(package-source rust-proc-macro2-1.0.70)))))))
+ #~())
(add-before 'configure 'fix-dlopen-libnames
(lambda _
(let ((out #$output))
--
2.41.0
J
J
John Kehayias wrote on 25 Mar 02:29 +0100
Re: [bug#69637] [PATCH mesa-updates v2 0/5] gnu: mesa: Update to 24.0.3.
(name . aurtzy)(address . aurtzy@gmail.com)
87sf0fnloc.fsf@protonmail.com
Hi aurtzy and Efraim,

On Fri, Mar 22, 2024 at 03:24 AM, aurtzy wrote:

Toggle quote (4 lines)
> New patchset coming in. Mesa has been updated to 24.0.3, and I've added TODO
> comments for future work as suggested.
>

Thanks!

Toggle quote (11 lines)
>> I would like to get the build farm cranking on the updates I have
>> queued for mesa-updates (cairo, libdrm, mesa, vulkan). We could also
>> do just the version update of mesa to start, or just NVK on x86_64,
>> leaving future changes for the next round. I don't have a preference
>> myself, other than wanting to get this branch moving with these
>> updates.
>
> NVK on 24.0.3 is also still considered experimental, so if that's a concern we
> could save this work for 24.1 when it's planned to move out of this stage.
>

Right, I forgot about that. I also remember that it depends (or is
helped by) some changes in recent kernels, 6.7 and/or 6.8 if I remember.

So, maybe we can take this approach:

1. Make the update just to 24.0.3 for mesa (does that require newer
meson?)

2. Add any rust packages as needed to master

3. Either add a mesa-next (to master?) or followup on mesa-updates after
it gets merged to master with a mesa based on 24.1 (as soon as it is
tagged) with NVK enabled. This will let us at least get mesa built and
make for a headstart come 24.0.1.

With 24.1 soon ("this quarter"?) and how long it can take us to build on
non-x86 architectures, it would be nice to have that go quickly. Since
I'll be including cairo, libdrm, and vulkan updates (at least) this
round, I anticipate it taking a bit.

Does that sound okay? It'll give some time to test things and clean
up/find alternatives as Efraim suggested.

I'm also not opposed to just enabling NVK now. In that case, we should
have one commit to just update mesa and another to enable NVK.

Toggle quote (19 lines)
>> I also tried a couple of different options. The one that I most want
>> involved using with-output-to-file to rewrite the wrap file and
>> replacing all the fields. I borrowed the file-sha256 function from
>> guix/build/cargo-utils.scm to get the source_hash. In the end I wasn't
>> able to get the gexp and un-gexp bits working to actually get the file
>> written.
>>
>> When I kept a failed build I saw that the 'directory' field is the
>> directory into which meson writes the meson.build file, which is why
>> using a different version of the rust crate caused problems with
>> src/lib.rs not existing. I suppose we could start from your patch and
>> then, after running substitute, extract the tarball into either a
>> hardcoded path (determined after manually reading the sources) or we can
>> extract the 'directory' field by reading the sources and then untar the
>> source there.
>
> Noted, thanks Efraim! I'll keep looking into this.
>

Thanks both of you! I would like to start pushing patches and building
everything in the next few days, especially as some have sat for a while
and it will take time to build.

John
A
A
aurtzy wrote on 27 Mar 03:14 +0100
(name . John Kehayias)(address . john.kehayias@protonmail.com)
88a7c961-6a3c-4700-8da1-f7dcb5127489@gmail.com
On 3/24/24 21:29, John Kehayias wrote:
Toggle quote (8 lines)
> Hi aurtzy and Efraim,
>
> On Fri, Mar 22, 2024 at 03:24 AM, aurtzy wrote:
>
>> New patchset coming in. Mesa has been updated to 24.0.3, and I've added TODO
>> comments for future work as suggested.
>>
> Thanks!
Happy to help!
Toggle quote (12 lines)
>>> I would like to get the build farm cranking on the updates I have
>>> queued for mesa-updates (cairo, libdrm, mesa, vulkan). We could also
>>> do just the version update of mesa to start, or just NVK on x86_64,
>>> leaving future changes for the next round. I don't have a preference
>>> myself, other than wanting to get this branch moving with these
>>> updates.
>> NVK on 24.0.3 is also still considered experimental, so if that's a concern we
>> could save this work for 24.1 when it's planned to move out of this stage.
>>
> Right, I forgot about that. I also remember that it depends (or is
> helped by) some changes in recent kernels, 6.7 and/or 6.8 if I remember.

6.6 appears to be the minimum required according to mesa docs, if that
changes anything:

Toggle quote (4 lines)
> So, maybe we can take this approach:
>
> 1. Make the update just to 24.0.3 for mesa (does that require newer
> meson?)
The meson 1.3 requirement is only for NVK; mesa 24.0.3 without NVK can
build with the current meson.
Toggle quote (18 lines)
> 2. Add any rust packages as needed to master
>
> 3. Either add a mesa-next (to master?) or followup on mesa-updates after
> it gets merged to master with a mesa based on 24.1 (as soon as it is
> tagged) with NVK enabled. This will let us at least get mesa built and
> make for a headstart come 24.0.1.
>
> With 24.1 soon ("this quarter"?) and how long it can take us to build on
> non-x86 architectures, it would be nice to have that go quickly. Since
> I'll be including cairo, libdrm, and vulkan updates (at least) this
> round, I anticipate it taking a bit.
>
> Does that sound okay? It'll give some time to test things and clean
> up/find alternatives as Efraim suggested.
>
> I'm also not opposed to just enabling NVK now. In that case, we should
> have one commit to just update mesa and another to enable NVK.

Looks like 24.1 stable should be releasing May-June:

This approach sounds fine to me. I don't mind holding back the
NVK-related changes for more testing and improvement.

Toggle quote (23 lines)
>>> I also tried a couple of different options. The one that I most want
>>> involved using with-output-to-file to rewrite the wrap file and
>>> replacing all the fields. I borrowed the file-sha256 function from
>>> guix/build/cargo-utils.scm to get the source_hash. In the end I wasn't
>>> able to get the gexp and un-gexp bits working to actually get the file
>>> written.
>>>
>>> When I kept a failed build I saw that the 'directory' field is the
>>> directory into which meson writes the meson.build file, which is why
>>> using a different version of the rust crate caused problems with
>>> src/lib.rs not existing. I suppose we could start from your patch and
>>> then, after running substitute, extract the tarball into either a
>>> hardcoded path (determined after manually reading the sources) or we can
>>> extract the 'directory' field by reading the sources and then untar the
>>> source there.
>> Noted, thanks Efraim! I'll keep looking into this.
>>
> Thanks both of you! I would like to start pushing patches and building
> everything in the next few days, especially as some have sat for a while
> and it will take time to build.
>
> John

Cheers,

aurtzy
Attachment: file
J
J
John Kehayias wrote on 27 Mar 06:22 +0100
(name . aurtzy)(address . aurtzy@gmail.com)
8734scnta5.fsf@protonmail.com
Hello,

On Tue, Mar 26, 2024 at 10:14 PM, aurtzy wrote:

Toggle quote (3 lines)
> Looks like 24.1 stable should be releasing May-June: https://docs.mesa3d.org/release-calendar.html
>

All the more reason to pre-empt it a bit, as I will be away for most
of May and the beginning of June :-)

Toggle quote (4 lines)
> This approach sounds fine to me. I don't mind holding back the NVK-related changes for more testing and
> improvement.
>

Great, thanks!

I applied a version only bump locally (haven't pushed it out live yet)
and so far so good. I put you as co-author, even though it was just
the hash basically, you did save me having to do that.

Once this is on mesa-updates, you can base your patches on that (bunch
of other updates too) and it can live on that branch in prep for 24.1.

Thanks again!
John
J
J
John Kehayias wrote on 18 Apr 06:39 +0200
(name . aurtzy)(address . aurtzy@gmail.com)
87cyqn2sjl.fsf@protonmail.com
On Wed, Mar 27, 2024 at 01:17 AM, John Kehayias wrote:

Toggle quote (28 lines)
> Hello,
>
> On Tue, Mar 26, 2024 at 10:14 PM, aurtzy wrote:
>
>> Looks like 24.1 stable should be releasing May-June:
>> <https://docs.mesa3d.org/release-calendar.html>
>>
>
> All the more reason to pre-empt it a bit, as I will be away for most
> of May and the beginning of June :-)
>
>> This approach sounds fine to me. I don't mind holding back the
>> NVK-related changes for more testing and
>> improvement.
>>
>
> Great, thanks!
>
> I applied a version only bump locally (haven't pushed it out live yet)
> and so far so good. I put you as co-author, even though it was just
> the hash basically, you did save me having to do that.
>
> Once this is on mesa-updates, you can base your patches on that (bunch
> of other updates too) and it can live on that branch in prep for 24.1.
>
> Thanks again!
> John

mesa updated to 24.0.3 in b43d36a556c1c1d75fdffbec08d8c39121a528cd and
then 24.0.4 in 23928e2d426fb63945682c2c8c60145fe4d333dd.

Closing this issue number, but thank you for the efforts so far for NVK.
Happy to have patches for 24.1 on mesa-updates when you have them.

John
Closed
?