Stefan Cars wrote:
[...]
I have come across a problem installing Apache::VMonitor with Apache
2.0.50 and mod_perl-1.99_14. I saw some old posting regarding this which
suggested that mod_perl wasn't installed properly. I think it is, it's
built from sources and installed properly. What can cause this problem ?

I think you may have installed mp2 w/o using MP_APXS, as explained here: http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Installation

It's not an Apache::VMonitor problem, but a mod_perl's one. We need to improve diagnostics. The patch below attempts to do that.

perl Makefile.PL says:

Goind to build against mod_perl/1.9914 Perl/5.008002
[   info] generating script t/TEST
Can't find the mod_perl include dir at
/usr/local/lib/perl5/site_perl/5.8.2/mach/Apache/Build.pm line 1593.

Stefan, please follow the guidelines on bug submitting http://perl.apache.org/bugs/ as we need to know how your mp2 was built.


Also please apply this patch against:
/usr/local/lib/perl5/site_perl/5.8.2/mach/Apache/Build.pm

and try again, show us what the new error message will be emitted.

Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.166
diff -u -r1.166 Build.pm
--- lib/Apache/Build.pm 1 Aug 2004 19:44:00 -0000       1.166
+++ lib/Apache/Build.pm 5 Aug 2004 23:28:07 -0000
@@ -81,7 +81,7 @@

     my $include_dir = $self->apxs(-q => 'INCLUDEDIR');

-    unless (-e $include_dir) {
+    unless (-d $include_dir) {
         return "include/ directory not found in $prefix";
     }

@@ -157,11 +157,19 @@
         }
     }

+    # only during mod_perl build we may guess the locations of things
+    # after the build we need apxs, since the source will be gone, by
+    # that time
     unless ($apxs) {
-        my $prefix = $self->{MP_AP_PREFIX} || "";
-        return '' unless -d $prefix and $is_query;
-        my $val = $apxs_query{$_[1]};
-        return defined $val ? ($val ? "$prefix/$val" : $prefix) : "";
+        if (IS_MOD_PERL_BUILD) {
+            my $prefix = $self->{MP_AP_PREFIX} || "";
+            return '' unless -d $prefix and $is_query;
+            my $val = $apxs_query{$_[1]};
+            return defined $val ? ($val ? "$prefix/$val" : $prefix) : "";
+        }
+        else {
+            die "can't proceed without -apxs";
+        }
     }

     my $devnull = devnull();
@@ -1667,12 +1675,14 @@
         my $ap_inc = $self->apxs('-q' => 'INCLUDEDIR');
         if ($ap_inc && -d $ap_inc) {
             push @inc, $ap_inc;
-        } else {
-            # this is fatal
-            die "Can't find the mod_perl include dir";
+            return [EMAIL PROTECTED];
         }

-        return [EMAIL PROTECTED];
+        # this is fatal
+        my $reason = $ap_inc
+            ? "path $ap_inc doesn't exist"
+            : "apxs -q INCLUDEDIR didn't return a value";
+        die "Can't find the mod_perl include dir (reason: $reason)";
     }

     my $src = $self->dir;


-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] 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



Reply via email to