Ok, this is pretty long, but I was trying to make sure
I included everything relevant to the problem.
Is there a simple answer to getting 'make test' for
mod_perl to work when all extra perl modules are in a
custom
location? Simply having PERL5LIB=/appl/perl/lib
exported when running the builds doesn't seem to
suffice. It
works fine for everything else perlish, just not the
mod_perl 'make test'.
I'm building apache 1.3.23 and mod_perl 1.26 (with
latest mod_ssl - but that doesn't seem to be part of
the
problem). I have all the modules not included with
perl installed in /appl/perl/lib. This is a Solaris 8
64-bit
system. perl was built with 'sh Configure -des -
Duseshrplib' (useshrplib was for postgres, I'm building
modperl
statically). I used gcc 3.0.3 for everything
(installed latest binutils first then gcc - both from
sunfreeware).
mod_perl:
file:makepl_args.mod_perl
APACHE_SRC=/data/build/WEB/apache
SSL_BASE=/usr/local/ssl
EVERYTHING=1
DO_HTTPD=1
PREP_HTTPD=1
USE_APACI=1
PERL_SSI=1
#perl Makefile.PL PERL5LIB=/appl/perl/lib make
apache:
#SSL_BASE=/usr/local/ssl \
./configure \
--with-layout=Apache \
--server-uid=web \
--server-gid=web \
--disable-rule=EXPAT \
--disable-module=asis \
--disable-module=imap \
--disable-module=negotiation \
--disable-module=userdir \
--enable-module=proxy \
--enable-module=rewrite \
--enable-module=define \
--activate-module=src/modules/perl/libperl.a \
--enable-module=perl \
--enable-module=ssl
#make
mod_perl:
#PERL_HTTP_URI_CLASS=URI::URL make test
Now that you have all the background, some deatils on
the problem:
My symptoms are that the httpd process (and the
module/cgi and module/include subtests once the httpd
issue was
fixed) complains that the CGI modules can't be found.
At the end I've included a capture of the make test
output,
both unmodified, and modified (that's coming) - I
ignored the Net::HTTP errors since they just looked
like
warnings, rather than errors - please let me know if
that's really a problem.
I added a few BEGIN{print $ENV{PERL5LIB},\n} lines
here and there in various places and found that my
PERL5LIB
wasn't getting picked up by either the httpd/mod_perl
process, or the scripts run via cgi.
I finally got it to work by modifying Makefile.PL and
httpd.conf-dist, as well as creating a t/docs/local.pl.
In Makefile.PL I noticed that at line 1273 it reads:
PERL5LIB = PERL5LIB=$ENV{PERL5LIB},
Shouldn't this be like this instead?
PERL5LIB = $ENV{PERL5LIB},
Maybe I don't understand the purpose, but it seems
wrong, especially given the errors below where
../PERL5LIB=/data/web/xxx is actually shown in INC for
t/TEST. I can't see an immediate reason to have
../VAR=/path in the INC. Anyway... I made that change
and in that same file I modified line 99 so instead of
$ENV{PERL5LIB} = $PWD/lib;
it reads
$ENV{PERL5LIB} = $PWD/lib . ($ENV
{PERL5LIB} ? :$ENV{PERL5LIB} : );
This way it preserves any local PERL5LIB settings while
adding the mod_perl build location. I'm not sure if
the
$PWD/lib is even needed since it didn't seem to be
right in the first place. Maybe the $PWD/lib part
could just
be dropped altogether.
In httpd.conf-dist (or httpd.conf if I wasn't rerunning
the whole build again but just the 'make run-tests') I
had to add
PassEnv PERL5LIB
or the tests run through normal cgi instead of mod_perl
don't work. I placed it in the #mod_perl section,
right
before 'PerlPassEnv PERl5LIB'.
Finally, I created a local.pl, since that's looked for
by the startup.pl in t/docs:
use lib '/appl/perl/lib';
1;
So, I got all the tests to work, but I was wondering if
there was a build option I was missing, or something
that
wasn't documented yet? I did spend 2 days researching
this before posting, so I really hope I didn't miss
something in the docs, the FAQ or the mod_perl guide.
In making the changes, I tried to change things in as
few
places as possible. If there's a better way to do
this, please, show me how!
Also, since mod_perl and LWP still don't seem to play
well together in their current versions, I used the
PERL_HTTP_URI_CLASS=URI::URL hack to things to work.
(I found that in the mod_perl list archives...)
Thanks for anything you can help with on this.
Jim
PERL_HTTP_URI_CLASS=URI::URL make test
cut out make dir recursion/iterations
unmodified mod_perl-1.26
cp t/conf/mod_perl_srm.conf t/conf/srm.conf
../apache/src/httpd -f `pwd`/t/conf/httpd.conf -X -d
`pwd`/t
httpd listening on port 8529
will write error_log to: t/logs/error_log
letting apache warm up...[Wed Mar 27 16:19:06 2002]
[error] Can't locate CGI.pm in INC (INC contains:
/v01/data/build/WEB/mod_perl-
1.26/blib/lib /v01/data/build/WEB/mod_perl-
1.26/blib/arch