You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Greg Estep <ge...@thinkronize.com> on 2000/06/01 13:40:58 UTC

non-DSO mod_perl, Embperl, and AIX not working

I am using IBM's C complier (cc) under AIX 4.3.3 with Apache 1.3.12, 
mod_perl 1.24 (statically linked, not DSO), perl 5.00503, and Embperl 
1.3b3.

The "offline", "execute function", and "cgi mode" Embperl tests are 
all successful. In the "mod_perl" mode, even the simple "ascii" test 
fails.  It fails with a seg. fault and a dbx stack trace that looks 
like this:

ap_palloc() at 0xd1179d98
EMBPERL__malloc() at 0xd1178b98
EMBPERL_SetupFileData() at 0xd1177118
EMBPERL_SetupRequest() at 0xd1177764
XS_HTML__Embperl_SetupRequest() at 0xd116fcb8
.() at 0x1004a344
.() at 0x100536f0
.() at 0x1002ff98
perl_call_handler(??, ??, ??) at 0x10113f70
perl_run_stacked_handlers(??, ??, ??) at 0x10113160
perl_handler(??) at 0x10111d38
ap_invoke_handler(0x2011f1f0) at 0x100c42bc
process_request_internal(0x2011f1f0) at 0x100f4d6c
ap_process_request(0x2011f1f0) at 0x100f648c
child_main(0x0) at 0x10002d24
make_child(0x200498e0, 0x0, 0x39363aa3) at 0x100025a0
startup_children(0x2) at 0x1000248c
standalone_main(0x4, 0x2ff228c8) at 0x10001928
main(0x4, 0x2ff228c8) at 0x100014b0


To get Embperl.so to successfully build I added "-b erok" to 
LDDLFLAGS.  I also tried '-G' with similar results. Without the 
modification to LDDLFLAGS I got several "unresolved symbol" errors.

I also get similar results with Embperl 1.2b9, Apache 1.3.9, and 
mod_perl 1.23.

BTW, I did not personally compile my perl executable, it is straight 
from a fileset on the AIX 4.3.3 CD.  I have, however, upgraded 
several modules to their most recent CPAN version.  My 'perl -V' 
output looks like this:

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=aix, osvers=4.3.3.0, archname=aix
    uname='aix funny 3 4 000001716600 '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=
    cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -
qmaxmem=16384'
    ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -
qmaxmem=16384'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='ld', ldflags ='-s'
    libpth=/lib /usr/lib /usr/ccs/lib
    libs=-lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW -lC_r
    libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-
bE:perl.exp'
    cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -
bI:$(PERL_INC)/perl.exp -bE:$(B
ASEEXT).exp -b noentry -lc'


Characteristics of this binary (from libperl):
  Built under aix
  Compiled at Aug 14 1999 08:59:55
  @INC:
    /usr/opt/perl5/lib/5.00503/aix
    /usr/opt/perl5/lib/5.00503
    /usr/opt/perl5/lib/site_perl/5.005/aix
    /usr/opt/perl5/lib/site_perl/5.005
    .

--
Greg Estep <ge...@thinkronize.com> 


Re: non-DSO mod_perl, Embperl, and AIX not working

Posted by Jens-Uwe Mager <ju...@helios.de>.
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:	jum@helios.de

RE: non-DSO mod_perl, Embperl, and AIX not working

Posted by Greg Estep <ge...@thinkronize.com>.
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.

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.

Again, thanks immensely for all your assistance.

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

--
Greg Estep <ge...@thinkronize.com>

-----Original Message-----
From: Jens-Uwe Mager [mailto:jum@helios.de]
Sent: Thursday, June 15, 2000 9:34 AM
To: Greg Estep
Cc: Jens-Uwe Mager; modperl@apache.org
Subject: Re: non-DSO mod_perl, Embperl, and AIX not working


On Wed, Jun 14, 2000 at 07:11:11PM -0400, Greg Estep wrote:

> I then did an apache 'make install', even though I think that the Embperl
> compile and test processes use the source-code version of httpd...
>
> Now a "make test" of Embperl still gives the following results:
>
> $ make test
> PERL_DL_NONLAZY=0
> /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.0/
> aix -I/usr/local/lib/perl5/5.6.0 test.pl
>
> loading...                    Can't load
> 'blib/arch/auto/HTML/Embperl/Embperl.so' for modu
> le HTML::Embperl: dlopen: blib/arch/auto/HTML/Embperl/Embperl.so: 30
> blib/arch/auto/HTML/
> Embperl/Embperl.so36 ap_get_client_block 131 perl36 ap_log_error 132
perl36
> ap_palloc 133

Did you try the Embperl in the httpd yet? I am not entirely sure if the
make test isn't attempting to load the Embperl into a plain perl
interpreter, which will not work as it does not support the Apache
symbols. I have to confess to have never run the test, it did always
complain about some packages I do not have installed and thus I tested
it in a live server with a set of my own pages.

--
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de


Re: non-DSO mod_perl, Embperl, and AIX not working

Posted by Jens-Uwe Mager <ju...@helios.de>.
On Wed, Jun 14, 2000 at 07:11:11PM -0400, Greg Estep wrote:

> I then did an apache 'make install', even though I think that the Embperl
> compile and test processes use the source-code version of httpd...
> 
> Now a "make test" of Embperl still gives the following results:
> 
> $ make test
> PERL_DL_NONLAZY=0
> /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.0/
> aix -I/usr/local/lib/perl5/5.6.0 test.pl
> 
> loading...                    Can't load
> 'blib/arch/auto/HTML/Embperl/Embperl.so' for modu
> le HTML::Embperl: dlopen: blib/arch/auto/HTML/Embperl/Embperl.so: 30
> blib/arch/auto/HTML/
> Embperl/Embperl.so36 ap_get_client_block 131 perl36 ap_log_error 132 perl36
> ap_palloc 133

