Hi all,
I'm using apr-0.9.12, apr-util-0.9.12, httpd-2.0.58 and
mod_perl-2.0.2 and gcc-3.2.2-5:


~/mod_perl-2.0.2$ perl Makefile.PL MP_APXS=/usr/sbin/apxs
Reading Makefile.PL args from @ARGV
MP_APXS = /usr/sbin/apxs
no conflicting prior mod_perl version found - good.
Configuring Apache/2.0.58 mod_perl2/2.0.2 Perl/v5.8.0



It seems that gcc fails to know about some apr identifiers which are
defined in /usr/include/apr-0/apr_errno.h and
/usr/include/apr-0/apr_file_io.h even though both are included in
src/modules/perl/modperl_io_apache.h and
xs/APR/PerlIO/modperl_apr_perlio.h :


~/mod_perl-2.0.2$ make && make test
[...]
gcc -I/home/anon/mod_perl-2.0.2/src/modules/perl
-I/home/anon/mod_perl-2.0.2/xs -I/usr/include/apr-0
-I/usr/include/apr-0 -I/usr/include/httpd -D_REENTRANT -D_GNU_SOURCE
-DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing
-I/usr/local/include -I/usr/include/gdbm
-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE -DMOD_PERL
-DMP_COMPAT_1X -DLINUX=2 -O2 -g -pipe -march=i386 -mcpu=i686 -fPIC \
-c modperl_util.c && mv modperl_util.o modperl_util.lo
modperl_util.c: In function `modperl_errsv':
modperl_util.c:210: `APR_OS_START_USERERR' undeclared (first use in
this function)
modperl_util.c:210: (Each undeclared identifier is reported only once
modperl_util.c:210: for each function it appears in.)
modperl_util.c: In function `modperl_perl_exit':
modperl_util.c:500: `APR_OS_START_USERERR' undeclared (first use in
this function)
make[1]: *** [modperl_util.lo] Error 1
make[1]: Leaving directory `/home/anon/mod_perl-2.0.2/src/modules/perl'
make: *** [modperl_lib] Error 2



If I put the following lines in src/modules/perl/mod_perl.h,
compilation is successful:

#include "apr_file_io.h"
#include "apr_errno.h"


However, if I didn't put #include "apr_file_io.h" in mod_perl.h,
compilation is unsuccessful:


gcc -I/home/anon/mod_perl-2.0.2/src/modules/perl
-I/home/anon/mod_perl-2.0.2/xs -I/usr/include/apr-0
-I/usr/include/apr-0 -I/usr/include/httpd -D_REENTRANT -D_GNU_SOURCE
-DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing
-I/usr/local/include -I/usr/include/gdbm
-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE -DMOD_PERL
-DMP_COMPAT_1X -DLINUX=2 -O2 -g -pipe -march=i386 -mcpu=i686 -fPIC \
-c modperl_constants.c && mv modperl_constants.o modperl_constants.lo
modperl_constants.c: In function `modperl_constants_lookup_apr_const':
modperl_constants.c:1340: `APR_UNKFILE' undeclared (first use in this function)
modperl_constants.c:1340: (Each undeclared identifier is reported only once
modperl_constants.c:1340: for each function it appears in.)
modperl_constants.c:1380: `APR_FILEPATH_ENCODING_UNKNOWN' undeclared
(first use in this function)
modperl_constants.c:1385: `APR_FILEPATH_ENCODING_LOCALE' undeclared
(first use in this function)
modperl_constants.c:1390: `APR_FILEPATH_ENCODING_UTF8' undeclared
(first use in this function)
make[1]: *** [modperl_constants.lo] Error 1
make[1]: Leaving directory `/home/anon/mod_perl-2.0.2/src/modules/perl'
make: *** [modperl_lib] Error 2



It seems that I have the same problem with older mod_perl releases such as 1.99.
Thanks in advance to anyone who offers some clues.

Regards,
KL