You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by cramirez <cr...@gte.net> on 2003/11/29 00:08:00 UTC

Building Apache2/modperl2 statically linked

How does one go about compiliing  mod_perl 2 statically with Apache 
2.0.48. I compiled Apache 2 and installed mod_perl 1.99_11. I am able to 
load mod_perl via DSO. However, I would like to have mod_perl staically 
compiled with Apache2. The installation docs are not that clear.

Here are the steps I'm taking:

$ cd /usr/local/src/apache2
$ cd apache-2.0.48
$ ./configure --prefix=/usr/local/apache_2.0.48 \
 --enable-modules=all  -wth-ssl=/home/openssl-0.9.7c --disable->
$ make
$ make install

$ cd ../mod_perl-1.99_11
$ perl Makefile.PL MP_INST_APACHE=2 MP_AP_PREFIX=/usr/local/apache_2.0.48
$ make
$ make install

Now I want to rebuild httpd with mod_perl statically linked. I copy the 
mod_perl-1.99_11/src/modules/perl  contents to 
apache_2.0.48/modules/perl directory (is this correct?).

$ cd /usr/local/src/apache2/apache-2.0.48
$ mkdir modules/perl
$ cd ../mod_perl-1.99_11/src/modules/perl
$ tar cf - .| (cd /usr/local/src/apache2/apache_2.0.48/modules/perl; tar 
xfBp -)
$ cd /usr/local/src/apache2/apache_2.0.48
$ ./config.nice --enable-perl=static
$ make
$ httpd -l  ## Does not show mod_perl.c ??


Thanks,

-Carlos



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


Re: Building Apache2/modperl2 statically linked

Posted by Stas Bekman <st...@stason.org>.
cramirez wrote:
> How does one go about compiliing  mod_perl 2 statically with Apache 
> 2.0.48. I compiled Apache 2 and installed mod_perl 1.99_11. I am able to 
> load mod_perl via DSO. However, I would like to have mod_perl staically 
> compiled with Apache2. The installation docs are not that clear.

Currently only the dynamic build is available. Patches that implement the 
static build are very welcome.

It's half way done, as we already generate mod_perl.lo.

If you want to build it as a part of httpd, build you at least need to add 
something like this to apache.../modules/perl/config.mp4:

dnl modules enabled in this directory by default
dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])

APACHE_MODPATH_INIT(perl)
APACHE_MODULE(perl, mod_perl module, , , yes)
APACHE_MODPATH_FINISH

Though I see no reason, why we shouldn't just tell httpd to link mod_perl.lo 
built in a different location. I haven't tried linking static 3rd party 
modules to httpd-2.0 yet. What's the new syntax for telling httpd-2.0 to link 
some .lo file? In which case you'd just go and tell 
--link=../modperl-1.99_11/src/modules/perl/mod_perl.lo, no?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html