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.


In reply to Re^2: 32bit lib on 64bit system by bkchapin
in thread 32bit lib on 64bit system by bkchapin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.