All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/bat: fix build with GCC 15
@ 2025-09-02 13:42 El Mehdi YOUNES via buildroot
  2025-09-02 13:49 ` Thomas Petazzoni via buildroot
  2025-09-03 19:21 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 8+ messages in thread
From: El Mehdi YOUNES via buildroot @ 2025-09-02 13:42 UTC (permalink / raw)
  To: buildroot; +Cc: David Pierret, Thomas Petazzoni, El Mehdi YOUNES

Bat pulls in the onig crate (version 6.4.0) through syntect with the
default "regex-onig" feature. This crate depends on the Oniguruma C
library (via onig_sys), which fails to build with GCC 15 due to C23
keyword conflicts. Newer versions of onig fix this issue, but bat
cannot directly update the onig version because it is pinned by syntect.

To resolve the build failure, apply a patch that replaces the
"regex-onig" feature with "regex-fancy" in bat's minimal-application
feature set. This switches bat to use the pure-Rust fancy-regex engine
instead of Oniguruma, avoiding the problematic onig_sys dependency.

Fixes:

  https://autobuild.buildroot.net/?reason=bat-%

Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr>
---
 ...ig-by-regex-fancy-in-minimal-applica.patch | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 package/bat/0001-Replace-regex-onig-by-regex-fancy-in-minimal-applica.patch

diff --git a/package/bat/0001-Replace-regex-onig-by-regex-fancy-in-minimal-applica.patch b/package/bat/0001-Replace-regex-onig-by-regex-fancy-in-minimal-applica.patch
new file mode 100644
index 0000000000..6d13c406cc
--- /dev/null
+++ b/package/bat/0001-Replace-regex-onig-by-regex-fancy-in-minimal-applica.patch
@@ -0,0 +1,40 @@
+From 9b6727df25e45222b3863dbe5f5bc58237b68ab9 Mon Sep 17 00:00:00 2001
+From: El Mehdi YOUNES <elmehdi.younes@smile.fr>
+Date: Tue, 2 Sep 2025 14:02:11 +0200
+Subject: [PATCH] Replace regex-onig by regex-fancy in minimal-application
+
+The default "application" feature enables "minimal-application", which
+in turn pulls in the "regex-onig" feature of syntect. This brings in the
+onig crate (version 6.4.0) and its dependency onig_sys, which fail to
+build with GCC 15 due to C23 keyword conflicts.
+
+It is not possible to simply update the onig crate from bat itself,
+since its version is pinned indirectly by syntect. To avoid this
+dependency and fix the build, replace "regex-onig" with "regex-fancy" in
+"minimal-application". This makes bat use the pure-Rust fancy-regex
+engine instead of Oniguruma, removing the need for onig_sys and allowing
+the package to build with GCC 15.
+
+Upstream: not submitted
+
+Signed-off-by: El Mehdi YOUNES <elmehdi.younes@smile.fr>
+---
+ Cargo.toml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 80d19321..93a07a1d 100644
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -29,7 +29,7 @@ minimal-application = [
+     "clap",
+     "etcetera",
+     "paging",
+-    "regex-onig",
++    "regex-fancy",
+     "wild",
+ ]
+ git = ["git2"] # Support indicating git modifications
+-- 
+2.43.0
+
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2025-09-04 15:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-02 13:42 [Buildroot] [PATCH 1/1] package/bat: fix build with GCC 15 El Mehdi YOUNES via buildroot
2025-09-02 13:49 ` Thomas Petazzoni via buildroot
2025-09-02 14:56   ` El Mehdi YOUNES via buildroot
2025-09-02 15:11     ` Thomas Petazzoni via buildroot
2025-09-02 15:28       ` El Mehdi YOUNES via buildroot
2025-09-02 15:42         ` Thomas Petazzoni via buildroot
2025-09-03 19:21 ` Thomas Petazzoni via buildroot
2025-09-04 15:12   ` El Mehdi YOUNES via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.