FredKJ has asked for the wisdom of the Perl Monks concerning the following question:

I am compiling Perl on one aix box to port to another aix box to run there. The code compiles and functions properly. When I port it to the other machine I get a runtime error that Symbol PL_memory_wrap cannot be exported from libperl.a(libperl.o). These Perl library files are different sizes on the different machines. How can I compile the code so it will run on the target machine?

Replies are listed 'Best First'.
Re: compile and port on aix
by Corion (Patriarch) on Jan 29, 2009 at 15:32 UTC

    I think that the versions of Perl on the two machines are different. It's highly unlikely that C-extension code ("XS code") compiled for one major version of Perl (5.x) will work with a different major version of Perl (5.y). And even if you have two identical major versions of Perl 5 on the two machines, both perl executables need to have been compiled with the same settings. You will need to compare the output of perl -V of both machines and see whether there are substantial differences.

    The easiest approach would likely be to compile the extension directly on the target machine, or to compile one version of Perl for both machines and only use that Perl.

Re: compile and port on aix
by FredKJ (Novice) on Jan 29, 2009 at 15:42 UTC
    I ran perl -v on both systems. They are both running 5.8.0 but on the machine I am compiling on it shows that there are two registered patches. This looks like the difference.
      5.8.0 was a rather buggy release, so maybe it's time to upgrade and install a recent version of Perl and the same in all your systems!
Re: compile and port on aix
by FredKJ (Novice) on Jan 29, 2009 at 15:36 UTC
    I can't compile on the other machine or I would. There is no "C" compiler there. There are clearly multiple versions here. This code is off the ...aix-thread-multi/CORE directory so I assume it is sensitive to the specific platform. The business restraints I am in are that the code has to be compiled and I have to be able to port it to other aix systems.