[EMAIL PROTECTED] wrote:
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

perl Makefile.PL fails no matter which options I give it. The problem appears to be in Apache::Build.pm, in sub httpd_version, as its looking for:
while(<$fh>) {
print "ver; $_";
next unless /^\#define\s+AP_SERVER_BASEREVISION\s+\"(.*)\"/;


and, currently (Apache 2.0.44) ap_release.h shows:
#define AP_SERVER_BASEVENDOR "Apache Software Foundation"
#define AP_SERVER_BASEPRODUCT "Apache"
#define AP_SERVER_MAJORVERSION "2"
#define AP_SERVER_MINORVERSION "0"
#define AP_SERVER_PATCHLEVEL "44"
#define AP_SERVER_MINORREVISION AP_SERVER_MAJORVERSION "." AP_SERVER_MINORVERSION
#define AP_SERVER_BASEREVISION AP_SERVER_MINORREVISION "." AP_SERVER_PATCHLEVEL
#define AP_SERVER_BASEVERSION AP_SERVER_BASEPRODUCT "/" AP_SERVER_BASEREVISION
#define AP_SERVER_VERSION AP_SERVER_BASEVERSION


So, it never gets a valid version number. Odd it would seem to end up being "0.44", not 2.0.44 but ...

I stuck that in and was able to get to make.

Hmm, have you read the comment above that code?


    while (<$fh>) {
        #now taking bets on how many friggin times this will change
        #over the course of apache 2.0.  1.3 changed it at least a half
        #dozen times.  hopefully it'll stay in the same file at least.
        if (/^\#define\s+AP_SERVER_MAJORVERSION\s+\"(\d+)\"/) {
            #XXX could be more careful here.  whatever.  see above.
            my $major = $1;
            my $minor = (split /\s+/, scalar(<$fh>))[-1];
            my $patch = (split /\s+/, scalar(<$fh>))[-1];
            $version = join '.', $major, $minor, $patch;
            $version =~ s/\"//g;
            last;
        }
        elsif (/^\#define\s+AP_SERVER_BASEREVISION\s+\"(.*)\"/) {
            $version = $1;
            last;
        }
    }

The first if() is for newer Apache versions (includeing 2.0.44), the second for the older ones. So it should match:

#define AP_SERVER_MAJORVERSION "2"
#define AP_SERVER_MINORVERSION "0"
#define AP_SERVER_PATCHLEVEL "44"

just fine. Does the first if fails for you and falls through to the elsif() and fails there? Can you add some debug prints?

Oh, wait, you must be using some old version of mod_perl. Is it 1.99_05? Get 1.99_08 from http://perl.apache.org/download/index.html
or even better the cvs version from:
http://perl.apache.org/download/source.html#2_0_Development_Source_Distribution
and you will be all set.


__________________________________________________________________
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


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to