2014-05-05 83 views
2

我需要在linux-redhat操作系統中用apache-2.4.9安裝mod_perl 2.0.8。我已經成功安裝了「apache-2.4.9」,但在安裝mod_perl 2.0.8時,Makefile.PL執行成功,執行make命令時會引發下面的錯誤。任何人都可以幫我解決這個錯誤。在Apache httpd-2.4.9上安裝mod_perl-2.0.8

perl Makefile.PL MP_APXS=/install/others/apache2/bin/apxs MP_APR_CONFIG=/install/others/httpd-2.4.9/srclib/apr/apr-1-config PREFIX=/install/others 
[warning] mod_perl dso library will be built as mod_perl.so 
[warning] You'll need to add the following to httpd.conf: 
[warning] 
[warning] LoadModule perl_module modules/mod_perl.so 
[warning] 
[warning] depending on your build, mod_perl might not live in 
[warning] the modules/ directory. 

[warning] Check the results of 
[warning] 
[warning] $ /install/others/apache2/bin/apxs -q LIBEXECDIR 
[warning] 
[warning] and adjust the LoadModule directive accordingly. 

但在執行make命令時,它拋出下面的錯誤

make 
cd "src/modules/perl" && make 
... 
... 
cp Connection.pm ../../../blib/lib/Apache2/Connection.pm 
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap /install/others/mod_perl-2.0.8/xs/typemap Connection.xs > Connection.xsc && mv Connection.xsc Connection.c 
gcc -c -I/install/others/mod_perl-2.0.8/src/modules/perl -I/install/others/mod_perl-2.0.8/xs -I/install/others/httpd-2.4.9/srclib/apr/include -I/install/others/apache2/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm -DMOD_PERL -DMP_COMPAT_1X -DLINUX -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"2.000008\" -DXS_VERSION=\"2.000008\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" -DMP_HAVE_APR_LIBS Connection.c 
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 `/install/others/mod_perl-2.0.8/WrapXS/Apache2/Connection' 
make[2]: *** [subdirs] Error 2 
make[2]: Leaving directory `/install/others/mod_perl-2.0.8/WrapXS/Apache2' 
make[1]: *** [subdirs] Error 2 
make[1]: Leaving directory `/install/others/mod_perl-2.0.8/WrapXS' 
make: *** [subdirs] Error 2 
[email protected]:/install/others/mod_perl-2.0.8 

感謝,
尚穆根A.

回答

1

http://mail-archives.apache.org/mod_mbox/perl-dev/201206.mbox/%[email protected]%3E

Connection.xs: In function 'XS_Apache2__Connection_remote_addr': 
... 

修復這些,我編輯apache2_structures.map & StructureTable.pm到REMOTE_ADDR改變,remote_ip到client_addr和CLIENT_IP

而且

ServerRec.xs: In function 'XS_Apache2__ServerRec_loglevel': 
... 

爲了解決這個問題,我改變了/xs/tables/current/Apache2/StructureTable.pm指向log.level而不是loglevel。