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

Hi Team, My Unix AIX (7.1) box has already installed perl with 5.10 version. I had installed my own perl with latest version (5.22.0). i am trying to install a perl module (Digest-SHA-5.95) to my own perl. I had download the module from net and unzip, untar and then using the commands 1. perl Makefile.PL -- success 2. make -- this command is failing with below error.
"Skip blib/lib/Digest/SHA.pm (unchanged) Running Mkbootstrap for Digest::SHA () chmod 644 "SHA.bs" cc -q32 -c -I. -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURC +E -qmaxmem=-1 -qnoansialias -qlanglvl=extc99 -DUSE_NATIVE_DLOPEN -q32 + -D_LARGE_FILES -O -DVERSION=\"5.95\" -DXS_VERSION=\"5.95\" "-I/ +home/snemmal/perl/lib/5.22.0/aix/CORE" SHA.c rm -f blib/arch/auto/Digest/SHA/SHA.so ld -bhalt:4 -G -bI:/home/snemmal/perl/lib/5.22.0/aix/CORE/per +l.exp -bE:SHA.exp -bnoentry -lc -lm SHA.o -o blib/arch/auto/Digest/ +SHA/SHA.so ld: 0711-738 ERROR: Input file SHA.o: XCOFF32 object files are not allowed in 64-bit mode. make: 1254-004 The error code from the last command is 8."
Please help me resolve this compatibility issue FYI- $perl -V:ptrsize ptrsize='4';

Replies are listed 'Best First'.
Re: XCOFF32 object files are not allowed in 64-bit mode
by syphilis (Archbishop) on Feb 02, 2016 at 13:27 UTC
    Please help me resolve this compatibility issue FYI- $perl -V:ptrsize ptrsize='4';

    Did you specifically want a 32-bit perl ?
    If not, I would try building a 64-bit perl - just give configure the -Dcc="gcc -m64" arg (or whatever is equivalent for your particular case - maybe -Dcc="cc -q64" by the looks of it).

    I kept on striking problems with my 32-bit builds of perl on Debian (though they *do* build Digest-SHA-5.95 ok). In the end I just settled for 64-bit builds of perl, which was my preferred option anyway.

    Cheers,
    Rob
      Thanks much for looking at this.. is there any alternative which dont make me remove perl 32 and install perl 64 and solve this situation... Also, if i had to move to perl 64., how can i get all my installed modules in 32-bit env.. again i need to install them?

        According to this random manpage for ld, maybe you can/have to add -b32 to the LD= line in Makefile to make ld work in 32-bit mode.

        If that works, you can either explicitly reconfigure and recompile your perl (and all modules) to have the -b32 parameter in the LD invocation or you can try patching lib/Config_heavy.pl and add the -b32 there and pray that everything still works.