You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2005/05/10 05:03:18 UTC

Re: installing libapreq and MP1

Marc Lambrichs wrote:
> I'm  trying to install a MP1 enabled apache in /usr/local/httpd_1.3.33 
> and MP2 enabled apache in /usr/local/httpd_2.054. Now, when I try to 
> install libapreq I get the following error:
> 
> mod_perl 1.x ( < 1.99) is required at Makefile.PL line 34.
> BEGIN failed--compilation aborted at Makefile.PL line 36.
> 
> Actually, both are installed.
> find /usr/local/lib/perl5 -type f -name "mod_perl*.pm" -print -exec grep 
> "VERSION" \;
> prints:
> 
> /usr/local/lib/perl5/site_perl/5.8.5/mach/mod_perl.pm
>    $mod_perl::VERSION = "1.29";
>    $class->UNIVERSAL::VERSION(shift);
> /usr/local/lib/perl5/site_perl/5.8.5/mach/mod_perl_hooks.pm
> /usr/local/lib/perl5/site_perl/5.8.5/mach/mod_perl2.pm
>    our $VERSION = "1.999023";
>    our $VERSION_TRIPLET;
>    if ($VERSION =~ /(\d+)\.(\d\d\d)(\d+)/) {
>        $VERSION_TRIPLET = "$v1.$v2.$v3";
>        die "bad version: $VERSION";
>    # $VERSION        : "1.099020"
>    # int $VERSION    : 1.09902
>    # $VERSION_TRIPLET: 1.99.20
>    # $mod_perl2::VERSION for more granularity
>    our $API_VERSION = 2;
> $mod_perl::VERSION = $mod_perl2::VERSION;
> 
> How can I solve this?

Marc, please try this patch:

Index: Makefile.PL
===================================================================
--- Makefile.PL (revision 122585)
+++ Makefile.PL (working copy)
@@ -3,6 +3,20 @@
  use FindBin;
  use 5.005;

+BEGIN {
+    unless (eval {require mod_perl}) {
+        die "Please install mod_perl: 1.25 < version < 1.99\n($@)";
+    }
+    my $file = $INC{"mod_perl.pm"};
+    my $have = "Found $file: version $mod_perl::VERSION";
+    if ($mod_perl::VERSION < 1.2402) {
+        die "$have\nPlease upgrade mod_perl to 1.24_02 or greater";
+    }
+    elsif ($mod_perl::VERSION > 1.98) {
+        die "$have\nmod_perl 1.x ( < 1.99) is required";
+    }
+}
+
  use File::Path qw(mkpath);
  use lib qw(Apache-Test/lib);

@@ -23,17 +37,6 @@
      require Apache::TestMM;
      Apache::TestMM->import(qw(test clean));
  }
-BEGIN {
-    unless (eval {require mod_perl}) {
-        die "Please install mod_perl: 1.25 < version < 1.99\n($@)";
-    }
-    if ($mod_perl::VERSION < 1.2402) {
-        die "Please upgrade mod_perl to 1.24_02 or greater";
-    }
-    elsif ($mod_perl::VERSION > 1.98) {
-        die "mod_perl 1.x ( < 1.99) is required";
-    }
-}

  my $conf_data = join '', <DATA>;
  $conf_data =~ s|(blib/arch)|$FindBin::Bin/$1|;


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