On Fri, Jun 16, 2000 at 04:58:55PM -0400, Greg Estep wrote:
> 
> After making a few tweaks to the test.pl script and passing the 'h'
> command-line parameter (only do mod_perl tests) I was able to run all the
> tests (only under mod_perl) successfully.  I then was able to run some
> successful tests against some .epl's that I had previously written using a
> different OS.
> I can't run Embperl outside of apache, but have only done that on the rare
> occasion anyway, so that's not a great loss.

Aiee, I have forgotten about that one, but with Apache 1.3.10 they added
a special AIX 4.2 feature to the httpd.exp file that explicitely forces
the httpd symbols to be from the main part and to be present, previously
the httpd.exp file specified deferred binding that also allows for the
symbols to be not present, which might not be a problem if you know that
and don't use functionality that requires the use of the unresolved
symbols. I changed that back to the old behaviour in my Apache build
tree by changing the first line of the httpd.exp from:

#! .

to just:

#!

without the dot. This way Embperl should also run standalone with perl
alone.

> Thanks for all your help.  It has been a few years since I have used AIX and
> was in much need of reminders related to AIX's "strange/different/odd/weird"
> linker.

Yep, compared to other Unix linkers AIX behaves quite differently, but
the export file mechanism is actually quite nice if you really want to
control the API exported from shared libraries or plug-in modules. Other
Unix linkers can be coerced to perform similarly, although with some
additional effort. I do use these features, as I do not like it if
everything is dumped into one big symbol soup, as the ELF linkers
normally do.

> BTW, is it appropriate for me to offer to help with incorporating your
> knowledge into the Embperl install scripts?

Definitely, but I believe Embperl already knows about it. There is the
following sequence in Makefile.PL from Embperl:

    require Apache::src;
    $dynlib->{'OTHERLDFLAGS'} = Apache::src->new->otherldflags
        if (defined (&Apache::src::otherldflags)) ;

This would pick up the requires flags from modperl, if modperl knows
about them. As currently done the httpd.exp is only added to
otherldflags if modperl is build by apxs as a DSO, not if linked into
httpd statically. I would believe the following patch to modperl should
fix this:

Index: lib/Apache/src.pm
===================================================================
RCS file: /home/cvspublic/modperl/lib/Apache/src.pm,v
retrieving revision 1.26
diff -u -d -r1.26 src.pm
--- lib/Apache/src.pm   2000/06/05 18:16:33     1.26
+++ lib/Apache/src.pm   2000/06/17 00:20:48
@@ -258,7 +258,12 @@
            push @ldflags, "-bI:" . $file;
        }
        my $httpdexp = $self->apxs("-q" => 'LIBEXECDIR') . "/httpd.exp";
-       push @ldflags, "-bI:$httpdexp" if -e $httpdexp;
+       if (-e $httpdexp) {
+               push @ldflags, "-bI:$httpdexp";
+       } else {
+               $httpdexp = $self->dir . "/support/httpd.exp";
+               push @ldflags, "-bI:$httpdexp" if -e $httpdexp;
+       }
     }
     return join(' ', @ldflags);
 }

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:          +49 5131 709320
FAX:            +49 5131 709325
Internet:       [EMAIL PROTECTED]

Reply via email to