[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: Compile mod_perl 1.0 on ubuntu 12.04 or later
From:       Hans Poo <hanspoo () gmail ! com>
Date:       2019-02-26 10:32:47
Message-ID: 1551057684.local-904409d6-8629-v1.5.3-420ce003 () getmailspring ! com
[Download RAW message or body]

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 <mschout@gkg.net> 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::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
> 


[Attachment #3 (text/html)]

<div>Hi,</div><br><div>Thanks a lot it worked !!!</div><br><div>In the process i \
needed some tweaks, maybe they can help a little more to others.  </div><br><div>The \
perlbrew install command was failing signaling download error, it was the inexistente \
folder, so i creted it:</div><div>mkdir -p ~/perl5/perlbrew/dists/</div><div> \
</div><div>Then it worked fine:</div><div>perlbrew install -Accflags=-fPIC -v --noman \
--notest -j9   --as perl-5.10.1-apache-1.3 5.10.1</div><div>perlbrew use \
perl-5.10.1-apache-1.3</div><br><br><div>sudo apt install cpanminus</div><div>cpanm \
-q --notest LWP::UserAgent </div><br><div>I left all in a folder called src, and make \
some test runs, so i automate deleting perl and apache folders and uncompress \
again.</div><div>cd src/</div><div>rm -rf mod_perl-1.31 \
apache_1.3.42</div><br><div>tar xzvf apache_1.3.42.tar.gz </div><div>tar xzvf \
mod_perl-1.31.tar.gz </div><br><div>Patch aplying automation too:</div><br><div>cd \
mod_perl-1.31/</div><div>patch -p1 &lt; ../mod_perl-1.32.patch </div><br><div>cd \
..</div><div>cd apache_1.3.42/</div><div>patch -p1 &lt; ../apache-getline.patch \
</div><div>patch -p1 &lt; ../gcc-inline-fix.patch </div><br><br><div>Finally, in the \
environment created i used "cpan" clasic command. "cpanm" was not installing modules \
in the right path. </div><br><div>Dependencies: For avoid question on follow \
dependencies before invoking cpan invoke from shell:</div><div>export \
PERL_MM_USE_DEFAULT=1</div><br><div>Then, newer module versions where failing the \
tests all the time, so i installed them with force, i.e. for DBI \
module:</div><div>force install DBI </div><br><div>Thanks \
again,</div><div>Hans</div><br><div class="gmail_quote_attribution">On feb. 24 2019, \
at 8:07 pm, Michael Schout &lt;mschout@gkg.net&gt; \
wrote:</div><blockquote><div><div>On 2/22/19 10:54 AM, Matthias Schmitt \
wrote:</div><blockquote><div>I doubt that you will be able to compile mod_perl 1.x \
with newer compilers and operating systems.</div></blockquote><br><div>Hold my beer \
:).</div><br><div>$ cat \
/etc/lsb-release</div><div>DISTRIB_ID=Ubuntu</div><div>DISTRIB_RELEASE=18.04</div><div>DISTRIB_CODENAME=bionic</div><div>DISTRIB_DESCRIPTION="Ubuntu \
18.04.2 LTS"</div><br><div>$ which \
httpd</div><div>/home/mschout/perl5/perlbrew/perls/perl-5.10.1-apache-1.3/bin/httpd</div><br><div>$ \
httpd -v</div><div>Server version: Apache/1.3.41 (Unix)</div><div>Server built: Feb \
24 2019 16:43:18</div><br><div>And, it passes the Apache::AuthCookie test suite \
(provided you install</div><div>Apache::Test and Test::More@0.94). It identifies in \
the log as:</div><div>[notice] Apache/1.3.41 (Unix) mod_perl/1.32-dev \
configured</div><br><div>I'm actually somewhat suprised that it \
compiled.</div><br><div>Its *possible* :). But given how long 1.3 has been EOL'd, I \
*STRONGLY*</div><div>discourage anyone from using it. At a minimum update to Apache \
2.2,</div><div>which, although also EOL'd at this point, at least got security \
updates</div><div>within the past year or so. You really need to migrate to \
2.4.</div><br><div>That being said, you can build it if you apply the attached \
patches, as</div><div>part of the perlbrew+mod_perl setup I made for testing various \
versions</div><div>of apache and mod_perl over the years. For the curious, the \
process I</div><div>used here was:</div><br><div>$ perlbrew install -Accflags=-fPIC \
-v --noman --notest -j9 \</div><div>--as perl-5.10.1-apache-1.3 \
5.10.1</div><br><div>I used 5.10 in order to avoid dealing with any incompatibilities \
with</div><div>newer perls against apache 1.3.</div><br><div>$ perlbrew use \
perl-5.10.1-apache-1.3</div><div>$ cpanm -q --notest \
LWP::UserAgent</div><br><div>Then extract apache and mod_perl dists (I'm using apache \
1.3.41,</div><div>mod_perl 1.31) and apply the attached patches to \
apache+mod_perl.</div><br><div>For mod_perl, apply the mod_perl-1.32.patch, which \
IIRC, I pulled from</div><div>the mod_perl svn trunk years ago.</div><br><div>The \
other two patches need to be applied to apache (apache-getline.patch</div><div>and \
gcc-inline-fix.patch).</div><br><div>I built this way:</div><br><div>$ perl \
Makefile.PL \</div><div>APACHE_SRC=path/to/apache-src/src \</div><div>DO_HTTPD=1 \
\</div><div>USE_APACI=1 \</div><div>PREP_HTTPD=1 \</div><div>EVERYTHING=1</div><div>$ \
cd /path/to/apache-src</div><div>$ bash ./configure \
--prefix=$PERLBREW_ROOT/perls/$PERLBREW_PERL \</div><div>--with-layout=Apache \
\</div><div>--enable-module=all \</div><div>--disable-module=auth_db \
\</div><div>--disable-module=auth_dbm \</div><div>--enable-shared=max \
\</div><div>--activate-module=src/modules/perl/libperl.a \
\</div><div>--disable-shared=perl \</div><div>--disable-rule=EXPAT \
\</div><div>--disable-rule=WANTHSREGEX</div><div>$ cd /path/to/apache-src</div><div>$ \
make install</div><div>$ cd /path/to/modperl-src</div><div>$ make \
install</div><br><div>I have a Makefile that does all of this. I suppose I could \
publish it</div><div>on github or something, but given the age of apache 1.3, it \
seems</div><div>irresponsible to publish it at this point \
:).</div><br><div>Regards,</div><div>Michael Schout</div></div></blockquote><img \
class="mailspring-open" alt="Open Tracking" width="0" height="0" style="border:0; \
width:0; height:0;" src="https://link.getmailspring.com/open/1551057684.local-904409d6 \
-8629-v1.5.3-420ce003@getmailspring.com?recipient=bW9kcGVybEBwZXJsLmFwYWNoZS5vcmc%3D">




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic