You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by An...@wiwb.uscourts.gov on 2003/03/11 02:18:17 UTC

missmatch in Apache::Build httpd_version and 2.0.44 ap_release.h #define string

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

2. Used Components and their Configuration:

*** using lib/Apache/BuildConfig.pm
*** Makefile.PL options:
  MP_APXS        => /usr/local/apache2/bin/apxs
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_USE_DSO     => 1
  MP_USE_STATIC  => 1


*** /usr/local/apache2/bin/httpd -V
Server version: Apache/2.0.44
Server built:   Mar 10 2003 17:04:26
Server's Module Magic Number: 20020903:0
Architecture:   32-bit
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"


*** /usr/local/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.16-22enterprise, archname=i686-linux
    uname='linux doyle 2.2.16-22enterprise #1 smp tue aug 22 16:29:32 edt 
2000 i686 unknown '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing'
    ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.1 2.96-98)', 
gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
    libc=/lib/libc-2.2.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at Feb 25 2003 18:47:15
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /usr/local/lib/perl5/5.8.0/i686-linux
    /usr/local/lib/perl5/5.8.0
    /usr/local/lib/perl5/site_perl/5.8.0/i686-linux
    /usr/local/lib/perl5/site_perl/5.8.0
    /usr/local/lib/perl5/site_perl
    .


3. This is the core dump trace: (if you get a core dump):

  [CORE TRACE COMES HERE]

This report was generated by t/REPORT on Tue Mar 11 00:31:27 2003 GMT.

-------------8<---------- End Bug Report --------------8<----------

Note: Complete the rest of the details and post this bug report to
dev <at> perl.apache.org. To subscribe to the list send an empty
email to dev-subscribe@perl.apache.org.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: missmatch in Apache::Build httpd_version and 2.0.44 ap_release.h #define string

Posted by Stas Bekman <st...@stason.org>.
Andy_Bach@wiwb.uscourts.gov 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:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org