pcre regexps in git?
Fri Feb 25 08:56:25 GMT 2022
On Thu, Feb 24, 2022 at 09:32:29PM +0000, Adam Dinwoodie wrote:
> On Thu, Feb 24, 2022 at 04:19:13PM -0500, Anthony Heading wrote:
> > Hi,
> > I appreciate this is just a birthday wish-list item, but...
> > % git grep -P hopeful...
> > fatal: cannot use Perl-compatible regexes when not compiled with USE_LIBPCRE
> > It would be lovely (well, at least for me) if this could work.
> Huh. I think that used to work, so if it broke, it presumably broke
> somewhere during the Cygwin Git build process wrangling I've been doing
> of late. I'll see what I can do to get it working again for you!
It looks like this actually broke some time ago, when the upstream Git
project moved from using libpcre1 to libpcre2, which I didn't spot, and
so didn't realise I needed to update the set of dependencies that are
installed for building Git. Git's build-time config system is set up
such that, if it can't find a library it wants but doesn't strictly
need, it'll just silently carry on without it, so there's no indication
that there's any function missing until someone notices and complains.
So thank you, Anthony, for noticing and complaining!
(The above is not entirely true: fairly recently upstream Git added --
after I pointed out exactly this problem with a different library -- the
ability to tell the Git test suite that it should expect certain
function to be available regardless of what libraries are installed.
But I've not yet got around to setting that up for the Cygwin Git
builds, and it's unlikely to have caught this problem anyway, since it
predates that function being available.)
Anyway, the key fix here should be pretty straightforward; I think it'll
just be a case of rebuilding Git on a build server that has libpcre2
rather than libpcre1 installed. Currently the Git builds are failing
for entirely unrelated reasons -- I understand the problem but I'm not
yet certain what the right fix is -- but I'm currently expecting to be
able to sort this all out within a week.
More information about the Cygwin