美好的一天。
我尝试使用Apache 2.4.7
在ubuntu上安装mod_perl(2.0.8)首先我跑
$ perl Makefile.PL MP_APXS=$HOME/httpd/bin/apxs MP_APR_CONFIG=$HOME/httpd/bin/apr-1-config
而不是
make&& make test产生错误
Connection.xs: In function ‘XS_Apache2__Connection_remote_addr’:
Connection.xs:117: error: ‘conn_rec’ has no member named ‘remote_addr’
Connection.xs: In function ‘XS_Apache2__Connection_remote_ip’:
Connection.xs:134: error: ‘conn_rec’ has no member named ‘remote_ip’
Connection.xs:138: error: ‘conn_rec’ has no member named ‘remote_ip’
make[3]: *** [Connection.o] Error 1
make[3]: Leaving directory `/home/perlito/mod_perl-2.0.8/WrapXS/Apache2/Connection'
make[2]: *** [subdirs] Error 2
make[2]: Leaving directory `/home/perlito/mod_perl-2.0.8/WrapXS/Apache2'
make[1]: *** [subdirs] Error 2
make[1]: Leaving directory `/home/perlito/mod_perl-2.0.8/WrapXS'
make: *** [subdirs] Error 2
有什么想法吗?
感谢。
更新
make source_scan给我这个错误
$ make source_scan
/home/perlito/perl5/bin/perl build/source_scan.pl
panic: multiple types without intervening comma in
' int(*ap_vhost_iterate_conn_cb)(void* baton, conn_rec* conn, server_rec* s)'
whited-out as
' int(*ap_vhost_iterate_conn_cb)( )'
panic: multiple types without intervening comma in
' void(*Perl_ophook_t)(PerlInterpreter* my_perl , OP*)'
whited-out as
' void(*Perl_ophook_t)( )'
panic: multiple types without intervening comma in
' void(*Perl_cpeep_t)(PerlInterpreter* my_perl , OP *, OP *)'
whited-out as
' void(*Perl_cpeep_t)( )'
panic: multiple types without intervening comma in
' void(*globhook_t)(PerlInterpreter* my_perl )'
whited-out as
' void(*globhook_t)( )'
Expecting parenth after identifier in `regexp_engine const * Perl_current_re_engine(PerlInterpreter* my_perl )'
after `regexp_engine ' at lib/ModPerl/CScan.pm line 819.
at lib/ModPerl/CScan.pm line 819.
ModPerl::CScan::do_declaration('regexp_engine const * Perl_current_re_engine(PerlInterpreter*...', 'HASH(0x92323f0)', 'HASH(0x9241a80)') called at lib/ModPerl/CScan.pm line 762
ModPerl::CScan::do_declarations('ARRAY(0x921b1a8)', 'HASH(0x92323f0)', 'HASH(0x9241a80)') called at /home/perlito/perl5/lib/site_perl/5.18.2/Data/Flow.pm line 93
Data::Flow::request('Apache2::ParseSource::Scan=ARRAY(0x92329b0)', 'parsed_fdecls') called at /home/perlito/perl5/lib/site_perl/5.18.2/Data/Flow.pm line 46
Data::Flow::get('Apache2::ParseSource::Scan=ARRAY(0x92329b0)', 'parsed_fdecls') called at lib/Apache2/ParseSource.pm line 68
Apache2::ParseSource::Scan::get('Apache2::ParseSource::Scan=ARRAY(0x92329b0)', 'parsed_fdecls') called at lib/Apache2/ParseSource.pm line 413
Apache2::ParseSource::get_functions('Apache2::ParseSource=HASH(0x92327d0)') called at lib/Apache2/ParseSource.pm line 509
Apache2::ParseSource::write_functions_pm('Apache2::ParseSource=HASH(0x92327d0)') called at build/source_scan.pl line 18
make: *** [source_scan] Error 255
答案 0 :(得分:1)
不幸的是,上游mod_perl尚未移植到Apache 2.4。
AFAIK Debian开发人员继续进行一些更改,允许您在Apache 2.4上编译和使用mod_perl。这是他们的源树http://svn.apache.org/repos/asf/perl/modperl/branches/httpd24
答案 1 :(得分:0)
尝试在make
之前运行这些命令:
make source_scan
make xs_generate
答案 2 :(得分:0)
我通过apt-get安装apache2并通过cpan安装Apache2 :: RequestRec解决了这个问题