Did you try the Embperl in the httpd yet? I am not entirely sure if the
make test isn't attempting to load the Embperl into a plain perl
interpreter, which will not work as it does not support the Apache
symbols. I have to confess to have never run the test, it did always
complain about some packages I do not have installed and thus I tested
it in a live server with a set of my own pages.

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de

RE: non-DSO mod_perl, Embperl, and AIX not working

Posted by Greg Estep <ge...@thinkronize.com>.
When I do "dump -nv httpd  | egrep 'ap_palloc|ap_table'" I don't get any
output.

I went into the apache_1.3.12/src directory and manually compiled httpd with
the same command issued by make with the addition of -bE:support/httpd.exp.
The complete command looked like this:

cc  -DAIX=43 -U__STR__ -DAIX_BIND_PROCESSOR -qnogenpcomp -qnousepcomp -DMOD_
PERL
 -DUSE_PERL_SSI -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=1638
4 -I
/usr/local/include -q32 -D_LARGE_FILES -qlonglong -DUSE_HSREGEX -DUSE_EXPAT 
-I./
lib/expat-lite -DNO_DL_NEEDED `./apaci` -lm -o httpd buildmark.o modules.o
modul
es/perl/libperl.a modules/standard/libstandard.a main/libmain.a
./os/unix/libos.
a ap/libap.a regex/libregex.a
ib/expat-lite/libexpat.a  -bE:/usr/local/lib/perl
5/5.6.0/aix/CORE/perl.exp  -L/usr/local/lib -b32
/usr/local/lib/perl5/5.6.0/aix/
auto/DynaLoader/DynaLoader.a -L/usr/local/lib/perl5/5.6.0/aix/CORE -lperl -l
bind
 -lnsl -ldbm -ldl -lld -lm -lC -lc -lcrypt -lbsd -lPW -liconv -bE:support/ht
tpd.
exp

Now a "dump -nv httpd  | egrep 'ap_palloc|ap_table'" looks like:

[412]   0x20039330    .data      EXP     DS SECdef        [noIMid]
ap_table_merge
[413]   0x2003933c    .data      EXP     DS SECdef        [noIMid]
ap_table_add
[440]   0x20039834    .data      EXP     DS SECdef        [noIMid]
ap_overlap_tables
[442]   0x2003984c    .data      EXP     DS SECdef        [noIMid]
ap_table_do
[443]   0x20039858    .data      EXP     DS SECdef        [noIMid]
ap_table_addn
[444]   0x20039864    .data      EXP     DS SECdef        [noIMid]
ap_table_unset
[445]   0x20039870    .data      EXP     DS SECdef        [noIMid]
ap_table_mergen
[446]   0x2003987c    .data      EXP     DS SECdef        [noIMid]
ap_table_setn
[447]   0x20039888    .data      EXP     DS SECdef        [noIMid]
ap_table_set
[448]   0x20039894    .data      EXP     DS SECdef        [noIMid]
ap_table_get
[465]   0x20039960    .data      EXP     DS SECdef        [noIMid] ap_palloc
        0x2003d64c  0x0000019f   Pos_Rel      0x0002     ap_table_merge
        0x2003d650  0x000001a0   Pos_Rel      0x0002     ap_table_add

I then did an apache 'make install', even though I think that the Embperl
compile and test processes use the source-code version of httpd...

Now a "make test" of Embperl still gives the following results:

$ make test
PERL_DL_NONLAZY=0
/usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.0/
aix -I/usr/local/lib/perl5/5.6.0 test.pl

loading...                    Can't load
'blib/arch/auto/HTML/Embperl/Embperl.so' for modu
le HTML::Embperl: dlopen: blib/arch/auto/HTML/Embperl/Embperl.so: 30
blib/arch/auto/HTML/
Embperl/Embperl.so36 ap_get_client_block 131 perl36 ap_log_error 132 perl36
ap_palloc 133
perl36 ap_pstrdup 134 perl36 ap_rflush 135 perl36 ap_rputc 136 perl36
ap_rwrite 137 perl36
 ap_send_http_header 138 perl36 ap_set_content_length 139 perl36
ap_setup_client_block 140
 perl36 ap_should_client_block 141 perl36 ap_table_add 142 perl36
ap_table_set 143 perl at
 /usr/local/lib/perl5/5.6.0/aix/DynaLoader.pm line 200.
 at test.pl line 557
Compilation failed in require at test.pl line 557.
BEGIN failed--compilation aborted at test.pl line 557.
make: *** [test_dynamic] Error 255






-----Original Message-----
From: Jens-Uwe Mager [mailto:jum@helios.de]
Sent: Wednesday, June 14, 2000 5:54 PM
To: Greg Estep
Cc: Jens-Uwe Mager; modperl@apache.org
Subject: Re: non-DSO mod_perl, Embperl, and AIX not working


On Wed, Jun 14, 2000 at 05:37:59PM -0400, Greg Estep wrote:
>
> I don't have a httpd.exp in /usr/local/apache/libexec.  I assume that is
> because I am not using DSO for any of my apache modules.  I
> used -bI:<apache-source-dir>/src/support/httpd.exp and got a clean
> compile/link.

Well, Apache's make install probably assumes that it is not needed in
this case, which is not entirely true as can be seen from this
situation.

