You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Nick Wellnhofer <we...@aevum.de> on 2005/01/22 21:10:12 UTC
[mp2] Installation problem with static build
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@aevum.de
http://aevum.de/
Re: [mp2] Installation problem with static build
Posted by Stas Bekman <st...@stason.org>.
Nick Wellnhofer wrote:
>
> 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.
Thanks Nick, applied with a few small tweaks.
--
__________________________________________________________________
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