Geoffrey Young wrote:

Joe Schaefer wrote:

Geoffrey Young <[EMAIL PROTECTED]> writes:



hi...

the mod_perl tests currently dump core dump with httpd 2.1/APR 1.0.  I spent
the better part of the morning trying to figure out why, but I can't quite
see it.


Err, apxs was recently patched to use(supply?) the new ap[ru]-1-config.
You're probably linking against the wrong apr library if mp2 is still
relying on the "ap[ru]-config" script names.


blarg.  thanks joe!

the attached patch seems to help, but I haven't had the chance to fully test
it yet - I'll report back tomorrow if my nightly builds are successful.

Are you sure that httpd_version_as_int is the right method to decide which apr is used? Is there a better way?

+1,

but after you commit we need to refactor the obvious dups (4 in your patch):

+    my @configs = $build->httpd_version_as_int =~ m/21\d+/
+        ? qw(apr-1 apu-1)
+        : qw(apr apu);

into one place, preferrably in Apache::Build, e.g. so that they are callable as:


$build->apr_util
$build->apu_util

I'd fold in the other dup we have all over (e.g. in your patch)

my $ext = WIN32 ? '.bat' : '';
...
-            map { qq{$apr_bindir/$_-config$ext} } qw(apr apu);
+            map { qq{$apr_bindir/$_-config$ext} } @configs;

so that the above wrappers deal with giving you the full path and extension. so instead of writing:

+    my @configs = $build->httpd_version_as_int =~ m/21\d+/
+        ? qw(apr-1 apu-1)
+        : qw(apr apu);
+
     if (my $apr_bindir = $build->apr_bindir()) {
         my $ext = WIN32 ? '.bat' : '';
         my @apr_libs = grep $_, map { -x $_ && qx{$_ --link-ld} }
-            map { qq{$apr_bindir/$_-config$ext} } qw(apr apu);
+            map { qq{$apr_bindir/$_-config$ext} } @configs;
         $opt_define = '-DMP_HAVE_APR_LIBS' if @apr_libs;
     }

it will be:

     if (my $apr_bindir = $build->apr_bindir()) {
         my @apr_libs = grep $_, map { -x $_ && qx{$_ --link-ld} }
         ($build->apr_util, $build->apu_util);
         $opt_define = '-DMP_HAVE_APR_LIBS' if @apr_libs;
     }

If you don't have the time, commit your patch and I'll refactor it next. I want to do some extra refactoring on the libs stuff.

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