> When I try 'make test', I get:
>
> $ make test
> PERL_DL_NONLAZY=0
>
/usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.0/aix
> -I/usr/local/lib/perl5/5.6.0 test.pl
>
> loading...                    Can't load
> 'blib/arch/auto/HTML/Embperl/Embperl.so
> ' for module HTML::Embperl: dlopen:
blib/arch/auto/HTML/Embperl/Embperl.so:
> 30
> blib/arch/auto/HTML/Embperl/Embperl.so36 ap_get_client_block 131 perl36
> ap_log_e
> rror 132 perl36 ap_palloc 133 perl36 ap_pstrdup 134 perl36 ap_rflush 135
> perl36
> ap_rputc 136 perl36 ap_rwrite 137 perl36 ap_send_http_header 138 perl36
> ap_set_c
> ontent_length 139 perl36 ap_setup_client_block 140 perl36
> ap_should_client_block
>  141 perl36 ap_table_add 142 perl36 ap_table_set 143 perl at
> /usr/local/lib/perl
> 5/5.6.0/aix/DynaLoader.pm line 200.
>  at test.pl line 557
> Compilation failed in require at test.pl line 557.
> BEGIN failed--compilation aborted at test.pl line 557.
> make: *** [test_dynamic] Error 255

Well this surely looks like your Apache main part does not export the
symbols in question, does a dump -nv httpd list the symbols in question
like this?

[207]   0x20007458    .data      EXP     DS SECdef        [noIMid]
ap_table_set

--
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de


Re: non-DSO mod_perl, Embperl, and AIX not working

Posted by Jens-Uwe Mager <ju...@helios.de>.
On Wed, Jun 14, 2000 at 05:37:59PM -0400, Greg Estep wrote:
> 
> I don't have a httpd.exp in /usr/local/apache/libexec.  I assume that is
> because I am not using DSO for any of my apache modules.  I
> used -bI:<apache-source-dir>/src/support/httpd.exp and got a clean
> compile/link.

Well, Apache's make install probably assumes that it is not needed in
this case, which is not entirely true as can be seen from this
situation. 

> When I try 'make test', I get:
> 
> $ make test
> PERL_DL_NONLAZY=0
> /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.0/aix 
> -I/usr/local/lib/perl5/5.6.0 test.pl
> 
> loading...                    Can't load
> 'blib/arch/auto/HTML/Embperl/Embperl.so
> ' for module HTML::Embperl: dlopen: blib/arch/auto/HTML/Embperl/Embperl.so:
> 30
> blib/arch/auto/HTML/Embperl/Embperl.so36 ap_get_client_block 131 perl36
> ap_log_e
> rror 132 perl36 ap_palloc 133 perl36 ap_pstrdup 134 perl36 ap_rflush 135
> perl36
> ap_rputc 136 perl36 ap_rwrite 137 perl36 ap_send_http_header 138 perl36
> ap_set_c
> ontent_length 139 perl36 ap_setup_client_block 140 perl36
> ap_should_client_block
>  141 perl36 ap_table_add 142 perl36 ap_table_set 143 perl at
> /usr/local/lib/perl
> 5/5.6.0/aix/DynaLoader.pm line 200.
>  at test.pl line 557
> Compilation failed in require at test.pl line 557.
> BEGIN failed--compilation aborted at test.pl line 557.
> make: *** [test_dynamic] Error 255

Well this surely looks like your Apache main part does not export the
symbols in question, does a dump -nv httpd list the symbols in question
like this?

[207]   0x20007458    .data      EXP     DS SECdef        [noIMid] ap_table_set

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de

RE: non-DSO mod_perl, Embperl, and AIX not working

Posted by Greg Estep <ge...@thinkronize.com>.
I don't have a httpd.exp in /usr/local/apache/libexec.  I assume that is
because I am not using DSO for any of my apache modules.  I
used -bI:<apache-source-dir>/src/support/httpd.exp and got a clean
compile/link.

When I try 'make test', I get:

$ make test
PERL_DL_NONLAZY=0
/usr/local/bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.6.0/aix 
-I/usr/local/lib/perl5/5.6.0 test.pl

loading...                    Can't load
'blib/arch/auto/HTML/Embperl/Embperl.so
' for module HTML::Embperl: dlopen: blib/arch/auto/HTML/Embperl/Embperl.so:
30
blib/arch/auto/HTML/Embperl/Embperl.so36 ap_get_client_block 131 perl36
ap_log_e
rror 132 perl36 ap_palloc 133 perl36 ap_pstrdup 134 perl36 ap_rflush 135
perl36
ap_rputc 136 perl36 ap_rwrite 137 perl36 ap_send_http_header 138 perl36
ap_set_c
ontent_length 139 perl36 ap_setup_client_block 140 perl36
ap_should_client_block
 141 perl36 ap_table_add 142 perl36 ap_table_set 143 perl at
/usr/local/lib/perl
5/5.6.0/aix/DynaLoader.pm line 200.
 at test.pl line 557
Compilation failed in require at test.pl line 557.
BEGIN failed--compilation aborted at test.pl line 557.
make: *** [test_dynamic] Error 255

BTW, since I am not using DSO, and am using perl 5.06, I havn't applied the
perl patch mentioned in the mod_perl INSTALL.

-----Original Message-----
From: Jens-Uwe Mager [mailto:jum@helios.de]
Sent: Wednesday, June 14, 2000 1:25 PM
To: Greg Estep
Cc: Jens-Uwe Mager; modperl@apache.org
Subject: Re: non-DSO mod_perl, Embperl, and AIX not working


On Tue, Jun 13, 2000 at 08:36:40PM -0400, Greg Estep wrote:

