in reply to 32bit lib on 64bit system

We tried installing SuSE's perl-32bit package. It didn't help. That package is installed, but I have seen nothing. "whereis perl" finds only the 64bit version, perl -v reports that it is the 64bit version.
Have you tried rpm -ql perl32_package_name to find the binary?

Replies are listed 'Best First'.
Re^2: 32bit lib on 64bit system
by bkchapin (Acolyte) on Nov 25, 2008 at 15:45 UTC

    We already had 32bit gcc installed, as we've had to compile other 32bit software. Those packages we installed are gcc-32bit, libstdc++42-devel-32bit, and libstdc++42-32bit.

    Thanks to that rpm command, I learned that perl-32bit does indeed install a bunch of library (.a, .o, .so) files under /usr/lib/perl5/5.8.8/i586-linux-thread-multi. Just library files, no .pm or .h files-- guess all those are the same as under x86_64.

    I got ICS to compile by altering the Makefile generated by "perl Makefile.PL". Changed every "x86_64-linux-thread-multi" to "i586-linux-thread-multi", which caused errors about not being able to find Config.pm, then not being able to find config.h. Changed PERL_ARCHLIB and PERL_INC back to x86_64-linux-thread-multi to fix those. Next, I ran make with some flags: make PASTHRU_INC='-m32' LD='cc -m32' ("-march=i386" only gives an error "CPU you selected does not support x86-64 instruction set"). That finally made ICS.c compile, and I got a file blib/arch/auto/ICS/ICS.so that is 32bit. Seems there ought to be an easier way to do that, some flag I can pass for "perl Makefile.PL".

    But it still doesn't work. Now when I try "make test", upon reaching the line with "use ICS;", I get:

    Can't load '.../blib/arch/auto/ICS/ICS.so' for module ICS: ... wrong ELF class: ELFCLASS32 at /usr/lib/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.

      It looks like make test runs 64 bit version of perl

      You'd need to run Makefile.PL with the appropriate 32-bit perl binary.  Yes, I know, there wasn't one... but now that there is (i.e. after you've installed all required 32-bit files as described below), that would be

      /usr/bin/perl32 Makefile.PL

      Good luck!