[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl-dev
Subject:    Re[2]: mod_perl2 1.99_14 and httpd 2.0.49 - gmake test fails (cannot
From:       Randy Kobes <randy () theoryx5 ! uwinnipeg ! ca>
Date:       2004-07-25 15:40:51
Message-ID: Pine.LNX.4.56.0407251030000.27122 () theoryx5 ! uwinnipeg ! ca
[Download RAW message or body]

On Sun, 25 Jul 2004, Alexey Bozrikov wrote:

> Okay, we'll give it a try while I am far from being expert
> in debugging programs.
[ ... ]
>
> Now, where do we go from here? I am willing to help (and
> finally install mod_perl as DSO), but no major expertise
> in the field :-)

Great - thanks. As well as trying to track the problem down
(as Stas just explained in a recent message), could you also
try the attached patch, which can be applied against the
current mod_perl 2 cvs as (in the top-level source
directory)
    patch -p0 < mp_aix.patch
This is for a dynamic build, and what it does is, like is
done for Win32, builds a static library of symbols needed
for APR/APR::* modules so that they don't rely on
mod_perl.so.

I apologise if I got some of the syntax wrong for aix,
as I've not used that before. Thanks.

-- 
best regards,
randy
["mp_aix.patch" (TEXT/PLAIN)]

? mod_perl-dev.tar.gz
? mod_perl.ppd
? save.txt
? t/htdocs/perlio/apache_stdout
? xs/APR/APR/APR.def
? xs/APR/Const/Const.def
? xs/APR/PerlIO/PerlIO.def
? xs/Apache/Const/Const.def
? xs/ModPerl/Const/Const.def
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
retrieving revision 1.150
diff -u -r1.150 Makefile.PL
--- Makefile.PL	23 Jul 2004 23:24:55 -0000	1.150
+++ Makefile.PL	25 Jul 2004 15:25:18 -0000
@@ -39,6 +39,7 @@
 use ModPerl::BuildMM ();
 
 use constant WIN32 => Apache::Build::WIN32;
+use constant AIX => Apache::Build::AIX;
 
 our $VERSION;
 
@@ -165,7 +166,7 @@
     # (see the aprext target in the MY::top_targets sub below), as 
     # symbols must get resolved at link time.
 
-    if (WIN32()) {
+    if (WIN32() or AIX()) {
         require File::Basename;
         require File::Path;
         #Makefile.PL's in WrapXS/ just need to pass the -e mod_perl.lib test
@@ -173,7 +174,7 @@
         #actually linked
         # this must also be done for aprext.lib, build in xs/APR/aprext/;
         # we must create a dummy aprext.lib to pass the -e test.
-        my $lib1 = "src/modules/perl/$build->{MP_LIBNAME}.lib";
+        my $lib1 = "src/modules/perl/$build->{MP_LIBNAME}$Config{lib_ext}";
         my $lib2 = $build->mp_apr_lib;
         my $apr_blib = File::Basename::dirname($lib2);
         unless (-d $apr_blib) {
@@ -488,6 +489,7 @@
 
 use Config;
 use constant WIN32 => $^O eq 'MSWin32';
+use constant AIX => $^O eq 'aix';
 
 my $apache_test_install;
 BEGIN {
@@ -500,7 +502,7 @@
     my $self = shift;
     my $string = $self->ModPerl::BuildMM::MY::top_targets;
 
-    if (WIN32) {
+    if (WIN32 or AIX) {
         ModPerl::MM::add_dep(\$string, pure_all => 'aprext');
 
         # must not import File::Spec functions inside MY, it breaks
@@ -509,7 +511,7 @@
         my $apr_lib = $build->{MP_APR_LIB} . $Config{lib_ext};
         (my $ap_lib = $build->ap_includedir()) =~ s{include$}{lib};
         my $to = File::Spec->catfile($ap_lib, $apr_lib);
-        my $src_dir = File::Spec->catdir(qw(xs APR aprext));
+        my $src_dir = File::Spec->catdir(qw(xs APR), $build->{MP_APR_LIB});
         $string .= <<"EOF";
 
 aprext:
Index: Apache-Test/lib/Apache/TestSSLCA.pm
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestSSLCA.pm,v
retrieving revision 1.18
diff -u -r1.18 TestSSLCA.pm
--- Apache-Test/lib/Apache/TestSSLCA.pm	4 Mar 2004 05:51:31 -0000	1.18
+++ Apache-Test/lib/Apache/TestSSLCA.pm	25 Jul 2004 15:25:19 -0000
@@ -166,8 +166,8 @@
     my $cmd = "$openssl @_";
 
     info $cmd;
-
-    unless (system($cmd) == 0) {
+    my @args = split ' ', $cmd;
+    unless (system(@args) == 0) {
         my $status = $? >> 8;
         die "system @_ failed (exit status=$status)";
     }
Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.165
diff -u -r1.165 Build.pm
--- lib/Apache/Build.pm	23 Jul 2004 23:24:55 -0000	1.165
+++ lib/Apache/Build.pm	25 Jul 2004 15:25:25 -0000
@@ -1399,7 +1399,19 @@
     my $mp_apr_lib = $self->{MP_APR_LIB};
     my @dirs = $self->{MP_INST_APACHE2} ?
         qw(blib arch Apache2 auto) : qw(blib arch auto);
-    return catdir $self->{cwd}, @dirs, $mp_apr_lib, "$mp_apr_lib.lib";
+    return catfile $self->{cwd}, @dirs, $mp_apr_lib,
+        "${mp_apr_lib}$Config{lib_ext}";
+}
+
+sub mp_apr_lib_aix {
+    my $self = shift;
+    # MP_APR_LIB.lib will be installed into MP_AP_PREFIX/lib
+    # for use by 3rd party xs modules
+    my $mp_apr_lib = $self->{MP_APR_LIB};
+    my @dirs = $self->{MP_INST_APACHE2} ?
+        qw(blib arch Apache2 auto) : qw(blib arch auto);
+    my $dir = catdir $self->{cwd}, @dirs, $mp_apr_lib;
+    return qq{ -L$dir -l$mp_apr_lib };
 }
 
 # name of lib used to build APR/APR::*
Index: lib/ModPerl/BuildMM.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/BuildMM.pm,v
retrieving revision 1.17
diff -u -r1.17 BuildMM.pm
--- lib/ModPerl/BuildMM.pm	4 Jul 2004 18:44:49 -0000	1.17
+++ lib/ModPerl/BuildMM.pm	25 Jul 2004 15:25:25 -0000
@@ -79,7 +79,7 @@
 
     my $libs;
     my @libs = ();
-    if (Apache::Build::WIN32) {
+    if (Apache::Build::WIN32 or Apache::Build::AIX) {
         # in order to decouple APR/APR::* from mod_perl.so,
         # link these modules against the static MP_APR_LIB lib,
         # rather than the mod_perl lib (which would demand mod_perl.so
Index: xs/APR/APR/Makefile.PL
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/APR/APR/Makefile.PL,v
retrieving revision 1.25
diff -u -r1.25 Makefile.PL
--- xs/APR/APR/Makefile.PL	4 Jul 2004 18:44:49 -0000	1.25
+++ xs/APR/APR/Makefile.PL	25 Jul 2004 15:25:28 -0000
@@ -9,6 +9,7 @@
 use File::Spec::Functions;
 
 use constant WIN32   => Apache::Build::WIN32;
+use constant AIX   => Apache::Build::AIX;
 use constant SOLARIS => $^O eq 'solaris';
 
 my %args = (
@@ -35,9 +36,14 @@
     $libs =~ s{(\w+)\.lib}{-l$1}g;
     # include the static MP_APR_LIB lib
     my ($lib, $dir, $ext) =
-        File::Basename::fileparse($build->mp_apr_lib, qr{\.lib});
+        File::Basename::fileparse($build->mp_apr_lib, $Config{lib_ext});
     $dir =~ s!\\$!!;
     $libs .= qq{ -L"$dir" -l$lib };
+}
+
+if (AIX) {
+    my $mp_apr_lib = $build->mp_apr_lib;
+    $libs .= qq{ $mp_apr_lib };
 }
 
 if (SOLARIS && $libs) {


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic