perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Schout <msch...@gkg.net>
Subject Re: Compile mod_perl 1.0 on ubuntu 12.04 or later
Date Sun, 24 Feb 2019 23:07:47 GMT
On 2/22/19 10:54 AM, Matthias Schmitt wrote:
> I doubt that you will be able to compile mod_perl 1.x with newer compilers and operating
systems.

Hold my beer :).

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"

$ which httpd
/home/mschout/perl5/perlbrew/perls/perl-5.10.1-apache-1.3/bin/httpd

$ httpd -v
Server version: Apache/1.3.41 (Unix)
Server built:   Feb 24 2019 16:43:18

And, it passes the Apache::AuthCookie test suite (provided you install
Apache::Test and Test::More@0.94).  It identifies in the log as:
[notice] Apache/1.3.41 (Unix) mod_perl/1.32-dev configured

I'm actually somewhat suprised that it compiled.

Its *possible* :).  But given how long 1.3 has been EOL'd, I *STRONGLY*
discourage anyone from using it.  At a minimum update to Apache 2.2,
which, although also EOL'd at this point, at least got security updates
within the past year or so.  You really need to migrate to 2.4.

That being said, you can build it if you apply the attached patches, as
part of the perlbrew+mod_perl setup I made for testing various versions
of apache and mod_perl over the years.  For the curious, the process I
used here was:

$ perlbrew install -Accflags=-fPIC -v --noman --notest -j9 \
  --as perl-5.10.1-apache-1.3 5.10.1

I used 5.10 in order to avoid dealing with any incompatibilities with
newer perls against apache 1.3.

$ perlbrew use perl-5.10.1-apache-1.3
$ cpanm -q --notest LWP::UserAgent

Then extract apache and mod_perl dists (I'm using apache 1.3.41,
mod_perl 1.31) and apply the attached patches to apache+mod_perl.

For mod_perl, apply the mod_perl-1.32.patch, which IIRC, I pulled from
the mod_perl svn trunk years ago.

The other two patches need to be applied to apache (apache-getline.patch
and gcc-inline-fix.patch).

I built this way:

$ perl Makefile.PL \
    APACHE_SRC=path/to/apache-src/src \
    DO_HTTPD=1 \
    USE_APACI=1 \
    PREP_HTTPD=1 \
    EVERYTHING=1
$ cd /path/to/apache-src
$ bash ./configure --prefix=$PERLBREW_ROOT/perls/$PERLBREW_PERL \
    --with-layout=Apache \
    --enable-module=all \
    --disable-module=auth_db \
    --disable-module=auth_dbm \
    --enable-shared=max \
    --activate-module=src/modules/perl/libperl.a \
    --disable-shared=perl \
    --disable-rule=EXPAT \
    --disable-rule=WANTHSREGEX
$ cd /path/to/apache-src
$ make install
$ cd /path/to/modperl-src
$ make install

I have a Makefile that does all of this.  I suppose I could publish it
on github or something, but given the age of apache 1.3, it seems
irresponsible to publish it at this point :).

Regards,
Michael Schout

Mime
View raw message