public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/chromium] epel9-next: - Fix FTBFS on el9, error: undefined symbol: __rustc::__rust_alloc_error_handler_should_panic
@ 2026-08-07 16:08 Than Ngo
  0 siblings, 0 replies; only message in thread
From: Than Ngo @ 2026-08-07 16:08 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/chromium
            Branch : epel9-next
            Commit : 63634a11c26288f90813b841919e37162bb223b7
            Author : Than Ngo <than@redhat.com>
            Date   : 2026-02-16T14:51:41+01:00
            Stats  : +147/-16 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/chromium/c/63634a11c26288f90813b841919e37162bb223b7?branch=epel9-next

            Log:
            - Fix FTBFS on el9, error: undefined symbol: __rustc::__rust_alloc_error_handler_should_panic
- Fix FTBFS on el9, error[E0658]: the target feature “avx512f” is currently unstable
- Remove absolete -rust-libadler2.patch

---
diff --git a/chromium-144-rust-libadler2.patch b/chromium-144-rust-libadler2.patch
deleted file mode 100644
index 631a321..0000000
--- a/chromium-144-rust-libadler2.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -up chromium-144.0.7559.31/build/rust/std/BUILD.gn.than chromium-144.0.7559.31/build/rust/std/BUILD.gn
---- chromium-144.0.7559.31/build/rust/std/BUILD.gn.than	2025-12-26 15:06:36.274081861 +0100
-+++ chromium-144.0.7559.31/build/rust/std/BUILD.gn	2025-12-26 16:11:45.697054423 +0100
-@@ -55,11 +55,7 @@ if (toolchain_has_rust) {
-       "miniz_oxide",
-       "object",
-     ]
--    if (rustc_nightly_capability) {
--      stdlib_files += [ "adler2" ]
--    } else {
--      stdlib_files += [ "adler" ]
--    }
-+    stdlib_files += [ "adler2" ]
-   }
- 
-   if (toolchain_for_rust_host_build_tools) {

diff --git a/chromium-145-rust-1.88-enable-unstable_features.patch b/chromium-145-rust-1.88-enable-unstable_features.patch
new file mode 100644
index 0000000..7479b9e
--- /dev/null
+++ b/chromium-145-rust-1.88-enable-unstable_features.patch
@@ -0,0 +1,117 @@
+error[E0658]: the target feature `avx512f` is currently unstable
+   --> ../../third_party/rust/chromium_crates_io/vendor/jxl_simd-v0_2/src/x86_64/avx512.rs:123:26
+    |
+123 |         #[target_feature(enable = "avx512f")]
+    |                          ^^^^^^^^^^^^^^^^^^
+    |
+    = note: see issue #44839 <https://github.com/rust-lang/rust/issues/44839> for more information
+    = help: add `#![feature(avx512_target_feature)]` to the crate attributes to enable
+    = note: this compiler was built on 2025-06-23; consider upgrading it if it is out of date
+
+Fix FTBFS on el9
+
+diff -up chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl_simd-v0_2/src/lib.rs.me chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl_simd-v0_2/src/lib.rs
+--- chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl_simd-v0_2/src/lib.rs.me	2026-02-12 20:44:24.000000000 +0100
++++ chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl_simd-v0_2/src/lib.rs	2026-02-15 20:10:02.848196172 +0100
+@@ -4,6 +4,8 @@
+ // license that can be found in the LICENSE file.
+ 
+ #![allow(clippy::too_many_arguments)]
++#![feature(avx512_target_feature)]
++#![feature(stdarch_x86_avx512)]
+ 
+ use std::{
+     fmt::Debug,
+diff -up chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl_transforms-v0_2/src/lib.rs.me chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl_transforms-v0_2/src/lib.rs
+--- chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl_transforms-v0_2/src/lib.rs.me	2026-02-12 20:44:24.000000000 +0100
++++ chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl_transforms-v0_2/src/lib.rs	2026-02-15 20:09:43.548731085 +0100
+@@ -3,6 +3,9 @@
+ // Use of this source code is governed by a BSD-style
+ // license that can be found in the LICENSE file.
+ 
++#![feature(avx512_target_feature)]
++#![feature(stdarch_x86_avx512)]
++
+ mod idct2d;
+ mod reinterpreting_dct2d;
+ pub mod transform;
+diff -up chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl-v0_2/src/lib.rs.me chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl-v0_2/src/lib.rs
+--- chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl-v0_2/src/lib.rs.me	2026-02-12 20:44:24.000000000 +0100
++++ chromium-145.0.7632.75/third_party/rust/chromium_crates_io/vendor/jxl-v0_2/src/lib.rs	2026-02-15 20:11:01.678559809 +0100
+@@ -3,6 +3,10 @@
+ // Use of this source code is governed by a BSD-style
+ // license that can be found in the LICENSE file.
+ 
++#![feature(avx512_target_feature)]
++#![feature(stdarch_x86_avx512)]
++#![feature(non_null_from_ref)]
++
+ #![deny(unsafe_code)]
+ pub mod api;
+ pub mod bit_reader;
+diff -up chromium-145.0.7632.75/third_party/rust/jxl_simd/v0_2/BUILD.gn.me chromium-145.0.7632.75/third_party/rust/jxl_simd/v0_2/BUILD.gn
+--- chromium-145.0.7632.75/third_party/rust/jxl_simd/v0_2/BUILD.gn.me	2026-02-12 20:44:24.000000000 +0100
++++ chromium-145.0.7632.75/third_party/rust/jxl_simd/v0_2/BUILD.gn	2026-02-15 20:15:51.823722639 +0100
+@@ -36,6 +36,10 @@ cargo_crate("lib") {
+ 
+   allow_unsafe = true
+ 
++  rustflags = [
++    "-Zallow-features=stdarch_x86_avx512,avx512_target_feature",
++  ]
++
+   features = [
+     "all-simd",
+     "avx",
+@@ -69,6 +73,7 @@ cargo_crate("lib") {
+   # `extra_kv.configs_to_remove` and `extra_kv.configs_to_add` from
+   # `gnrt_config.toml`).
+   _configs_to_remove += [ "//build/config/compiler:default_optimization" ]
++  _configs_to_remove += [ "//build/config/compiler:disallow_unstable_features" ]
+   _configs_to_add += [ "//build/config/compiler:optimize" ]
+ 
+   # Applying config changes.
+diff -up chromium-145.0.7632.75/third_party/rust/jxl_transforms/v0_2/BUILD.gn.me chromium-145.0.7632.75/third_party/rust/jxl_transforms/v0_2/BUILD.gn
+--- chromium-145.0.7632.75/third_party/rust/jxl_transforms/v0_2/BUILD.gn.me	2026-02-12 20:44:24.000000000 +0100
++++ chromium-145.0.7632.75/third_party/rust/jxl_transforms/v0_2/BUILD.gn	2026-02-15 20:17:33.887730035 +0100
+@@ -45,6 +45,10 @@ cargo_crate("lib") {
+ 
+   allow_unsafe = true
+ 
++  rustflags = [
++    "-Zallow-features=stdarch_x86_avx512,avx512_target_feature",
++  ]
++
+   deps = [ "//third_party/rust/jxl_simd/v0_2:lib" ]
+ 
+   # Only for usage from third-party crates. Add the crate to
+@@ -72,6 +76,7 @@ cargo_crate("lib") {
+   # `extra_kv.configs_to_remove` and `extra_kv.configs_to_add` from
+   # `gnrt_config.toml`).
+   _configs_to_remove += [ "//build/config/compiler:default_optimization" ]
++  _configs_to_remove += [ "//build/config/compiler:disallow_unstable_features" ]
+   _configs_to_add += [ "//build/config/compiler:optimize" ]
+ 
+   # Applying config changes.
+diff -up chromium-145.0.7632.75/third_party/rust/jxl/v0_2/BUILD.gn.me chromium-145.0.7632.75/third_party/rust/jxl/v0_2/BUILD.gn
+--- chromium-145.0.7632.75/third_party/rust/jxl/v0_2/BUILD.gn.me	2026-02-12 20:44:24.000000000 +0100
++++ chromium-145.0.7632.75/third_party/rust/jxl/v0_2/BUILD.gn	2026-02-15 20:16:47.026490882 +0100
+@@ -169,6 +169,10 @@ cargo_crate("lib") {
+ 
+   allow_unsafe = true
+ 
++  rustflags = [
++    "-Zallow-features=stdarch_x86_avx512,avx512_target_feature,non_null_from_ref",
++  ]
++
+   deps = [
+     "//third_party/rust/array_init/v2:lib",
+     "//third_party/rust/byteorder/v1:lib",
+@@ -201,6 +205,7 @@ cargo_crate("lib") {
+   # `extra_kv.configs_to_remove` and `extra_kv.configs_to_add` from
+   # `gnrt_config.toml`).
+   _configs_to_remove += [ "//build/config/compiler:default_optimization" ]
++  _configs_to_remove += [ "//build/config/compiler:disallow_unstable_features" ]
+   _configs_to_add += [ "//build/config/compiler:optimize" ]
+ 
+   # Applying config changes.

diff --git a/chromium-145-rust-1.88-undefined-symbol.patch b/chromium-145-rust-1.88-undefined-symbol.patch
new file mode 100644
index 0000000..b1c03f4
--- /dev/null
+++ b/chromium-145-rust-1.88-undefined-symbol.patch
@@ -0,0 +1,24 @@
+ld.lld: error: undefined symbol: __rustc::__rust_alloc_error_handler_should_panic
+ld.lld: error: undefined symbol: __rust_no_alloc_shim_is_unstable
+
+Fix build errors
+
+diff -up chromium-145.0.7632.75/build/rust/allocator/lib.rs.me chromium-145.0.7632.75/build/rust/allocator/lib.rs
+--- chromium-145.0.7632.75/build/rust/allocator/lib.rs.me	2026-02-15 12:35:09.666502144 +0100
++++ chromium-145.0.7632.75/build/rust/allocator/lib.rs	2026-02-15 12:39:06.951005953 +0100
+@@ -90,7 +90,6 @@ mod both_allocators {
+     #[linkage = "weak"]
+     fn __rust_no_alloc_shim_is_unstable_v2() {}
+ 
+-    #[cfg(rust_allocator_no_nightly_capability)]
+     #[rustc_std_internal_symbol]
+     #[linkage = "weak"]
+     fn __rust_no_alloc_shim_is_unstable() {}
+@@ -101,7 +100,6 @@ mod both_allocators {
+         0
+     }
+ 
+-    #[cfg(rust_allocator_no_nightly_capability)]
+     #[rustc_std_internal_symbol]
+     #[linkage = "weak"]
+     fn __rust_alloc_error_handler_should_panic() -> u8 {

diff --git a/chromium.spec b/chromium.spec
index 2c6e3dd..cafd840 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -343,6 +343,10 @@ Patch141: chromium-118-dma_buf_export_sync_file-conflict.patch
 
 #  fix ftbfs caused by old python-3.9 on el8
 Patch142: chromium-143-python-3.9-ftbfs.patch
+ 
+# fix ftbfs caused by old rustc-1.88 on el9
+Patch143: chromium-145-rust-1.88-enable-unstable_features.patch
+Patch144: chromium-145-rust-1.88-undefined-symbol.patch
 
 # add correct path for Qt6Gui header and libs
 Patch150: chromium-124-qt6.patch
@@ -1094,6 +1098,8 @@ Qt6 UI for chromium.
 %if 0%{?rhel} == 8 || 0%{?rhel} == 9
 %patch -P141 -p1 -b .dma_buf_export_sync_file-conflict
 %patch -P142 -p1 -b .python-3.9-ftbfs
+%patch -P143 -p1 -b .rust-1.88-enable-unstable_features
+%patch -P144 -p1 -b .rustc-1.88-undefined-symbol
 %endif
 
 %patch -P150 -p1 -b .qt6

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07 16:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-07 16:08 [rpms/chromium] epel9-next: - Fix FTBFS on el9, error: undefined symbol: __rustc::__rust_alloc_error_handler_should_panic Than Ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox