[Privoxy-devel] PATCH for pcre2 support
Gagan Sidhu
broly at mac.com
Sat Jun 17 14:40:29 CEST 2023
FINALLY!
> On Jun 17, 2023, at 6:19 AM, Fabian Keil <fk at fabiankeil.de> wrote:
>
> Gagan Sidhu <broly at mac.com> wrote on 2023-06-15 at 12:46:38:
>
>> 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/>)
>
> Thanks a lot for the update. pcre2 is properly detected on my system now.
>
>> ******** 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:
>
> Are you saying it doesn't work for you if Privoxy is compiled
> with "-O2" or if the pcre2 library is compiled with "-O2"?
>
> The former seem to work for me. I haven't checked how pcre2 was compiled.
don’t worry about this. the success of your tests suggests that it’s a CLANG/LLVM issue.
-if anyone reports problems on mac using pcre2 and privoxy, you can look into how the optimisations work.
-from my evaluation, it must be compiled with -O0, which enables the “-mrelax-all” flag.
- without this flag, optimisations seem to clobber the stack and the cgi server fails to run properly
-and thus, it will exhibit the issue you first observed when i originally proposed an earlier form of this patch.
anyways. let’s get this bad boy rolled into the tree. i’m delighted to hear everything is operational and we finally have pcre2 for privoxy!
>
>> 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.
>
> Good news. With the attached patch the tests pass for me:
>
> fk at t520 ~/git/privoxy $privoxy-regression-test.pl
> 2023-06-17 14:12:08: Asking Privoxy for the number of action files available ...
> 2023-06-17 14:12:08: Gathering regression tests from 11 action file(s) delivered by Privoxy 3.0.35.
> 2023-06-17 14:12:08: Executing regression tests ...
> 2023-06-17 14:12:21: Executed 1241 regression tests. Skipped 79. 1241 successes, 0 failures.
>
> Fabian
> <0001-template_fill-Update-the-buffer-size-after-running-p.patch>
More information about the Privoxy-devel
mailing list