Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Oct 2025 08:17:00 GMT
From:      Mikael Urankar <mikael@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: a448aeb00153 - main - devel/electron37: Fix build with rust 1.90.0
Message-ID:  <202510030817.5938H0sM085060@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a448aeb00153c3465a30ff41ecf43f8896a50d52

commit a448aeb00153c3465a30ff41ecf43f8896a50d52
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2025-09-24 11:13:28 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2025-10-03 08:16:49 +0000

    devel/electron37: Fix build with rust 1.90.0
    
    error:
    ld.lld: error: undefined symbol: __rustc::__rust_alloc_error_handler_should_panic_v2
    
    PR:             289709
    Approved by:    portmgr (build fix blanket)
---
 .../files/patch-build_rust_allocator_lib.rs        | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/devel/electron37/files/patch-build_rust_allocator_lib.rs b/devel/electron37/files/patch-build_rust_allocator_lib.rs
index c7a59f7ef428..cbffdab47210 100644
--- a/devel/electron37/files/patch-build_rust_allocator_lib.rs
+++ b/devel/electron37/files/patch-build_rust_allocator_lib.rs
@@ -1,15 +1,21 @@
 --- build/rust/allocator/lib.rs.orig	2025-08-11 20:33:34 UTC
 +++ build/rust/allocator/lib.rs
-@@ -86,6 +86,12 @@ mod both_allocators {
-     /// As part of rustc's contract for using `#[global_allocator]` without
-     /// rustc-generated shims we must define this symbol, since we are opting in
-     /// to unstable functionality. See https://github.com/rust-lang/rust/issues/123015
+@@ -90,7 +90,18 @@ mod both_allocators {
+     #[linkage = "weak"]
+     static __rust_no_alloc_shim_is_unstable: u8 = 0;
+ 
 +    #[rustc_std_internal_symbol]
 +    #[linkage = "weak"]
 +    fn __rust_no_alloc_shim_is_unstable_v2() {}
 +
-+    // TODO(crbug.com/422538133) Remove after rolling past
-+    // https://github.com/rust-lang/rust/pull/141061
-     #[no_mangle]
++    #[rustc_std_internal_symbol]
++    #[linkage = "weak"]
++    fn __rust_alloc_error_handler_should_panic_v2() -> u8 {
++        0
++    }
++
+     // Mangle the symbol name as rustc expects.
++    // TODO(crbug.com/440481922): Remove this after rolling past https://github.com/rust-lang/rust/pull/143387
+     #[rustc_std_internal_symbol]
+     #[allow(non_upper_case_globals)]
      #[linkage = "weak"]
-     static __rust_no_alloc_shim_is_unstable: u8 = 0;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510030817.5938H0sM085060>