The next failure happens building php_mod_bt. It looks like multiple headers are defining regex stuff, from both glibc-headers and httpd-devel.
Misdiagnosis. The problem is a conflict between the regex stuff in Apache and PHP headers. To reproduce, make a simple source file and attempt to compile it:
echo > foo.c << EOF
#include "php.h"
#include "httpd.h"
EOF
gcc `php-config --includes` `apr-config --includes` -I /usr/include/httpd -c foo.c
Now look at the definition of REG_ICASE is /usr/include/httpd/pcreposix.h and /usr/include/regex.h.
I'm not sure how to address this or who to file this with. For now I'll post it to the mod_bt maintainer.