unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#72821] [PATCH 0/4] Update to latest rust
@ 2024-08-26 17:38 brennan
  2024-08-26 17:40 ` [bug#72821] [PATCH 1/4] gnu: rust: Update to 1.78 brennan
  2024-09-17  9:56 ` bug#72821: [PATCH 0/4] Update to latest rust Efraim Flashner
  0 siblings, 2 replies; 6+ messages in thread
From: brennan @ 2024-08-26 17:38 UTC (permalink / raw)
  To: 72821; +Cc: Brennan Vincent, efraim

From: Brennan Vincent <brennan@umanwizard.com>

This is broken into four separate patches: one adds rust 1.80,
while the other three each advance the main exported Rust
by one major version.

Brennan Vincent (4):
  gnu: rust: Update to 1.78
  gnu: rust: Update to 1.79
  gnu: rust: Add rust 1.80.1
  gnu: rust: update to 1.80

 .../patches/rustc-unwinding-fix.patch         | 29 ++++++
 gnu/packages/rust.scm                         | 91 +++++++++++++++----
 2 files changed, 101 insertions(+), 19 deletions(-)
 create mode 100644 gnu/packages/patches/rustc-unwinding-fix.patch

-- 
2.45.2






^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#72821] [PATCH 1/4] gnu: rust: Update to 1.78
  2024-08-26 17:38 [bug#72821] [PATCH 0/4] Update to latest rust brennan
@ 2024-08-26 17:40 ` brennan
  2024-08-26 17:40   ` [bug#72821] [PATCH 2/4] gnu: rust: Update to 1.79 brennan
                     ` (2 more replies)
  2024-09-17  9:56 ` bug#72821: [PATCH 0/4] Update to latest rust Efraim Flashner
  1 sibling, 3 replies; 6+ messages in thread
From: brennan @ 2024-08-26 17:40 UTC (permalink / raw)
  To: 72821; +Cc: Brennan Vincent, efraim

From: Brennan Vincent <brennan@umanwizard.com>

* gnu/packages/rust.scm (rust): Update to 1.78

Change-Id: I7bf37a9321447ac21644af0e2d023b8bc556da59
---
 .../patches/rustc-unwinding-fix.patch         | 29 +++++++++++++++++++
 gnu/packages/rust.scm                         | 23 +++++++++++----
 2 files changed, 46 insertions(+), 6 deletions(-)
 create mode 100644 gnu/packages/patches/rustc-unwinding-fix.patch

diff --git a/gnu/packages/patches/rustc-unwinding-fix.patch b/gnu/packages/patches/rustc-unwinding-fix.patch
new file mode 100644
index 0000000000..8e98d6d7d9
--- /dev/null
+++ b/gnu/packages/patches/rustc-unwinding-fix.patch
@@ -0,0 +1,29 @@
+From ce49a9d9e52ca6062fe0894e72d954511fa8820f Mon Sep 17 00:00:00 2001
+From: Shmuel Hazan <ShmuelHazan0@gmail.com>
+Date: Sat, 1 Jun 2024 08:49:44 +0300
+Subject: [PATCH] Add UWTable attr to functions with a personality function
+
+Adding a personality function forces LLVM to generate unwinding info that might be incorrect.
+To solve it, always apply the UWTable attribute when setting a personality function.
+
+Fixes #123733
+---
+ compiler/rustc_codegen_llvm/src/builder.rs | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
+index 72ff9ea118e28..668f0a33a4e80 100644
+--- a/compiler/rustc_codegen_llvm/src/builder.rs
++++ b/compiler/rustc_codegen_llvm/src/builder.rs
+@@ -1029,6 +1029,11 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
+     }
+ 
+     fn set_personality_fn(&mut self, personality: &'ll Value) {
++        // Work around for https://github.com/rust-lang/rust/issues/123733
++        // add the UWTable attribute to every function with a personality function.
++        let uwtable = attributes::uwtable_attr(self.llcx, None);
++        attributes::apply_to_llfn(self.llfn(), llvm::AttributePlace::Function, &[uwtable]);
++
+         unsafe {
+             llvm::LLVMSetPersonalityFn(self.llfn(), personality);
+         }
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 465899fe9d..9987d5569f 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -984,8 +984,15 @@ (define-public rust-1.77
                     "[build]\noptimized-compiler-builtins = false")))))))))))
 
 (define-public rust-1.78
-  (rust-bootstrapped-package
-   rust-1.77 "1.78.0" "1afmj5g3bz7439w4i8zjhd68zvh0gqg7ymr8h5rz49ybllilhm7z"))
+  (let ((base-rust (rust-bootstrapped-package rust-1.77 "1.78.0"
+                                              "1afmj5g3bz7439w4i8zjhd68zvh0gqg7ymr8h5rz49ybllilhm7z")))
+    (package
+      (inherit base-rust)
+      (source
+       (origin
+         (inherit (package-source base-rust))
+         ;; see https://github.com/rust-lang/rust/pull/125844
+         (patches (search-patches "rustc-unwinding-fix.patch")))))))
 
 (define-public rust-1.79
   (let ((base-rust (rust-bootstrapped-package rust-1.78 "1.79.0"
@@ -1027,7 +1034,7 @@ (define (make-ignore-test-list strs)
 ;;; Here we take the latest included Rust, make it public, and re-enable tests
 ;;; and extra components such as rustfmt.
 (define-public rust
-  (let ((base-rust rust-1.77))
+  (let ((base-rust rust-1.78))
     (package
       (inherit base-rust)
       (properties (append
@@ -1047,11 +1054,10 @@ (define-public rust
                          ;; These are referenced by the cargo output
                          ;; so we unbundle them.
                          "vendor/curl-sys/curl"
-                         "vendor/curl-sys-0.4.63+curl-8.1.2/curl"
                          "vendor/libffi-sys/libffi"
                          "vendor/libnghttp2-sys/nghttp2"
                          "vendor/libz-sys/src/zlib"
-                         "vendor/libz-sys-1.1.9/src/zlib"))
+                         "vendor/libz-sys-1.1.12/src/zlib"))
              ;; Use the packaged nghttp2
              (delete-file "vendor/libnghttp2-sys/build.rs")
              (with-output-to-file "vendor/libnghttp2-sys/build.rs"
@@ -1167,6 +1173,11 @@ (define-public rust
                    (substitute* "features2.rs"
                      ,@(make-ignore-test-list
                         '("fn dep_with_optional_host_deps_activated"))))))
+             (add-after 'unpack 'disable-tests-requiring-crates.io
+               (lambda _
+                 (substitute* "src/tools/cargo/tests/testsuite/install.rs"
+                   ,@(make-ignore-test-list
+                      '("fn install_global_cargo_config")))))
              (add-after 'unpack 'patch-command-exec-tests
                ;; This test suite includes some tests that the stdlib's
                ;; `Command` execution properly handles in situations where
@@ -1225,7 +1236,7 @@ (define-public rust
                       ((" = rpath.*" all)
                        (string-append all
                                       "                "
-                                      "rustflags.arg(\"-Clink-args=-Wl,-rpath="
+                                      "self.rustflags.arg(\"-Clink-args=-Wl,-rpath="
                                       out "/lib\");\n"))))))
              (add-after 'configure 'add-gdb-to-config
                (lambda* (#:key inputs #:allow-other-keys)
-- 
2.45.2






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#72821] [PATCH 2/4] gnu: rust: Update to 1.79
  2024-08-26 17:40 ` [bug#72821] [PATCH 1/4] gnu: rust: Update to 1.78 brennan
@ 2024-08-26 17:40   ` brennan
  2024-08-26 17:40   ` [bug#72821] [PATCH 3/4] gnu: rust: Add rust 1.80.1 brennan
  2024-08-26 17:40   ` [bug#72821] [PATCH 4/4] gnu: rust: update to 1.80 brennan
  2 siblings, 0 replies; 6+ messages in thread
From: brennan @ 2024-08-26 17:40 UTC (permalink / raw)
  To: 72821; +Cc: Brennan Vincent, efraim

From: Brennan Vincent <brennan@umanwizard.com>

* gnu/packages/rust.scm (rust): Update to 1.79

Change-Id: Ic43b4c540413a0e1a08d46cca5a092badc221753
---
 gnu/packages/rust.scm | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 9987d5569f..403c3933d4 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1034,7 +1034,7 @@ (define (make-ignore-test-list strs)
 ;;; Here we take the latest included Rust, make it public, and re-enable tests
 ;;; and extra components such as rustfmt.
 (define-public rust
-  (let ((base-rust rust-1.78))
+  (let ((base-rust rust-1.79))
     (package
       (inherit base-rust)
       (properties (append
@@ -1048,19 +1048,18 @@ (define-public rust
           '(begin
              (for-each delete-file-recursively
                        '("src/llvm-project"
-                         "vendor/jemalloc-sys/jemalloc"
-                         "vendor/openssl-src/openssl"
-                         "vendor/tikv-jemalloc-sys/jemalloc"
+                         "vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
+                         "vendor/openssl-src-111.28.1+1.1.1w/openssl"
+                         "vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
                          ;; These are referenced by the cargo output
                          ;; so we unbundle them.
-                         "vendor/curl-sys/curl"
-                         "vendor/libffi-sys/libffi"
-                         "vendor/libnghttp2-sys/nghttp2"
-                         "vendor/libz-sys/src/zlib"
-                         "vendor/libz-sys-1.1.12/src/zlib"))
+                         "vendor/curl-sys-0.4.72+curl-8.6.0/curl"
+                         "vendor/libffi-sys-2.3.0/libffi"
+                         "vendor/libnghttp2-sys-0.1.9+1.58.0/nghttp2"
+                         "vendor/libz-sys-1.1.16/src/zlib"))
              ;; Use the packaged nghttp2
-             (delete-file "vendor/libnghttp2-sys/build.rs")
-             (with-output-to-file "vendor/libnghttp2-sys/build.rs"
+             (delete-file "vendor/libnghttp2-sys-0.1.9+1.58.0/build.rs")
+             (with-output-to-file "vendor/libnghttp2-sys-0.1.9+1.58.0/build.rs"
                (lambda _
                  (format #t "fn main() {~@
                          println!(\"cargo:rustc-link-lib=nghttp2\");~@
@@ -1098,7 +1097,10 @@ (define-public rust
                (lambda _
                  (substitute* "src/tools/cargo/tests/testsuite/git.rs"
                    ,@(make-ignore-test-list
-                      '("fn fetch_downloads_with_git2_first_")))))
+                      '("fn fetch_downloads_with_git2_first_")))
+                 (substitute* "src/tools/cargo/tests/testsuite/build.rs"
+                   ,@(make-ignore-test-list
+                      '("fn build_with_symlink_to_path_dependency_with_build_script_in_git")))))
              (add-after 'unpack 'disable-tests-requiring-mercurial
                (lambda _
                  (with-directory-excursion "src/tools/cargo/tests/testsuite/cargo_init"
-- 
2.45.2






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#72821] [PATCH 3/4] gnu: rust: Add rust 1.80.1
  2024-08-26 17:40 ` [bug#72821] [PATCH 1/4] gnu: rust: Update to 1.78 brennan
  2024-08-26 17:40   ` [bug#72821] [PATCH 2/4] gnu: rust: Update to 1.79 brennan
@ 2024-08-26 17:40   ` brennan
  2024-08-26 17:40   ` [bug#72821] [PATCH 4/4] gnu: rust: update to 1.80 brennan
  2 siblings, 0 replies; 6+ messages in thread
From: brennan @ 2024-08-26 17:40 UTC (permalink / raw)
  To: 72821; +Cc: Brennan Vincent, efraim

From: Brennan Vincent <brennan@umanwizard.com>

gnu/packages/rust.scm (new variable): rust-1.80

Change-Id: Ie7dd276f7b4d606660557f3da42064b04dda1435
---
 gnu/packages/rust.scm | 37 ++++++++++++++++++++++++++++++++++---
 1 file changed, 34 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 403c3933d4..0d3a11b696 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1020,6 +1020,33 @@ (define-public rust-1.79
                (("features = \\[\"fs\"" all)
                 (string-append all ", \"use-libc\""))))))))))
 
+(define-public rust-1.80
+  (let ((base-rust (rust-bootstrapped-package rust-1.79 "1.80.1"
+                                              "1i1dbpwnv6ak244lapsxvd26w6sbas9g4l6crc8bip2275j8y2rc")))
+    (package
+      (inherit base-rust)
+      (source
+       (origin
+         (inherit (package-source base-rust))
+         (snippet
+          '(begin
+             (for-each delete-file-recursively
+                       '("src/llvm-project"
+                         "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc"
+                         "vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
+                         "vendor/openssl-src-111.28.2+1.1.1w/openssl"
+                         "vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"))
+             ;; Remove vendored dynamically linked libraries.
+             ;; find . -not -type d -executable -exec file {} \+ | grep ELF
+             ;; Also remove the bundled (mostly Windows) libraries.
+             (for-each delete-file
+                       (find-files "vendor" "\\.(a|dll|exe|lib)$"))
+             ;; Adjust vendored dependency to explicitly use rustix with libc backend.
+             (substitute* '("vendor/tempfile-3.7.1/Cargo.toml"
+                            "vendor/tempfile-3.10.1/Cargo.toml")
+               (("features = \\[\"fs\"" all)
+                (string-append all ", \"use-libc\""))))))))))
+
 (define (make-ignore-test-list strs)
   "Function to make creating a list to ignore tests a bit easier."
   (map (lambda (str)
@@ -1070,9 +1097,13 @@ (define-public rust
              (for-each delete-file
                        (find-files "vendor" "\\.(a|dll|exe|lib)$"))
              ;; Adjust vendored dependency to explicitly use rustix with libc backend.
-             (substitute* "vendor/tempfile/Cargo.toml"
-               (("features = \\[\"fs\"" all)
-                (string-append all ", \"use-libc\"")))))))
+             (for-each
+              (lambda (f)
+                (substitute* f
+                  (("features = \\[\"fs\"" all)
+                   (string-append all ", \"use-libc\""))))
+              '("vendor/tempfile-3.10.1/Cargo.toml"
+                "vendor/tempfile-3.7.1/Cargo.toml"))))))
       (arguments
        (substitute-keyword-arguments
          (strip-keyword-arguments '(#:tests?)
-- 
2.45.2






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#72821] [PATCH 4/4] gnu: rust: update to 1.80
  2024-08-26 17:40 ` [bug#72821] [PATCH 1/4] gnu: rust: Update to 1.78 brennan
  2024-08-26 17:40   ` [bug#72821] [PATCH 2/4] gnu: rust: Update to 1.79 brennan
  2024-08-26 17:40   ` [bug#72821] [PATCH 3/4] gnu: rust: Add rust 1.80.1 brennan
@ 2024-08-26 17:40   ` brennan
  2 siblings, 0 replies; 6+ messages in thread
From: brennan @ 2024-08-26 17:40 UTC (permalink / raw)
  To: 72821; +Cc: Brennan Vincent, efraim

From: Brennan Vincent <brennan@umanwizard.com>

gnu/packages/rust.scm (rust): update to 1.80.

Change-Id: Ife65cb52362a30df8aabd4255a3fdc3c3d60e7bb
---
 gnu/packages/rust.scm | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 0d3a11b696..f73dad2f00 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1061,7 +1061,7 @@ (define (make-ignore-test-list strs)
 ;;; Here we take the latest included Rust, make it public, and re-enable tests
 ;;; and extra components such as rustfmt.
 (define-public rust
-  (let ((base-rust rust-1.79))
+  (let ((base-rust rust-1.80))
     (package
       (inherit base-rust)
       (properties (append
@@ -1076,7 +1076,7 @@ (define-public rust
              (for-each delete-file-recursively
                        '("src/llvm-project"
                          "vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
-                         "vendor/openssl-src-111.28.1+1.1.1w/openssl"
+                         "vendor/openssl-src-111.28.2+1.1.1w/openssl"
                          "vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc"
                          ;; These are referenced by the cargo output
                          ;; so we unbundle them.
@@ -1211,6 +1211,15 @@ (define-public rust
                  (substitute* "src/tools/cargo/tests/testsuite/install.rs"
                    ,@(make-ignore-test-list
                       '("fn install_global_cargo_config")))))
+             (add-after 'unpack 'disable-miscellaneous-broken-tests
+               (lambda _
+                 (substitute* "src/tools/cargo/tests/testsuite/check_cfg.rs"
+                   ;; These apparently get confused by the fact that
+                   ;; we're building in a directory containing the
+                   ;; string "rustc"
+                   ,@(make-ignore-test-list
+                      '("fn config_fingerprint"
+                        "fn features_fingerprint")))))
              (add-after 'unpack 'patch-command-exec-tests
                ;; This test suite includes some tests that the stdlib's
                ;; `Command` execution properly handles in situations where
-- 
2.45.2






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#72821: [PATCH 0/4] Update to latest rust
  2024-08-26 17:38 [bug#72821] [PATCH 0/4] Update to latest rust brennan
  2024-08-26 17:40 ` [bug#72821] [PATCH 1/4] gnu: rust: Update to 1.78 brennan
@ 2024-09-17  9:56 ` Efraim Flashner
  1 sibling, 0 replies; 6+ messages in thread
From: Efraim Flashner @ 2024-09-17  9:56 UTC (permalink / raw)
  To: brennan; +Cc: 72821-done

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

On Mon, Aug 26, 2024 at 01:38:36PM -0400, brennan@umanwizard.com wrote:
> From: Brennan Vincent <brennan@umanwizard.com>
> 
> This is broken into four separate patches: one adds rust 1.80,
> while the other three each advance the main exported Rust
> by one major version.
> 
> Brennan Vincent (4):
>   gnu: rust: Update to 1.78
>   gnu: rust: Update to 1.79
>   gnu: rust: Add rust 1.80.1
>   gnu: rust: update to 1.80
> 
>  .../patches/rustc-unwinding-fix.patch         | 29 ++++++
>  gnu/packages/rust.scm                         | 91 +++++++++++++++----
>  2 files changed, 101 insertions(+), 19 deletions(-)
>  create mode 100644 gnu/packages/patches/rustc-unwinding-fix.patch
> 
> -- 
> 2.45.2

Thanks. Patches pushed to the rust-team branch.

-- 
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-09-17  9:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-26 17:38 [bug#72821] [PATCH 0/4] Update to latest rust brennan
2024-08-26 17:40 ` [bug#72821] [PATCH 1/4] gnu: rust: Update to 1.78 brennan
2024-08-26 17:40   ` [bug#72821] [PATCH 2/4] gnu: rust: Update to 1.79 brennan
2024-08-26 17:40   ` [bug#72821] [PATCH 3/4] gnu: rust: Add rust 1.80.1 brennan
2024-08-26 17:40   ` [bug#72821] [PATCH 4/4] gnu: rust: update to 1.80 brennan
2024-09-17  9:56 ` bug#72821: [PATCH 0/4] Update to latest rust Efraim Flashner

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).