perl dumps core on AIX when loading external library

A

ajfish

Hi,

I have an application built using perl 5.6 on AIX 4.3 which calls an
external library (i.e. a ".so" file) using a bootstrap file.

I have moved the application to perl 5.8 on aix 5.3 and whenever it
starts any perl script with a reference to the external library (even
where the external library is not called), it just dumps core.

doing 'strings' on the core file, I can see that it seems to have
loaded the .so file successfully, but I can't find out anything more.

I have tried debugging it with "perl -d" but it hangs before getting to
the first line of the script. Unfortunately the new environment has no
C compiler or debugging tools on it.

Any ideas as to what might cause this problem or what to try next?

TIA

Andy
 
A

Andy Fish

Which library?

one of my own - not a standard one.

The work was not done by me originally, so I'm not familiar with the
process, but as far as I can tell it uses a '.xs' file which gets converted
into C code and thence into a .so
 
D

Donald King

Andy said:
one of my own - not a standard one.

The work was not done by me originally, so I'm not familiar with the
process, but as far as I can tell it uses a '.xs' file which gets converted
into C code and thence into a .so

Did you recompile the .so from the .xs source? If memory serves, AIX
tends to be one of the twitchier Unices when it comes to shared objects,
and I wouldn't be surprised if the details of shared objects changed
between AIX 4.3 and 5.3. Even if that's not the case, then it's still
fairly unlikely that the .so doesn't touch any of the many differences
between Perl 5.6.x and 5.8.x. The ABIs change a lot between major Perl
releases, and most XS modules break until they're recompiled.
 
D

Donald King

Donald King wrote:
[Snip]
Did you recompile the .so from the .xs source? If memory serves, AIX
tends to be one of the twitchier Unices when it comes to shared objects,
and I wouldn't be surprised if the details of shared objects changed
between AIX 4.3 and 5.3. Even if that's not the case, then it's still
fairly unlikely that the .so doesn't touch any of the many differences
between Perl 5.6.x and 5.8.x. The ABIs change a lot between major Perl
releases, and most XS modules break until they're recompiled.

Re-reading your original post, I see you noted that you don't have a C
compiler installed. My gut instinct tells me that, unless you can
wrangle up a copy of GCC that targets your architecture, you're not
going to have much luck. IBM seems to have one available for AIX 5.3 on
their "AIX Toolbox" page (below).

Good luck.

<http://www-03.ibm.com/servers/aix/products/aixos/linux/download.html>
 
A

Andy Fish

Donald King said:
Donald King wrote:
[Snip]
Did you recompile the .so from the .xs source? If memory serves, AIX
tends to be one of the twitchier Unices when it comes to shared objects,
and I wouldn't be surprised if the details of shared objects changed
between AIX 4.3 and 5.3. Even if that's not the case, then it's still
fairly unlikely that the .so doesn't touch any of the many differences
between Perl 5.6.x and 5.8.x. The ABIs change a lot between major Perl
releases, and most XS modules break until they're recompiled.

Re-reading your original post, I see you noted that you don't have a C
compiler installed. My gut instinct tells me that, unless you can wrangle
up a copy of GCC that targets your architecture, you're not going to have
much luck. IBM seems to have one available for AIX 5.3 on their "AIX
Toolbox" page (below).

Thanks for the advice Donald.

I have also recently found something in the perl release notes about XS
binary compatibility being broken in 5.8 so it looks like I need to rebuild.
Hopefully we have a copy of the AIX C compiler somewhere - if not, I will
try gcc.

Andy
 
A

Andy Fish

FYI I just recompiled everything and it all works fine :-

only change from my previous envorinoment was that I had to use cc_r instead
of xlc

Andy


Andy Fish said:
Donald King said:
Donald King wrote:
[Snip]
Did you recompile the .so from the .xs source? If memory serves, AIX
tends to be one of the twitchier Unices when it comes to shared objects,
and I wouldn't be surprised if the details of shared objects changed
between AIX 4.3 and 5.3. Even if that's not the case, then it's still
fairly unlikely that the .so doesn't touch any of the many differences
between Perl 5.6.x and 5.8.x. The ABIs change a lot between major Perl
releases, and most XS modules break until they're recompiled.

Re-reading your original post, I see you noted that you don't have a C
compiler installed. My gut instinct tells me that, unless you can
wrangle up a copy of GCC that targets your architecture, you're not going
to have much luck. IBM seems to have one available for AIX 5.3 on their
"AIX Toolbox" page (below).

Thanks for the advice Donald.

I have also recently found something in the perl release notes about XS
binary compatibility being broken in 5.8 so it looks like I need to
rebuild. Hopefully we have a copy of the AIX C compiler somewhere - if
not, I will try gcc.

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top