Update library(regex) to pcre2 (request for help)

Debian is planning to discontinue libpcre3, the Perl Regex library that implements SWI-Prolog’s library(regex). Its replacement is called pcre2 :slight_smile: See Migrate to pcre2 · Issue #2 · SWI-Prolog/packages-pcre · GitHub.

Do we have someone willing to pick this up?

There’s also packages/xpce/src/rgx … I presume it doesn’t need to be updated?

I tried looking at the docs for PCRE, to see how much work migration to pcre2 would be, but got no response from PCRE2 specification … can I presume it’s the same as GitHub - PhilipHazel/pcre2: PCRE2 development is now based here. ?

You mentioned Debian … does anything also need to be done for RedHat?
Prerequisites for Debian based systems (Ubuntu, Mint, ...) (change libpcre3-dev to libpcre2-dev)
SWI-Prolog on Redhat (Fedora, RHEL, CentOS) (doesn’t seem to mention PCRE)

There are other mentions of pcre, for example README.mingw, scripts/macos-deps.sh, and maybe others.

If nobody else wants to do this, I can tackle it in my copious free time (that is, as long as there’s no time pressure to get it done).

No. That uses a different regex implementation (I think originating from tcl). Ideally that should probably also be moved to use pcre2. That is not of immediate concern though.

Works for me now. Looks like the same thing.

Debian announces discontinuing the old library. I guess the other distros have already done so or will do so in the next couple of years. Seems the dependency is not mentioned on the Redhat deps pge. It should (but now we can just as well wait for the new dep :slight_smile: ).

It will take some time for all the build instructions to get updated. That is usually the case. As long as CMake tells the user it cannot find libpcre2 most people will be able to solve the problem.