> When 'make' invokes 'ld' with the following command:
>
> ld -o
>
blib/arch/auto/HTML/Embperl/Embperl.so  -bhalt:4 -bM:SRE -bI:/usr/local/lib/
> perl5/5.6.0/aix/CORE/perl.exp -bE:Embperl.exp -b
> noentry -lC -lc -L/usr/local/lib Embperl.o epmain.o epio.o epchar.o
epcmd.o
> eputil.o epeval.o
>
epdbg.o -bI:/usr/local/lib/perl5/site_perl/5.6.0/aix/auto/Apache/mod_perl.ex
> p
>
> These following errors are produced.
>
> ld: 0711-317 ERROR: Undefined symbol: .ap_palloc
> ld: 0711-317 ERROR: Undefined symbol: .ap_rputc
> ld: 0711-317 ERROR: Undefined symbol: .ap_rflush
> ld: 0711-317 ERROR: Undefined symbol: .ap_rwrite
> ld: 0711-317 ERROR: Undefined symbol: .ap_setup_client_block
> ld: 0711-317 ERROR: Undefined symbol: .ap_should_client_block
> ld: 0711-317 ERROR: Undefined symbol: .ap_get_client_block
> ld: 0711-317 ERROR: Undefined symbol: .ap_pstrdup
> ld: 0711-317 ERROR: Undefined symbol: .ap_table_set
> ld: 0711-317 ERROR: Undefined symbol: .ap_table_add
> ld: 0711-317 ERROR: Undefined symbol: .ap_set_content_length
> ld: 0711-317 ERROR: Undefined symbol: .ap_send_http_header
> ld: 0711-317 ERROR: Undefined symbol: .ap_log_error
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.

These are the symbols that embperl needs to reference from the main
Apache executable, there is an -bI:/usr/local/apache/libexec/httpd.exp
missing in the above linker command line. I would suspect that the
embperl Makefile.PL could use an overhaul and use the new features of
Apache::src to find the flags needed for linking a plug-in that needs to
link both against perl and httpd.

I also would recommend that you apply the patch to perl mentioned in the
mod_perl INSTALL file.

--
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de


Re: non-DSO mod_perl, Embperl, and AIX not working

Posted by Jens-Uwe Mager <ju...@helios.de>.
On Tue, Jun 13, 2000 at 08:36:40PM -0400, Greg Estep wrote:

> When 'make' invokes 'ld' with the following command:
> 
> ld -o
> blib/arch/auto/HTML/Embperl/Embperl.so  -bhalt:4 -bM:SRE -bI:/usr/local/lib/
> perl5/5.6.0/aix/CORE/perl.exp -bE:Embperl.exp -b
> noentry -lC -lc -L/usr/local/lib Embperl.o epmain.o epio.o epchar.o epcmd.o
> eputil.o epeval.o
> epdbg.o -bI:/usr/local/lib/perl5/site_perl/5.6.0/aix/auto/Apache/mod_perl.ex
> p
> 
> These following errors are produced.
> 
> ld: 0711-317 ERROR: Undefined symbol: .ap_palloc
> ld: 0711-317 ERROR: Undefined symbol: .ap_rputc
> ld: 0711-317 ERROR: Undefined symbol: .ap_rflush
> ld: 0711-317 ERROR: Undefined symbol: .ap_rwrite
> ld: 0711-317 ERROR: Undefined symbol: .ap_setup_client_block
> ld: 0711-317 ERROR: Undefined symbol: .ap_should_client_block
> ld: 0711-317 ERROR: Undefined symbol: .ap_get_client_block
> ld: 0711-317 ERROR: Undefined symbol: .ap_pstrdup
> ld: 0711-317 ERROR: Undefined symbol: .ap_table_set
> ld: 0711-317 ERROR: Undefined symbol: .ap_table_add
> ld: 0711-317 ERROR: Undefined symbol: .ap_set_content_length
> ld: 0711-317 ERROR: Undefined symbol: .ap_send_http_header
> ld: 0711-317 ERROR: Undefined symbol: .ap_log_error
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.

These are the symbols that embperl needs to reference from the main
Apache executable, there is an -bI:/usr/local/apache/libexec/httpd.exp
missing in the above linker command line. I would suspect that the
embperl Makefile.PL could use an overhaul and use the new features of
Apache::src to find the flags needed for linking a plug-in that needs to
link both against perl and httpd.

I also would recommend that you apply the patch to perl mentioned in the
mod_perl INSTALL file.

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de

Re: non-DSO mod_perl, Embperl, and AIX not working

Posted by Shane Nay <sh...@isupportlive.com>.
On Wed, 14 Jun 2000, you wrote:
> On Wed, Jun 14, 2000 at 11:29:23AM +0000, Shane Nay wrote:
> 
> > I thought he was compiling everything statically. (httpd + modperl + embperl) 
> > The way I suggested isn't right on any platform :-).  (Didn't see the message
> > context under the "what happened log")
> 
> Hmm, a perl plug-in modules like embperl cannot be build statically, or
> do I see that wrong? Apache has options to link in external modules
> statically, but all what is not standard perl must be a dynamic plug-in.
> 

Well, perl is built in statically to the modperl DSO..., and you can statically
compile add-on modules into perl, so I think the answer here is yes.  You can
statically compile extension modules into perl.  I haven't done this in a
while, but it is something that can be done.  (This was the defacto way of
doing things back in pre 5 days I think, could anyone verify?... sorry, haven't
been around that long.)

(I should note, it's statically built into my DSO, but if you use a DSO'd
version of libperl that could be different)

Thanks,
Shane.

(This is to answer your question, yes I'm pretty sure you can.  Why I thought
he was doing that is a mystery to me, because looking back it doesn't make any
sense that I thought that.  But I've been pretty sick the last few days, so
maybe that's to blame.)

Re: non-DSO mod_perl, Embperl, and AIX not working

Posted by Jens-Uwe Mager <ju...@helios.de>.
On Wed, Jun 14, 2000 at 11:29:23AM +0000, Shane Nay wrote:

> I thought he was compiling everything statically. (httpd + modperl + embperl) 
> The way I suggested isn't right on any platform :-).  (Didn't see the message
> context under the "what happened log")

Hmm, a perl plug-in modules like embperl cannot be build statically, or
do I see that wrong? Apache has options to link in external modules
statically, but all what is not standard perl must be a dynamic plug-in.

