You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "J. Joseph Felten" <jo...@augustanet.de> on 2004/06/30 10:19:11 UTC

[mp2] build problems and how I worked around them

I recently subscribed to this list and wanted to share the problems I
encountered trying to compile / install mod_perl 1.99_14, in case it helps
someone else.  Or perhaps I did something wrong and someone here can enlighten
me.  I've not built or used mod_perl before, so it's quite possible that I
missed something important.  

Starting setup:  Apache/2.0.49 (Unix) Perl/v5.8.4 mod_ssl/2.0.49
OpenSSL/0.9.6l

I have apache 2 installed in a non default but perfectly valid location: 
/opt2/apps/apache.  Also, my apache runs under it's own userid, and not as
user "nobody".  

I was using this configure command.:  
perl Makefile.PL MP_APXS=/opt2/apps/apache/bin/apxs

I initially tried compiling mod_perl 1.99_14 under my user account, but ran in
to a series of permissions issues.  I eventually gave up on that and next
tried a clean compile of mod_perl 1.99_14 under /tmp as root as suggested in
the make file (seemed odd, but I went along with it).  But I kept running in
to compile errors to the effect that it didn't have permissions to access the
apache libraries, even though I was attempting to compile as root.  I fiddled
around a lot with changing permissions and moving libraries around, all to no
avail.  Eventually I solved that problem by adding the MP_APR_CONFIG argument
to the configure command thus.:  

perl Makefile.PL MP_APXS=/opt2/apps/apache/bin/apxs
MP_APR_CONFIG=/opt2/apps/apache/bin/apr-config

It took awhile to find MP_APR_CONFIG and what it was good for.  If the INSTALL
file had mentioned it, I would have found it much earlier.  

Now I had mod_perl compiled, but I ran in to another problem when `make test`
couldn't access it's own files due to permissions issues.  An example which I
saved.:  

Cannot load /tmp/mod_perl-1.99_14/src/modules/perl/mod_perl.so into server: 
/tmp/mod_perl-1.99_14/src/modules/perl/mod_perl.so: 
cannot open shared object file:  Permission denied

or

Can't opendir(/tmp/mod_perl-1.99_14/WrapXS): Permission denied 
 at /tmp/mod_perl-1.99_14/Apache-Test/lib/Apache/TestRun.pm line 900

After fiddling around with permissions for awhile, I finally just ran this in
the mod_perl build directory.: 

find . -exec chmod o+rwx {} \;

That seemed to work around that problem and I finally got mod_perl to build,
run it's tests, and install.  I do not know what caused that problem.  I think
most of those files were 750 root:root or such.  Perhaps my root umask of 027
came in to play at some point.  I thought I had given tar the -p flag.  

I think at least one problem was due to the mod_perl make files assuming that
apache is installed / configured to run as userid "nobody".  TTBOMK this isn't
required by apache and in MY OPINION isn't a great idea.  Perhaps a configure
flag could be created to allow people to specify a different userid for
running apache as part of the `make test` process?

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] build problems and how I worked around them

Posted by Stas Bekman <st...@stason.org>.
J. Joseph, can you please file a proper problem report, following the 
guidelines at http://perl.apache.org/bugs/, copy-n-paste the commands you did 
and real error messages you saw as a result. Waving hands unfortunately is not 
very helpful to figure out what the problems are and how do we fix them.

Also check the setting of umask on your machine. It looks like this may be 
your problem.

Thanks.

-- 
__________________________________________________________________
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

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html