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

Debian is planning to discontinue libpcre3, the Perl Regex library that implements SWI-Prolog鈥檚 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鈥檚 also packages/xpce/src/rgx 鈥 I presume it doesn鈥檛 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鈥檚 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鈥檛 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鈥檚 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.