You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Richard Morris <ri...@gmail.com> on 2022/05/04 17:54:08 UTC

[users@httpd] Building Apache httpd 2.4.53 fails to find source-compiled PCRE2 10.40

Hi,

I've been trying to build Apache httpd 2.4.53 using a source-compiled 
version of PCRE2 (10.40) however when I run configure I get an error 
about it not being able to find a working script for PCRE2.  Upon 
looking closer, it appears that the configure script does find it but 
may not be using it correctly and I was hoping someone else could maybe 
see something that I am not.  Previously I had this build process 
working using Apache httpd 2.4.52 using PCRE 8.45.  I decided to try 
building the latest version of Apache httpd using PCRE2 since I saw that 
support was added.

Here's what I'm trying to build:

- Apache httpd 2.4.53
- PCRE2 source was built and installed at /usr/local/pcre2-10.40

This is how I'm configuring the build:

./configure \
   --prefix=/usr/local/apache2-2.4.53 \
   --with-included-apr \
   --enable-so \
   --with-pcre=/usr/local/pcre2-10.40 \
   --enable-rewrite

The configure process ends with this message:

...
checking for -pcre2-config... no
checking for -pcre-config... no
checking for pcre2-config... pcre2-config
configure: error: Did not find working script at pcre2-config

When I checked the config.log, I see these results:

configure:6105: result: none needed
configure:6144: checking for -pcre2-config
configure:6174: result: no
configure:6144: checking for -pcre-config
configure:6174: result: no
configure:6188: checking for pcre2-config
configure:6204: found /usr/local/pcre2-10.40/bin/pcre2-config
configure:6215: result: pcre2-config
configure:6236: error: Did not find working script at pcre2-config

It appears on line 6204 it finds my PCRE2 but then says it cannot find a 
working script.  I looked at the configure code and found this block of 
code that produces the error on line 6236:

if test "x$PCRE_CONFIG" != "x"; then
   if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else
     as_fn_error $? "Did not find working script at $PCRE_CONFIG" 
"$LINENO" 5
   fi
   ...

Taking a closer look, I checked the $PCRE_CONFIG value before it does 
the "--version" test and that value is set to "pcre2-config".  
Presumably the test would then run as "pcre2-config --version" which 
would be understandable that it would say it couldn't find a working 
script because it doesn't have the full path to the pcre2-config 
executable.  I would think if $PCRE_CONFIG was set to 
"/usr/local/pcre2-10.40/bin/pcre2-config" as it detected on line 6204, 
then the version test would succeed.

When I run "/usr/local/pcre2-10.40/bin/pcre2-config --version" I do get 
"10.40" as I would expect.

I did find these references with respect to the changes relating to 
adding PCRE2:

https://svn.apache.org/viewvc?view=revision&revision=1898399

https://gist.github.com/wrowe/73f655d13bbe0f12030aa4557e804d8a

There does appear to be changes to the configure script around this 
area.  I'm not familiar enough with the code to know if these changes 
have changed how the path to pcre2-config is detected.

Hopefully I haven't over thought this.  If someone would be able to 
provide some advice on how I can get Apache httpd 2.4.52 to build using 
PCRE2 10.40, I would really appreciate it.

Thank you!



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Building Apache httpd 2.4.53 fails to find source-compiled PCRE2 10.40

Posted by Eric Covener <co...@gmail.com>.
> ./configure \
>    --prefix=/usr/local/apache2-2.4.53 \
>    --with-included-apr \
>    --enable-so \
>    --with-pcre=/usr/local/pcre2-10.40 \
>    --enable-rewrite

After the update the argument to --with-pcre needs to be the path to
pcre2-config, not the directory.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Building Apache httpd 2.4.53 fails to find source-compiled PCRE2 10.40

Posted by Richard Morris <ri...@gmail.com>.
I tried this:

env PCRE_CONFIG=/usr/local/pcre2-10.40/bin/pcre2-config \
./configure \
   --prefix=/usr/local/apache2-2.4.53 \
   --with-included-apr \
   --enable-so \
   --with-pcre=/usr/local/pcre2-10.40 \
   --enable-rewrite

and it worked for me.  Thanks!

I didn't know about the PCRE_CONFIG variable.  I checked configure 
--help and the INSTALL readme but didn't find any mention of it.

My feeling is that --with-pcre isn't working as expected because the 
config.log does indicate it knows where to find pcre2-config but doesn't 
seem to use it.  At least with PCRE_CONFIG we can directly specify.

Thank you for all of your help!


On 2022-05-04 11:00 a.m., Zube wrote:
>> Hi,
> For 2.4.53 and pcre2 10.39, I set first:
>
> setenv PCRE_CONFIG /usr/local/aux/httpd/pcre1039/bin/pcre2-config
>
> (this is tcsh)
>
> and also used with configure:
>
> --with-pcre=/usr/local/aux/httpd/pcre1039
>
> and it seems to build fine.  Just rebuilt everything with ssl 1.1.1o
> today.
>
> Cheers,
> Zube

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org