[mp2] Installation problem with static build
[prev]
[thread]
[next]
[Date index for 2005/01/22]
This is a multi-part message in MIME format.
--------------090800050401010004020502
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
When I run "perl Makefile.PL" to configure a static mod_perl2 build and
have an older version of Apache already installed in the --prefix
directory, I get the following error message:
Configuring Apache/2.0.52 mod_perl/1.999.21 Perl/v5.8.5
[ error] Can't find apr include/ directory,
[ error] use MP_APR_CONFIG=/path/to/apr-config
Looking at lib/Apache/Build.pm the following code in subroutine dir
seems to be the culprit:
if (IS_MOD_PERL_BUILD) {
my $build = $self->build_config;
if ($dir = $build->{'dir'}) {
for ($dir, "../$dir", "../../$dir") {
last if -d ($dir = $_);
}
}
}
$dir ||= $self->{MP_AP_PREFIX};
If the right directory isn't found in the for loop $dir still contains a
value, so the ||= has no effect.
Everything works as expected with the attached patch.
Nick
--
aevum gmbh
leopoldstr. 41
80802 münchen
germany
fon: +4989 38380653
wellnhofer@xxxxx.xx
http://aevum.de/
--------------090800050401010004020502
Content-Type: text/plain;
name="mod_perl2.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="mod_perl2.diff"
--- mod_perl-2.0.0-RC4/lib/Apache/Build.pm 2005-01-11 09:33:07.000000000 +0100
+++ mod_perl-2.0.0-RC4-nik/lib/Apache/Build.pm 2005-01-22 21:05:56.638188739 +0100
@@ -905,11 +905,14 @@
return $self->{dir} if $self->{dir};
if (IS_MOD_PERL_BUILD) {
- my $build = $self->build_config;
+ my $bdir = $self->build_config->{dir};
- if ($dir = $build->{'dir'}) {
- for ($dir, "../$dir", "../../$dir") {
- last if -d ($dir = $_);
+ if ($bdir) {
+ for ($bdir, "../$bdir", "../../$bdir") {
+ if (-d $_) {
+ $dir = $_;
+ last;
+ }
}
}
}
--------------090800050401010004020502--
 |
[mp2] Installation problem with static build
Nick Wellnhofer 20:10 on 22 Jan 2005
|