* [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
* Re: [Buildroot] [PATCH 1/1] package/bat: fix build with GCC 15 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-03 19:21 ` Thomas Petazzoni via buildroot 1 sibling, 1 reply; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2025-09-02 13:49 UTC (permalink / raw) To: El Mehdi YOUNES; +Cc: buildroot, David Pierret, Romain Naour Hello, Thanks for your patch! On Tue, 2 Sep 2025 15:42:50 +0200 El Mehdi YOUNES <elmehdi.younes@smile.fr> wrote: > 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-% This link doesn't make sense as it can contain failures unrelated to this one, especially in the future. You need to include the link to one specific build result. > 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 Why? > +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", > + ] Are you sure this works? Patches are applied *after* the download step, during which we do the Cargo vendoring. Also, if you pull in more dependencies, I would expect the hash of the tarball to change, since we hash the tarball after Cargo vendoring. Am I missing something here? Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/bat: fix build with GCC 15 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 0 siblings, 1 reply; 8+ messages in thread From: El Mehdi YOUNES via buildroot @ 2025-09-02 14:56 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: buildroot, David Pierret, Romain Naour Le 02/09/2025 à 15:49, Thomas Petazzoni a écrit : > Hello, > > Thanks for your patch! > > On Tue, 2 Sep 2025 15:42:50 +0200 > El Mehdi YOUNES <elmehdi.younes@smile.fr> wrote: > >> 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-% > This link doesn't make sense as it can contain failures unrelated to > this one, especially in the future. You need to include the link to one > specific build result. I can fix this in a v2 if needed. > >> 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 > Why? Do you mean why we are switching from 'regex-onig' to 'regex-fancy', or why the patch has not been submitted upstream? > >> +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", >> + ] > Are you sure this works? Patches are applied *after* the download step, > during which we do the Cargo vendoring. Also, if you pull in more > dependencies, I would expect the hash of the tarball to change, since > we hash the tarball after Cargo vendoring. > > Am I missing something here? In this patch, I switched the feature from 'regex-onig' to 'regex-fancy'. This does not affect vendoring in our case, since vendoring is based on Cargo.lock. In the current Cargo.lock, 'syntect' already lists both 'fancy-regex' and 'onig' as dependencies. Therefore, the set of crates included in vendoring remains exactly the same before and after the patch (I tested this locally). What really changes is only at compile time: after the patch, Cargo builds with 'fancy-regex' instead of 'onig'/'onig_sys'. Do you think I should avoid this approach? If so, I can look into another ways to fix this > > Thomas Thanks El Mehdi _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/bat: fix build with GCC 15 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 0 siblings, 1 reply; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2025-09-02 15:11 UTC (permalink / raw) To: El Mehdi YOUNES; +Cc: buildroot, David Pierret, Romain Naour On Tue, 2 Sep 2025 16:56:59 +0200 El Mehdi YOUNES <elmehdi.younes@smile.fr> wrote: > > This link doesn't make sense as it can contain failures unrelated to > > this one, especially in the future. You need to include the link to one > > specific build result. > I can fix this in a v2 if needed. 👍️ > >> +Upstream: not submitted > > Why? > > Do you mean why we are switching from 'regex-onig' to 'regex-fancy', > > or why the patch has not been submitted upstream? Why the patch was not submitted upstream. > In this patch, I switched the feature from 'regex-onig' to 'regex-fancy'. > This does not affect vendoring in our case, since vendoring is based on > Cargo.lock. In the current Cargo.lock, 'syntect' already lists both > 'fancy-regex' and 'onig' as dependencies. Therefore, the set of crates > included in vendoring remains exactly the same before and after the patch > (I tested this locally). > > What really changes is only at compile time: after the patch, Cargo builds > with 'fancy-regex' instead of 'onig'/'onig_sys'. > > Do you think I should avoid this approach? If so, I can look into another > ways to fix this Aaah, makes sense. I was not aware of this mechanism. Sounds good. Could you submit a v2 to fix the other minor issues? Thanks a lot! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/bat: fix build with GCC 15 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 0 siblings, 1 reply; 8+ messages in thread From: El Mehdi YOUNES via buildroot @ 2025-09-02 15:28 UTC (permalink / raw) To: Thomas Petazzoni; +Cc: buildroot, David Pierret, Romain Naour Le 02/09/2025 à 17:11, Thomas Petazzoni a écrit : > On Tue, 2 Sep 2025 16:56:59 +0200 > El Mehdi YOUNES <elmehdi.younes@smile.fr> wrote: > >>> This link doesn't make sense as it can contain failures unrelated to >>> this one, especially in the future. You need to include the link to one >>> specific build result. >> I can fix this in a v2 if needed. > 👍️ > >>>> +Upstream: not submitted >>> Why? >> Do you mean why we are switching from 'regex-onig' to 'regex-fancy', >> >> or why the patch has not been submitted upstream? > Why the patch was not submitted upstream. The patch was not submitted upstream because there is already an ongoing discussion about removing Oniguruma from bat altogether, since Oniguruma has been declared archived: https://github.com/sharkdp/bat/issues/3285 For now, some features in bat still depend on Oniguruma by default, so upstream keeps 'regex-onig' as the default engine. That’s why I did not propose this patch upstream. > >> In this patch, I switched the feature from 'regex-onig' to 'regex-fancy'. >> This does not affect vendoring in our case, since vendoring is based on >> Cargo.lock. In the current Cargo.lock, 'syntect' already lists both >> 'fancy-regex' and 'onig' as dependencies. Therefore, the set of crates >> included in vendoring remains exactly the same before and after the patch >> (I tested this locally). >> >> What really changes is only at compile time: after the patch, Cargo builds >> with 'fancy-regex' instead of 'onig'/'onig_sys'. >> >> Do you think I should avoid this approach? If so, I can look into another >> ways to fix this > Aaah, makes sense. I was not aware of this mechanism. Sounds good. > Could you submit a v2 to fix the other minor issues? According to the upstream discussion, it still makes sense for bat to keep Oniguruma as the default engine for now. So before sending a v2, I would like to take a step back and explore another approach. I know that 'onig_sys' can sometimes link against a system-provided Oniguruma library instead of compiling it. In Buildroot we already have 'oniguruma' available as a package, so we could consider using that system library rather than patching bat to switch to 'regex-fancy'. This way, we could keep bat aligned with upstream while still fixing the GCC 15 build issue. What do you think about this? see https://crates.io/crates/onig/6.5.1 I will look into this option and then come back with what I find, to get your opinion before sending a v2. > > Thanks a lot! > > Thomas _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/bat: fix build with GCC 15 2025-09-02 15:28 ` El Mehdi YOUNES via buildroot @ 2025-09-02 15:42 ` Thomas Petazzoni via buildroot 0 siblings, 0 replies; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2025-09-02 15:42 UTC (permalink / raw) To: El Mehdi YOUNES; +Cc: buildroot, David Pierret, Romain Naour On Tue, 2 Sep 2025 17:28:41 +0200 El Mehdi YOUNES <elmehdi.younes@smile.fr> wrote: > The patch was not submitted upstream because there is already an ongoing > discussion about removing Oniguruma from bat altogether, since Oniguruma > has been declared archived: > > https://github.com/sharkdp/bat/issues/3285 > > For now, some features in bat still depend on Oniguruma by default, so > upstream keeps 'regex-onig' as the default engine. That’s why I did not > propose this patch upstream. Would be good to have this extensive explanation in the patch, instead of just "Upstream: not submitted". > According to the upstream discussion, it still makes sense for bat to > keep Oniguruma as the default engine for now. So before sending a v2, I > would like to take a step back and explore another approach. > > I know that 'onig_sys' can sometimes link against a system-provided > Oniguruma library instead of compiling it. In Buildroot we > already have 'oniguruma' available as a package, so we could consider > using that system library rather than patching bat to switch to > 'regex-fancy'. This way, we could keep bat aligned with upstream while > still fixing the GCC 15 build issue. What do you think about this? > > see > > https://crates.io/crates/onig/6.5.1 That would work with me as well. What's important is that we have a GCC 15.x build fix available in the short term. Another option is to take your quick fix as-is, and later on improve to use again Oniguruma. Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/bat: fix build with GCC 15 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-03 19:21 ` Thomas Petazzoni via buildroot 2025-09-04 15:12 ` El Mehdi YOUNES via buildroot 1 sibling, 1 reply; 8+ messages in thread From: Thomas Petazzoni via buildroot @ 2025-09-03 19:21 UTC (permalink / raw) To: El Mehdi YOUNES via buildroot; +Cc: El Mehdi YOUNES, David Pierret On Tue, 2 Sep 2025 15:42:50 +0200 El Mehdi YOUNES via buildroot <buildroot@buildroot.org> wrote: > 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 Tested-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> If you fix the autobuild.buildroot.net URL and clarify the "Upstream: not submitted" tag in the patch, this is good to go for me as it allows to fix the build issue. Thanks! Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/bat: fix build with GCC 15 2025-09-03 19:21 ` Thomas Petazzoni via buildroot @ 2025-09-04 15:12 ` El Mehdi YOUNES via buildroot 0 siblings, 0 replies; 8+ messages in thread From: El Mehdi YOUNES via buildroot @ 2025-09-04 15:12 UTC (permalink / raw) To: Thomas Petazzoni, El Mehdi YOUNES via buildroot; +Cc: David Pierret Le 03/09/2025 à 21:21, Thomas Petazzoni a écrit : > On Tue, 2 Sep 2025 15:42:50 +0200 > El Mehdi YOUNES via buildroot <buildroot@buildroot.org> wrote: > >> 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 > Tested-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > > If you fix the autobuild.buildroot.net URL and clarify the "Upstream: > not submitted" tag in the patch, this is good to go for me as it allows > to fix the build issue. > > Thanks! Done! I sent a v2. Best regards, El Mehdi > Thomas _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [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 a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox