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:[EMAIL PROTECTED]]
Sent: Thursday, June 08, 2000 8:45 AM
To: Greg Estep
Cc: [EMAIL PROTECTED]
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:       [EMAIL PROTECTED]

Reply via email to