[Privoxy-devel] PATCH for pcre2 support

Gagan Sidhu broly at mac.com
Thu Jun 15 20:46:38 CEST 2023


i did some more testing.

part of it is, i suspect, you’re not using the “CPPFLAGS” variable.
	- if i use CFLAGS instead of CPPFLAGS, i will get the same issues as you if my library/header are not in the default paths.
		-AC_EGREP_HEADER only works if we specify non-default header paths in CPPFLAGS.

anyways, i did tweak the configure.in to make it better, but CPPFLAGS is still required.

i tested it (again) for both pcre2 and pcre, and it looks fine.

sha256 sum is:
b740683a539f7c71dc4e918d94e7a01c2e702574e2d9b520bec7a23078ba7f58

(https://sourceforge.net/p/ijbswa/bugs/935/ <https://sourceforge.net/p/ijbswa/bugs/935/>) 


******** THE REAL PROBLEM IS THE -O2 FLAG IN “GNUmakefile” for the pcre2 build ************

the pcre2 build WILL NOT WORK WITH OPTIMISATIONS ENABLED. i do not know why.

so remove the -O2 flag in GNUmakefile when youare testing. you should get the following results:

2023-06-15 12:38:26: Executed 452 regression tests. Skipped 17. 435 successes, 17 failures.

from here, you should be able to determine why this is the case, but i am absolutely sure this patch works.


Thanks,
Gagan

> On Jun 15, 2023, at 7:15 AM, Gagan Sidhu <broly at mac.com> wrote:
> 
> thanks for catching this.
> 
> this is abug. for some reason when i cross compile, it works fine.
> 
> but when i build again on my system, i get the errors you’re talking about.
> 
> can you check the actual code changes though and i can worry about the automake stuff later?
> 
> i just tried to copy the complicated logic used by the original macros, but for pcre2.
> 
> turns out it’s not that simple :/
> 
> Thanks,
> Gagan
> 
>> On Jun 15, 2023, at 6:10 AM, Fabian Keil <fk at fabiankeil.de> wrote:
>> 
>> Gagan Sidhu <broly at mac.com> wrote on 2023-06-15 at 06:02:47:
>> 
>>> That doesn’t look right.
>>> 
>>> Your results are cached. You need to apply the patch and clear the existing autoconf variables since the configure script is different. 
>>> 
>>> I tried this patch before submitting and did not get that issue since I cleared old autoconf variables. 
>>> 
>>> Try that and report back.  But you can probably fix this in the generated makefile to see if the overall patch is okay. 
>> 
>> The same happens for me with cleared autoconf cache:
>> 
>> checking for getnameinfo... yes
>> checking for pcre_compile in -lpcre... yes
>> checking for pcre.h... yes
>> configure: WARNING: pcre old version installed
>> checking for regcomp in -lpcreposix... yes
>> checking for pcreposix.h... yes
>> checking for pcre2_compile_8 in -lpcre2-8... yes
>> checking for pcre2.h... yes
>> configure: WARNING: pcre2 old version installed
>> checking for regcomp in -lpcre2-posix... yes
>> checking for pcre2posix.h... yes
>> configure: WARNING: pcre2posix old version installed
>> Enabling support for client-specific tags.
>> checking for zlibVersion in -lz... yes
>> Enabling compression support.
>> configure: error: pcre2 or pcre library not detected.
>> 
>>>> This seems to be caused by the configure.in line:
>>>> 
>>>>    AC_EGREP_HEADER(pcre2_pattern_info, pcre2.h, [AC_MSG_WARN([[pcre2 old version installed]]); have_pcre2=no], [have_pcre2=yes; AC_DEFINE(HAVE_PCRE2)])
>>>> 
>>>> My system has pcre2 10.42 installs which seems to come
>>>> with pcre2_pattern_info.
>> 
>> Do you remember why you added this check?
>> 
>> Fabian
>> _______________________________________________
>> Privoxy-devel mailing list
>> Privoxy-devel at lists.privoxy.org
>> https://lists.privoxy.org/mailman/listinfo/privoxy-devel
> 
> _______________________________________________
> Privoxy-devel mailing list
> Privoxy-devel at lists.privoxy.org
> https://lists.privoxy.org/mailman/listinfo/privoxy-devel



More information about the Privoxy-devel mailing list