Bug 66000 - Configure option "--with-pcre" does not work anymore
Summary: Configure option "--with-pcre" does not work anymore
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.4.53
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-08 16:18 UTC by Michael Kaufmann
Modified: 2022-10-21 21:04 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kaufmann 2022-04-08 16:18:21 UTC
The configure option "--with-pcre" worked until httpd 2.4.52, but it does not work anymore with httpd 2.4.53.

Configure output:

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


Script to reproduce the problem:

#!/bin/bash

set -e

tar xvf httpd-2.4.53.tar.bz2
tar xvf pcre-8.45.tar.bz2
tar xvf expat-2.4.8.tar.bz2

(
    cd httpd-2.4.53/srclib
    tar xvf ../../apr-1.7.0.tar.bz2
    tar xvf ../../apr-util-1.6.1.tar.bz2

    ln -s apr-1.7.0 apr
    ln -s apr-util-1.6.1 apr-util
)

cd expat-2.4.8
./configure --prefix=/var/tmp/expat
make install

cd ..

cd pcre-8.45
./configure --prefix=/var/tmp/pcre --disable-cpp
make install

cd ..

cd httpd-2.4.53

# Workaround:
# PATH="/var/tmp/pcre/bin:${PATH}"
# export PATH

./configure --prefix=/var/tmp/httpd --with-included-apr --with-expat=/var/tmp/expat --with-pcre=/var/tmp/pcre
make install
Comment 1 Rainer Jung 2022-04-08 22:59:59 UTC
It is an annoyance: you now need to give the path to the pcre-config or pcre2-config, so in your case probably --with-pcre=/var/tmp/pcre/bin/pcre-config. It would be nice if you could report back, whether it works for you. Keeping this open, because I think we need to fix it (supporting path to installation dir in addition to path to pcre-config).
Comment 2 Michael Kaufmann 2022-04-19 11:06:33 UTC
Thank you for the suggestion, --with-pcre=/var/tmp/pcre/bin/pcre-config works for me. I agree that "--with-pcre" should also work when given the PCRE installation directory.
Comment 3 William A. Rowe Jr. 2022-10-21 21:04:34 UTC
This was an unintended breakage. It can be unintentionally masked when a libpcre2-dev system package is installed, but the explicit --with-pcre2=/path is ignored. So if a group of dependencies (pcre2, expat, zlib etc) exist at /path, and the system pcre2-config is resolved successfully, then the option accidentally succeeds. (This is how the bug was overlooked).

Working on the solution.