[Buildroot] [PATCH 1/1] package/bat: fix build with GCC 15
El Mehdi YOUNES
elmehdi.younes at smile.fr
Tue Sep 2 15:28:41 UTC 2025
Le 02/09/2025 à 17:11, Thomas Petazzoni a écrit :
> On Tue, 2 Sep 2025 16:56:59 +0200
> El Mehdi YOUNES <elmehdi.younes at 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
More information about the buildroot
mailing list