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.
--Geoff
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
retrieving revision 1.151
diff -u -r1.151 Makefile.PL
--- Makefile.PL 1 Aug 2004 19:44:00 -0000 1.151
+++ Makefile.PL 5 Aug 2004 20:47:46 -0000
@@ -101,10 +101,14 @@
# top-level Makefile.PL overrides MY::pasthru, and defines DEFINE= which
# overrides any local definition, not sure what's the right fix, for
# now just define it here (should it define PASTHRU_DEFINE instead?)
+ 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;
}
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 20:47:48 -0000
@@ -945,6 +945,10 @@
$self->{apr_config_path} = $self->{MP_APR_CONFIG};
}
+ my $config = $self->httpd_version_as_int =~ m/21\d+/
+ ? 'apr-1-config'
+ : 'apr-config';
+
if (!$self->{apr_config_path}) {
my @tries = ();
if ($self->httpd_is_source_tree) {
@@ -960,7 +964,7 @@
if exists $self->{MP_AP_PREFIX} and -d $self->{MP_AP_PREFIX};
}
- @tries = map { catfile $_, "apr-config" } @tries;
+ @tries = map { catfile $_, $config } @tries;
if (WIN32) {
my $ext = '.bat';
for (@tries) {
@@ -974,7 +978,7 @@
}
}
- $self->{apr_config_path} ||= Apache::TestConfig::which('apr-config');
+ $self->{apr_config_path} ||= Apache::TestConfig::which($config);
# apr_bindir makes sense only if httpd/apr is installed, if we are
# building against the source tree we can't link against
Index: lib/ModPerl/Config.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Config.pm,v
retrieving revision 1.12
diff -u -r1.12 Config.pm
--- lib/ModPerl/Config.pm 2 Jul 2004 01:28:36 -0000 1.12
+++ lib/ModPerl/Config.pm 5 Aug 2004 20:47:49 -0000
@@ -59,9 +59,13 @@
# apr
$cfg .= "\n\n*** (apr|apu)-config linking info\n\n";
if (my $apr_bindir = $build_config->apr_bindir()) {
+ my @configs = $build_config->httpd_version_as_int =~ m/21\d+/
+ ? qw(apr-1 apu-1)
+ : qw(apr apu);
+
my $ext = WIN32 ? '.bat' : '';
my @libs = grep $_, map { -x $_ && qx{$_ --link-ld --libs} }
- map { qq{$apr_bindir/$_-config$ext} } qw(apr apu);
+ map { qq{$apr_bindir/$_-config$ext} } @configs;
chomp @libs;
my $libs = join "\n", @libs;
$cfg .= "$libs\n\n";
Index: xs/APR/APR/Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/APR/Makefile.PL,v
retrieving revision 1.26
diff -u -r1.26 Makefile.PL
--- xs/APR/APR/Makefile.PL 1 Aug 2004 19:44:01 -0000 1.26
+++ xs/APR/APR/Makefile.PL 5 Aug 2004 20:47:50 -0000
@@ -22,10 +22,14 @@
if (my $apr_bindir = $build->apr_bindir()) {
+ my @configs = $build->httpd_version_as_int =~ m/21\d+/
+ ? qw(apr-1 apu-1)
+ : qw(apr apu);
+
# XXX: this works only with libapr 0.9.2+
my $ext = WIN32 ? '.bat' : '';
my @libs = grep $_, map { -x $_ && qx{$_ --link-ld --libs} }
- map { qq{$apr_bindir/$_-config$ext} } qw(apr apu);
+ map { qq{$apr_bindir/$_-config$ext} } @configs;
chomp @libs;
$libs = join ' ', @libs;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]