build apache ошибка httpd-2.2.22 /server/util_pcre.c:140: undefined reference to pcre_info

нужно было добавить модуль actions к сборке apache на freebsd под управлением directadmin

cd /usr/local/directadmin/custombuild
mkdir -p custom/ap2
cp configure/ap2/configure.apache custom/ap2/configure.apache
vi custom/ap2/configure.apache

в файл custom/ap2/configure.apache добавил —enable-actions
Запустил пересборку:

./build clean
./build apache

получил ошибку:

httpd-2.2.22/server/util_pcre.c:140: undefined reference to `pcre_info’


в новой версии pcre убрали pcre_info. Решение нашлось в багтрекере apache

распаковываем httpd-2.2.22.tar.gz

tar -xzf httpd-2.2.22.tar.gz
cd httpd-2.2.22

меняем в файле server/util_pcre.c строчку

preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL);
на
pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT, &(preg->re_nsub));

и в файле include/ap_regex.h

apr_size_t re_nsub;
на
int re_nsub;

дальше идем снова в /usr/local/directadmin/custombuild. Удаляем архив, создаем новый из наших файлов. снимаем md5 сумму с архива, заменяем ее в файле versions.txt для apache-2.2.22, иначе перезакачает новый архив. И успешно собираем снова apache

cd /usr/local/directadmin/custombuild
rm -rf httpd-2.2.22.tar.gz
tar -czf httpd-2.2.22.tar.gz httpd-2.2.22
md5 httpd-2.2.22.tar.gz
vi versions.txt
./build apache

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>