Following a discussion on the EPICS mailing list, to keep track on the progress of the topic:
I faced today the fact that on my system (OpenSuSE Tumbleweed) there is no libpcre anymore. It got replaced completely by its successor libpcre2.
I came across that when trying to recompile my EPICS installation. It failed when building StreamDevice.
Now there are three options how to solve that:
1) Install the old libpcre 8.45 from source by hand in the system. Might still work for some time, but what when not? It has not been updated since 2021
and might contain bugs and security issues that will not be fixed.
2) Install libpcre as part of StreamDevice. It faces the same problems as above.
3) Port StreamDevice to libpcre2. That would make it future prove and more easy to maintain.
For me #1 is only a short term solution. For now only my OpenSuSE system is affected and I can build a package for that, but what when systems like Debian/Ubuntu arfe affected?
As I use E3 to deploy my EPICS installations now, I could setup an installation of libpcre for that, but it would require to fork the e3-StreamDevice wrapper from ESS
to add the pcre module dependency. I would prefer not to do that as it could make things incompatible at some time.
So this leaves #3 as the optimal solution an I would like to know if somebody has already looked into that or is actively working on it.
I took a quick look into that issue and found out that the API of libpcre2 has significantly changed.
E.g. pcre is replaced by pcre2_code. Any function that returns a pcre2_code structure has to be matched by a pcre2_free_code call
to prevent memory leaks. Some functions like pcre_infofull or pcre_exec have been replaced by others with different name and parameter list.
Jörn
Following a discussion on the EPICS mailing list, to keep track on the progress of the topic:
I took a quick look into that issue and found out that the API of libpcre2 has significantly changed.
E.g. pcre is replaced by pcre2_code. Any function that returns a pcre2_code structure has to be matched by a pcre2_free_code call
to prevent memory leaks. Some functions like pcre_infofull or pcre_exec have been replaced by others with different name and parameter list.
Jörn