perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@locus.apache.org
Subject cvs commit: modperl Changes Makefile.PL
Date Mon, 03 Apr 2000 03:40:36 GMT
dougm       00/04/02 20:40:36

  Modified:    .        Changes Makefile.PL
  Log:
  warn that dso+Perl malloc needs a Perl built with -Ubincompat5005
  
  Revision  Changes    Path
  1.453     +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.452
  retrieving revision 1.453
  diff -u -r1.452 -r1.453
  --- Changes	2000/04/03 03:11:14	1.452
  +++ Changes	2000/04/03 03:40:35	1.453
  @@ -10,6 +10,8 @@
   
   =item 1.22_01-dev
   
  +warn that dso+Perl malloc needs a Perl built with -Ubincompat5005
  +
   add Apache::BINMODE stub for 5.6.0 tied filehandle support (fixes cgi.t #4)
   [Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
   
  
  
  
  1.153     +70 -44    modperl/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/modperl/Makefile.PL,v
  retrieving revision 1.152
  retrieving revision 1.153
  diff -u -r1.152 -r1.153
  --- Makefile.PL	2000/03/30 00:21:48	1.152
  +++ Makefile.PL	2000/04/03 03:40:35	1.153
  @@ -1992,15 +1992,21 @@
   }
   
   sub phat_warn {
  -    my $msg = shift;
  -	    warn <<EOF;
  -************* WARNING *************
  +    my($msg, $abort) = @_;
  +    my $level = $abort ? "ERROR" : "WARNING";  
  +    warn <<EOF;
  +************* $level *************
   
     $msg
   
  -************* WARNING *************
  +************* $level *************
   EOF
  -  sleep 5;
  +    if ($abort) {
  +        exit 1;
  +    }
  +    else {
  +        sleep 5;
  +    }
   }
   
   sub system_sanity_check {
  @@ -2022,25 +2028,74 @@
       }
   
       gdbm_check();
  +    malloc_check();
  +    dynaloader_check();
  +
  +}
  +
  +sub gdbm_check {
  +    if ($Config{libs} =~ /gdbm/) {
  +	require DynaLoader;
  +	require AutoLoader; #eek
  +	my $found = 0;
  +	my @path = split /\s+/, $Config{libpth};
  +
  +	for (@path) {
  +	    last if $found = DynaLoader::dl_findfile($_, "-lgdbm");
  +	}
  +
  +	unless ($found) {
  +	    my @maybe = ();
  +	    for (@path) {
  +		push @maybe, grep { ! -l $_ } <$_/libgdbm.*>;
  +	    }
  +	    my $suggest = @maybe ? 
  +	      "You could just symlink it to $maybe[0]" :
  +		"You might need to install Perl from source";
  +	    phat_warn(<<EOF);
  +Your Perl is configured to link against libgdbm, 
  +  but libgdbm.so was not found.
  +  $suggest
  +EOF
  +       }
  +    }
  +}
  +
  +sub malloc_check {
  +    return unless $USE_DSO or $USE_APXS;
  +    return unless $Config{'usemymalloc'} eq 'y';
  +
  +    my $abort = $^O eq 'solaris';
  +
  +    my $bincompat = $Config{bincompat5005} and 
  +                    $Config{bincompat5005} eq 'define';
   
  -    if (($USE_DSO or $USE_APXS) and $] < 5.005_56 and 
  -	$^O eq 'solaris' and $Config{'usemymalloc'} eq 'y') 
  -      {
  -	  phat_warn(<<EOF);
  +    if ($] < 5.006) {
  +        phat_warn(<<EOF, $abort);
   Your current configuration will most likely trigger core dumps, suggestions:
      *) Do not configure mod_perl as a DSO
  -   *) Upgrade your Perl version to 5.005_56 or higher
  -   *) Configure Perl with -Uusemymalloc
  -   *) Switch to an os other than $^O
  +   *) Upgrade your Perl version to 5.6.0 or higher (w/ -Ubincompat5005)
  +   *) Configure Perl with -Uusemymalloc (not recommended for performance)
   EOF
  -      }
  +     }
  +     else {
  +             phat_warn(<<EOF, $abort);
  +Your current configuration will most likely trigger core dumps, suggestions:
  +   *) Do not configure mod_perl as a DSO
  +   *) Rebuild Perl without malloc pollution (Configure -Ubincompat5005)
  +EOF
  +    }
  +}
   
  -    if ($^O eq 'aix' and $] <= 5.00503 and ($USE_DSO or $USE_APXS)) {
  -    	phat_warn(<<EOF);
  +sub dynaloader_check {
  +    return unless $^O eq 'aix' and $] <= 5.00503 and ($USE_DSO or $USE_APXS);
  +    phat_warn(<<EOF);
   Please make sure that you apply the following patch to the perl
   distribution before you install mod_perl, without this patch you will
   not be able load any xs modules.
  +EOF
   
  +    warn <<EOF;
   --- perl5.005_03/ext/DynaLoader/dl_aix.xs.orig  Fri Mar  3 17:00:58 2000
   +++ perl5.005_03/ext/DynaLoader/dl_aix.xs       Fri Mar  3 17:06:51 2000
   @@ -222,7 +222,16 @@
  @@ -2062,33 +2117,4 @@
                   errvalid++;
                   strcpy(errbuf, "loadbind: ");
   EOF
  -    }
  -}
  -
  -sub gdbm_check {
  -    if ($Config{libs} =~ /gdbm/) {
  -	require DynaLoader;
  -	require AutoLoader; #eek
  -	my $found = 0;
  -	my @path = split /\s+/, $Config{libpth};
  -
  -	for (@path) {
  -	    last if $found = DynaLoader::dl_findfile($_, "-lgdbm");
  -	}
  -
  -	unless ($found) {
  -	    my @maybe = ();
  -	    for (@path) {
  -		push @maybe, grep { ! -l $_ } <$_/libgdbm.*>;
  -	    }
  -	    my $suggest = @maybe ? 
  -	      "You could just symlink it to $maybe[0]" :
  -		"You might need to install Perl from source";
  -	    phat_warn(<<EOF);
  -Your Perl is configured to link against libgdbm, 
  -  but libgdbm.so was not found.
  -  $suggest
  -EOF
  -       }
  -    }
   }
  
  
  

Mime
View raw message