mod_perl2 and Apache 2.4

Hi all,

I need Apache 2.4 and mod_perl2 on FreeBSD 9.2, but for now it is not possible to install mod_perl2 for Apache 2.4. All steps explained in this topic are not the FreeBSD way! Use this recommendation only at your own risk!

  1. I install Apache 2.4
  2. Go to /usr/ports/www/mod_perl2
  3. And trying install it, but it is market as BROKEN
  4. I rewrite the Makefile for mod_perl2, comment the string:
    Code:
    #.if ${APACHE_VERSION} > 22
    #BROKEN=<------>Does not build with apache24
    #.endif
  5. Install mod_perl2, and have error:
    Code:
    OD_PERL -DMP_COMPAT_1X   -O2 -pipe -fno-strict-aliasing   -DVERSION=\"2.000008\" -DXS_VERSION=\"2.000008\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.16/mach/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'
    gmake[3]: *** [Connection.o] Ошибка 1
    gmake[3]: Выход из каталога `/usr/ports/www/mod_perl2/work/mod_perl-2.0.8/WrapXS/Apache2/Connection'
    gmake[2]: *** [subdirs] Ошибка 2
    gmake[2]: Выход из каталога `/usr/ports/www/mod_perl2/work/mod_perl-2.0.8/WrapXS/Apache2'
    gmake[1]: *** [subdirs] Ошибка 2
    gmake[1]: Выход из каталога `/usr/ports/www/mod_perl2/work/mod_perl-2.0.8/WrapXS'
    gmake: *** [subdirs] Ошибка 2
    ===> Compilation failed unexpectedly.
    Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
    the maintainer.
    *** [do-build] Error code 1
    
    Stop in /usr/ports/www/mod_perl2.

To solve this problem follow these steps:

  1. wget --no-parent -r [url=http://svn.apache.org/repos/asf/perl/modperl/branches/httpd24/]http://svn.apache.org/repos/asf/perl/mo ... s/httpd24/[/url]
  2. Go to /usr/ports/distfiles/
  3. Untar mod_perl-2.0.8.tar.gz, and replace files from the dirextory with wgeted mod_prel2
  4. Tar new archive as mod_perl-2.0.8.tar.gz but with replaced fies.
  5. Calculate sha256 (for example sha256 mod_perl-2.0.8.tar.gz)
  6. Get the size in bytes ( ls -l mod_perl-2.0.8.tar.gz | awk '{printf $5}')
  7. Go to /usr/ports/www/mod_perl2 and rewrite the distinfo for modifying archive info (sha256 and it size)
  8. For now mod_perl2 can by installed!
And wait for port maintainers to resolve this problem in the right FreeBSD way for the ports system.
 
Back
Top