> I can see from Jens-Uwe's reply that the DSO building process is a LOT
> different on AIX than on linux with gnutools.  (Hey what happened to gcc
> --shared? :-)

I do not use gcc on AIX, I would believe that attempting to build
anything that uses the more esoteric linker options that start with -b
to royally screw up gcc.

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de

Re: non-DSO mod_perl, Embperl, and AIX not working

Posted by Shane Nay <sh...@isupportlive.com>.
> This is not the right way to do it - this would link in dead duplicates
> of the code into the embperl shared object, possibly creating duplicate
> global variables only visible in the embperl object that are not the
> same as the ones used in the Apache main httpd executable. You must use
> proper .exp files to signal the linker that the symbols are to be
> imported at runtime from some other shared object.

I thought he was compiling everything statically. (httpd + modperl + embperl) 
The way I suggested isn't right on any platform :-).  (Didn't see the message
context under the "what happened log")

I can see from Jens-Uwe's reply that the DSO building process is a LOT
different on AIX than on linux with gnutools.  (Hey what happened to gcc
--shared? :-)

Sorry,
Shane.

Re: non-DSO mod_perl, Embperl, and AIX not working

Posted by Jens-Uwe Mager <ju...@helios.de>.
On Wed, Jun 14, 2000 at 12:21:34AM +0000, Shane Nay wrote:

