Re: Compile mod_perl 1.0 on ubuntu 12.04 or later

Hans Poo <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Hi,

Thanks a lot it worked !!!
In the process i needed some tweaks, maybe they can help a little more to others.
The perlbrew install command was failing signaling download error, it was the inexistente folder, so i creted it:
mkdir -p ~/perl5/perlbrew/dists/
Then it worked fine:
perlbrew install -Accflags=-fPIC -v --noman --notest -j9 --as perl-5.10.1-apache-1.3 5.10.1
perlbrew use perl-5.10.1-apache-1.3

sudo apt install cpanminus
cpanm -q --notest LWP::UserAgent

I left all in a folder called src, and make some test runs, so i automate deleting perl and apache folders and uncompress again.
cd src/
rm -rf mod_perl-1.31 apache_1.3.42

tar xzvf apache_1.3.42.tar.gz
tar xzvf mod_perl-1.31.tar.gz

Patch aplying automation too:
cd mod_perl-1.31/
patch -p1 < ../mod_perl-1.32.patch

cd ..
cd apache_1.3.42/
patch -p1 < ../apache-getline.patch
patch -p1 < ../gcc-inline-fix.patch

Finally, in the environment created i used "cpan" clasic command. "cpanm" was not installing modules in the right path.
Dependencies: For avoid question on follow dependencies before invoking cpan invoke from shell:
export PERL_MM_USE_DEFAULT=1

Then, newer module versions where failing the tests all the time, so i installed them with force, i.e. for DBI module:
force install DBI

Thanks again,
Hans

On feb. 24 2019, at 8:07 pm, Michael Schout <[email protected]> wrote:
> 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::[email protected]). 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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.