> Those are internal functions to apache, like helper functions.  Your probably
> missing an object file in your ld command, I don't have it open right now, but
> just run nm blah.o|grep ap_palloc on all the object files running around in the
> apache directory, and you'll find it.  (Notice that most of these functions
> "look" similar to C calls, that's because they sort of are.  There like cross
> platform wrapper functions for apache, pretty cool huh?)  Oh, yes and nm's
> output will tell you two things, where the function is "used", and where its
> "defined".  BTW: I think you're looking for libap.a, I just poked through that
> archive of object files, and it contained the symbols you're looking for.  I
> don't know if AIX supports linking in archive files, but if not just link in by
> hand all the object files in that directory. (apache_1.blah/src/ap/*.o)

This is not the right way to do it - this would link in dead duplicates
of the code into the embperl shared object, possibly creating duplicate
global variables only visible in the embperl object that are not the
same as the ones used in the Apache main httpd executable. You must use
proper .exp files to signal the linker that the symbols are to be
imported at runtime from some other shared object.

> If nm shows the symbols in place, I would say it's probably the AIX linkers
> fault.  I don't know much about AIX specifically but I have heard lots of
> people complain about their linker :-(.

It is not buggy, it is just very different. Most unix linkers consider
global variables from all shared objects that comprise a process image
as one global space. The AIX linker does not do that, it does
explicitely require you to specify which global symbols enter the 
inter-module name space through the use of .exp files. If you link in
global symbols from some .o files these are not global symbols for other
shared objects unless being made inter-module global by an .exp file.

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de

RE: non-DSO mod_perl, Embperl, and AIX not working

Posted by Greg Estep <ge...@thinkronize.com>.
Before I sent my original message, I tracked down all the symbols, and their
object/library files.  I added several ".o"'s and ".a"'s from the apache and
mod_perl source trees, a couple from "/usr/lib/perl" and a couple from
/usr/lib via '-lxxx'.  After I got a clean link (there were some "duplicate
symbol" errors) I had the same problem (seg. faults) as I had with the
'-berok' flag.

-----Original Message-----
From: Shane Nay [mailto:shane@isupportlive.com]
Sent: Tuesday, June 13, 2000 8:22 PM
To: Greg Estep
Cc: modperl@apache.org
Subject: RE: non-DSO mod_perl, Embperl, and AIX not working


Those are internal functions to apache, like helper functions.  Your
probably
missing an object file in your ld command, I don't have it open right now,
but
just run nm blah.o|grep ap_palloc on all the object files running around in
the
apache directory, and you'll find it.  (Notice that most of these functions
"look" similar to C calls, that's because they sort of are.  There like
cross
platform wrapper functions for apache, pretty cool huh?)  Oh, yes and nm's
output will tell you two things, where the function is "used", and where its
"defined".  BTW: I think you're looking for libap.a, I just poked through
that
archive of object files, and it contained the symbols you're looking for.  I
don't know if AIX supports linking in archive files, but if not just link in
by
hand all the object files in that directory. (apache_1.blah/src/ap/*.o)

If nm shows the symbols in place, I would say it's probably the AIX linkers
fault.  I don't know much about AIX specifically but I have heard lots of
people complain about their linker :-(.

Thanks,
Shane.


RE: non-DSO mod_perl, Embperl, and AIX not working

Posted by Shane Nay <sh...@isupportlive.com>.
Those are internal functions to apache, like helper functions.  Your probably
missing an object file in your ld command, I don't have it open right now, but
just run nm blah.o|grep ap_palloc on all the object files running around in the
apache directory, and you'll find it.  (Notice that most of these functions
"look" similar to C calls, that's because they sort of are.  There like cross
platform wrapper functions for apache, pretty cool huh?)  Oh, yes and nm's
output will tell you two things, where the function is "used", and where its
"defined".  BTW: I think you're looking for libap.a, I just poked through that
archive of object files, and it contained the symbols you're looking for.  I
don't know if AIX supports linking in archive files, but if not just link in by
hand all the object files in that directory. (apache_1.blah/src/ap/*.o)

If nm shows the symbols in place, I would say it's probably the AIX linkers
fault.  I don't know much about AIX specifically but I have heard lots of
people complain about their linker :-(.

Thanks,
Shane.

RE: non-DSO mod_perl, Embperl, and AIX not working

Posted by Greg Estep <ge...@thinkronize.com>.
When 'make' invokes 'ld' with the following command:

ld -o
blib/arch/auto/HTML/Embperl/Embperl.so  -bhalt:4 -bM:SRE -bI:/usr/local/lib/
perl5/5.6.0/aix/CORE/perl.exp -bE:Embperl.exp -b
noentry -lC -lc -L/usr/local/lib Embperl.o epmain.o epio.o epchar.o epcmd.o
eputil.o epeval.o
epdbg.o -bI:/usr/local/lib/perl5/site_perl/5.6.0/aix/auto/Apache/mod_perl.ex
p

These following errors are produced.

ld: 0711-317 ERROR: Undefined symbol: .ap_palloc
ld: 0711-317 ERROR: Undefined symbol: .ap_rputc
ld: 0711-317 ERROR: Undefined symbol: .ap_rflush
ld: 0711-317 ERROR: Undefined symbol: .ap_rwrite
ld: 0711-317 ERROR: Undefined symbol: .ap_setup_client_block
ld: 0711-317 ERROR: Undefined symbol: .ap_should_client_block
ld: 0711-317 ERROR: Undefined symbol: .ap_get_client_block
ld: 0711-317 ERROR: Undefined symbol: .ap_pstrdup
ld: 0711-317 ERROR: Undefined symbol: .ap_table_set
ld: 0711-317 ERROR: Undefined symbol: .ap_table_add
ld: 0711-317 ERROR: Undefined symbol: .ap_set_content_length
ld: 0711-317 ERROR: Undefined symbol: .ap_send_http_header
ld: 0711-317 ERROR: Undefined symbol: .ap_log_error
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.

When I add '-bnoquiet' to the command, the output looks like (stdout &
stderr combined):

ld): halt 4
(ld): savename blib/arch/auto/HTML/Embperl/Embperl.so
(ld): filelist 10 4
(ld): setopt noprogram
(ld): noentry
NOENTRY: There is no entry point.
(ld): lib /usr/lib/libC.a
(ld): lib /usr/lib/libc.a
(ld): i Embperl.o
(ld): i epmain.o
(ld): i epio.o
(ld): i epchar.o
(ld): i epcmd.o
(ld): i eputil.o
(ld): i epeval.o
(ld): i epdbg.o
INSERT: Shared object libC.a[shr.o]: 403 symbols imported.
INSERT: Shared object libC.a[shr2.o]: 38 symbols imported.
INSERT: Shared object libC.a[shr3.o]: 29 symbols imported.
INSERT: Shared object libC.a[ansi_32.o]: 479 symbols imported.
INSERT: Shared object libc.a[shr.o]: 2172 symbols imported.
INSERT: Shared object libc.a[meth.o]: 2 symbols imported.
INSERT: Shared object libc.a[aio.o]: 11 symbols imported.
INSERT: Shared object libc.a[pse.o]: 78 symbols imported.
INSERT: Shared object libc.a[dl.o]: 4 symbols imported.
INSERT: Shared object libc.a[pty.o]: 1 symbols imported.
FILELIST: Number of previously inserted files processed: 10
(ld): imports /usr/local/lib/perl5/5.6.0/aix/CORE/perl.exp
IMPORTS: Symbols imported from import file
/usr/local/lib/perl5/5.6.0/aix/CORE/perl.exp: 896
(ld): imports
/usr/local/lib/perl5/site_perl/5.6.0/aix/auto/Apache/mod_perl.exp
IMPORTS: Symbols imported from import file
/usr/local/lib/perl5/site_perl/5.6.0/aix/auto/Apache/mod_perl.exp: 5
(ld): exports Embperl.exp
EXPORTS: Symbols exported: 1
(ld): resolve
RESOLVE: 894 of 5647 symbols were kept.
(ld): addgl /usr/lib/glink.o
ADDGL: Glink code added for 116 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
        The following symbols are in error:
 Symbol                    Inpndx  TY CL Source-File(Object-File) OR
Import-File{Shared-object}
                              RLD: Address  Section  Rld-type Referencing
Symbol
 ---------------------------------------------------------------------------
-------------------
ld: 0711-317 ERROR: Undefined symbol: .ap_palloc
 .ap_palloc                [224]   ER PR epio.c(epio.o)
                                   000003b4 .text    R_RBR    [22]
.EMBPERL__realloc
                                   00000508 .text    R_RBR    [24]
.EMBPERL__malloc
ld: 0711-317 ERROR: Undefined symbol: .ap_rputc
 .ap_rputc                 [254]   ER PR epio.c(epio.o)
                                   00000e5c .text    R_RBR    [60]
.EMBPERL_oputc
ld: 0711-317 ERROR: Undefined symbol: .ap_rflush
 .ap_rflush                [256]   ER PR epio.c(epio.o)
                                   00000e74 .text    R_RBR    [60]
.EMBPERL_oputc
                                   0000104c .text    R_RBR    [62]
.EMBPERL_owrite
ld: 0711-317 ERROR: Undefined symbol: .ap_rwrite
 .ap_rwrite                [260]   ER PR epio.c(epio.o)
                                   00001030 .text    R_RBR    [62]
.EMBPERL_owrite
ld: 0711-317 ERROR: Undefined symbol: .ap_setup_client_block
 .ap_setup_client_block    [268]   ER PR epio.c(epio.o)
                                   000014c8 .text    R_RBR    [72]
.EMBPERL_iread
ld: 0711-317 ERROR: Undefined symbol: .ap_should_client_block
 .ap_should_client_block   [270]   ER PR epio.c(epio.o)
                                   000014d4 .text    R_RBR    [72]
.EMBPERL_iread
ld: 0711-317 ERROR: Undefined symbol: .ap_get_client_block
 .ap_get_client_block      [272]   ER PR epio.c(epio.o)
                                   000014f4 .text    R_RBR    [72]
.EMBPERL_iread
ld: 0711-317 ERROR: Undefined symbol: .ap_pstrdup
 .ap_pstrdup               [1124]  ER PR epmain.c(epmain.o)
                                   00000a98 .text    R_RBR    [18]
<.EndOutput>
                                   00000ab0 .text    R_RBR    [18]
<.EndOutput>
                                   00000ac8 .text    R_RBR    [18]
<.EndOutput>
                                   00000b44 .text    R_RBR    [18]
<.EndOutput>
                                   00000b68 .text    R_RBR    [18]
<.EndOutput>
ld: 0711-317 ERROR: Undefined symbol: .ap_table_set
 .ap_table_set             [1126]  ER PR epmain.c(epmain.o)
                                   00000adc .text    R_RBR    [18]
<.EndOutput>
ld: 0711-317 ERROR: Undefined symbol: .ap_table_add
 .ap_table_add             [1128]  ER PR epmain.c(epmain.o)
                                   00000b7c .text    R_RBR    [18]
<.EndOutput>
ld: 0711-317 ERROR: Undefined symbol: .ap_set_content_length
 .ap_set_content_length    [1134]  ER PR epmain.c(epmain.o)
                                   00000ba8 .text    R_RBR    [18]
<.EndOutput>
ld: 0711-317 ERROR: Undefined symbol: .ap_send_http_header
 .ap_send_http_header      [1136]  ER PR epmain.c(epmain.o)
                                   00000bb4 .text    R_RBR    [18]
<.EndOutput>
                                   000011bc .text    R_RBR    [20]
<.StartOutput>
ld: 0711-317 ERROR: Undefined symbol: .ap_log_error
 .ap_log_error             [1246]  ER PR epmain.c(epmain.o)
                                   00006260 .text    R_RBR    [256]
.EMBPERL_LogError
                                   00006280 .text    R_RBR    [256]
.EMBPERL_LogError
ER: The return code is 8.

-----Original Message-----
From: Jens-Uwe Mager [mailto:jum@helios.de]
Sent: Thursday, June 08, 2000 8:45 AM
To: Greg Estep
Cc: modperl@apache.org
Subject: Re: non-DSO mod_perl, Embperl, and AIX not working


On Thu, Jun 01, 2000 at 07:40:58AM -0400, Greg Estep wrote:

> I am using IBM's C complier (cc) under AIX 4.3.3 with Apache 1.3.12,
> mod_perl 1.24 (statically linked, not DSO), perl 5.00503, and Embperl
> 1.3b3.
>
> The "offline", "execute function", and "cgi mode" Embperl tests are
> all successful. In the "mod_perl" mode, even the simple "ascii" test
> fails.  It fails with a seg. fault and a dbx stack trace that looks
> like this:
>
> ap_palloc() at 0xd1179d98
> EMBPERL__malloc() at 0xd1178b98
> EMBPERL_SetupFileData() at 0xd1177118
> EMBPERL_SetupRequest() at 0xd1177764
> XS_HTML__Embperl_SetupRequest() at 0xd116fcb8
> .() at 0x1004a344
> .() at 0x100536f0
> .() at 0x1002ff98
> perl_call_handler(??, ??, ??) at 0x10113f70
> perl_run_stacked_handlers(??, ??, ??) at 0x10113160
> perl_handler(??) at 0x10111d38
> ap_invoke_handler(0x2011f1f0) at 0x100c42bc
> process_request_internal(0x2011f1f0) at 0x100f4d6c
> ap_process_request(0x2011f1f0) at 0x100f648c
> child_main(0x0) at 0x10002d24
> make_child(0x200498e0, 0x0, 0x39363aa3) at 0x100025a0
> startup_children(0x2) at 0x1000248c
> standalone_main(0x4, 0x2ff228c8) at 0x10001928
> main(0x4, 0x2ff228c8) at 0x100014b0
>
>
> To get Embperl.so to successfully build I added "-b erok" to
> LDDLFLAGS.  I also tried '-G' with similar results. Without the
> modification to LDDLFLAGS I got several "unresolved symbol" errors.
>
> I also get similar results with Embperl 1.2b9, Apache 1.3.9, and
> mod_perl 1.23.

I did not yet try to compile mod_perl into Apache statically, so I am
not 100% sure why you get unresolved symbols, it would be interesting to
see which ones are unresolved. There are actually two ways to do dynamic
linking under AIX nowadays, namely the classic AIX way that was
available since AIX 3.1 (uses export files like under Windows or OS/2)
and for System V compatibility the runtime linking style which more or
less is like ELF dynamic linking used under Linux or Solaris. Both
Apache and Perl are only doing the classic AIX style dynamic linking, so
you cannot use the Linker Option -G to turn on runtime linking for a
module, you must use the -bE:export file -bM:SRE options instead. The
option -berok may not be used with the classic style dynamic linking,
this is causing the segfault here.

--
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de


Re: non-DSO mod_perl, Embperl, and AIX not working

Posted by Jens-Uwe Mager <ju...@helios.de>.
On Thu, Jun 01, 2000 at 07:40:58AM -0400, Greg Estep wrote:

> I am using IBM's C complier (cc) under AIX 4.3.3 with Apache 1.3.12, 
> mod_perl 1.24 (statically linked, not DSO), perl 5.00503, and Embperl 
> 1.3b3.
> 
> The "offline", "execute function", and "cgi mode" Embperl tests are 
> all successful. In the "mod_perl" mode, even the simple "ascii" test 
> fails.  It fails with a seg. fault and a dbx stack trace that looks 
> like this:
> 
> ap_palloc() at 0xd1179d98
> EMBPERL__malloc() at 0xd1178b98
> EMBPERL_SetupFileData() at 0xd1177118
> EMBPERL_SetupRequest() at 0xd1177764
> XS_HTML__Embperl_SetupRequest() at 0xd116fcb8
> .() at 0x1004a344
> .() at 0x100536f0
> .() at 0x1002ff98
> perl_call_handler(??, ??, ??) at 0x10113f70
> perl_run_stacked_handlers(??, ??, ??) at 0x10113160
> perl_handler(??) at 0x10111d38
> ap_invoke_handler(0x2011f1f0) at 0x100c42bc
> process_request_internal(0x2011f1f0) at 0x100f4d6c
> ap_process_request(0x2011f1f0) at 0x100f648c
> child_main(0x0) at 0x10002d24
> make_child(0x200498e0, 0x0, 0x39363aa3) at 0x100025a0
> startup_children(0x2) at 0x1000248c
> standalone_main(0x4, 0x2ff228c8) at 0x10001928
> main(0x4, 0x2ff228c8) at 0x100014b0
> 
> 
> To get Embperl.so to successfully build I added "-b erok" to 
> LDDLFLAGS.  I also tried '-G' with similar results. Without the 
> modification to LDDLFLAGS I got several "unresolved symbol" errors.
> 
> I also get similar results with Embperl 1.2b9, Apache 1.3.9, and 
> mod_perl 1.23.

I did not yet try to compile mod_perl into Apache statically, so I am
not 100% sure why you get unresolved symbols, it would be interesting to
see which ones are unresolved. There are actually two ways to do dynamic
linking under AIX nowadays, namely the classic AIX way that was
available since AIX 3.1 (uses export files like under Windows or OS/2)
and for System V compatibility the runtime linking style which more or
less is like ELF dynamic linking used under Linux or Solaris. Both
Apache and Perl are only doing the classic AIX style dynamic linking, so
you cannot use the Linker Option -G to turn on runtime linking for a
module, you must use the -bE:export file -bM:SRE options instead. The
option -berok may not be used with the classic style dynamic linking,
this is causing the segfault here.

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de

RE: non-DSO mod_perl, Embperl, and AIX not working

Posted by Gerald Richter <ri...@ecos.de>.
Embperl 1.3b3 and mod_perl 1.24 should work on AIX, but I don't have any
knowledge about AIX. I send a copy to Jens Uwe, who has made the patches for
Embperl to work on AIX, maybe he can help

Gerald


>
> I am using IBM's C complier (cc) under AIX 4.3.3 with Apache 1.3.12,
> mod_perl 1.24 (statically linked, not DSO), perl 5.00503, and Embperl
> 1.3b3.
>
> The "offline", "execute function", and "cgi mode" Embperl tests are
> all successful. In the "mod_perl" mode, even the simple "ascii" test
> fails.  It fails with a seg. fault and a dbx stack trace that looks
> like this:
>
> ap_palloc() at 0xd1179d98
> EMBPERL__malloc() at 0xd1178b98
> EMBPERL_SetupFileData() at 0xd1177118
> EMBPERL_SetupRequest() at 0xd1177764
> XS_HTML__Embperl_SetupRequest() at 0xd116fcb8
> .() at 0x1004a344
> .() at 0x100536f0
> .() at 0x1002ff98
> perl_call_handler(??, ??, ??) at 0x10113f70
> perl_run_stacked_handlers(??, ??, ??) at 0x10113160
> perl_handler(??) at 0x10111d38
> ap_invoke_handler(0x2011f1f0) at 0x100c42bc
> process_request_internal(0x2011f1f0) at 0x100f4d6c
> ap_process_request(0x2011f1f0) at 0x100f648c
> child_main(0x0) at 0x10002d24
> make_child(0x200498e0, 0x0, 0x39363aa3) at 0x100025a0
> startup_children(0x2) at 0x1000248c
> standalone_main(0x4, 0x2ff228c8) at 0x10001928
> main(0x4, 0x2ff228c8) at 0x100014b0
>
>
> To get Embperl.so to successfully build I added "-b erok" to
> LDDLFLAGS.  I also tried '-G' with similar results. Without the
> modification to LDDLFLAGS I got several "unresolved symbol" errors.
>
> I also get similar results with Embperl 1.2b9, Apache 1.3.9, and
> mod_perl 1.23.
>
> BTW, I did not personally compile my perl executable, it is straight
> from a fileset on the AIX 4.3.3 CD.  I have, however, upgraded
> several modules to their most recent CPAN version.  My 'perl -V'
> output looks like this:
>
> Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
>   Platform:
>     osname=aix, osvers=4.3.3.0, archname=aix
>     uname='aix funny 3 4 000001716600 '
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef useperlio=undef d_sfio=undef
>   Compiler:
>     cc='cc', optimize='-O', gccversion=
>     cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -
> qmaxmem=16384'
>     ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -
> qmaxmem=16384'
>     stdchar='unsigned char', d_stdstdio=define, usevfork=false
>     intsize=4, longsize=4, ptrsize=4, doublesize=8
>     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
>     alignbytes=8, usemymalloc=n, prototype=define
>   Linker and Libraries:
>     ld='ld', ldflags ='-s'
>     libpth=/lib /usr/lib /usr/ccs/lib
>     libs=-lnsl -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW -lC_r
>     libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
>   Dynamic Linking:
>     dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-
> bE:perl.exp'
>     cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -
> bI:$(PERL_INC)/perl.exp -bE:$(B
> ASEEXT).exp -b noentry -lc'
>
>
> Characteristics of this binary (from libperl):
>   Built under aix
>   Compiled at Aug 14 1999 08:59:55
>   @INC:
>     /usr/opt/perl5/lib/5.00503/aix
>     /usr/opt/perl5/lib/5.00503
>     /usr/opt/perl5/lib/site_perl/5.005/aix
>     /usr/opt/perl5/lib/site_perl/5.005
>     .
>
> --
> Greg Estep <ge...@thinkronize.com>
>
>




-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------