Generally, you can't mix different binary formats in one program (i.e. executable + libs). If this is an Itanium based system (which I'm assuming), you typically have support for IA64 (native) and - for compatibility - IA32 (sometimes via emulation) and PA-RISC (the latter comes in several flavors, too). This doesn't always make things easy...

I'm afraid the short answer is, you'll have to build a Perl that matches your library - unless you can get a library that matches your Perl (from your description I'm assuming you don't have the sources of the lib).

BTW, what kind of library is this? Does your vendor actually ship a precompiled Perl extension without an appropriate Perl executable, or is this some more generic library for which you want to write the XS glue code yourself?

In any case, you need to find out exactly what type of lib you have. Basic info can be obtained with "file yourlib.s[lo]" (unfortunately, some HP-UXs come with a slightly buggy "magic" file (upon which the file utility bases its decisions), so you might want to cross-check with "chatr yourlib.s[lo]" (though the latter will usually only work for either IA/ELF (new) or PA-RISC (old)) ...).   Things are somewhat complicated by the fact that it's recommended to also use the same compiler (system cc vs. gcc? / versions?) - ideally with the same options. So you'll probably want to ask your vendor for those details.

I'm sorry, but it's hard to give precise instructions without knowing more details (and building software under HP-UX is generally not for the faint-of-heart), so all I can do at the moment is wish you good luck... :)


In reply to Re: Loading a 32-bit library via DynaLoader into 64-bit Perl 5.8.8 on HP-UX 11i by almut
in thread Loading a 32-bit library via DynaLoader into 64-bit Perl 5.8.8 on HP-UX 11i by MidLifeXis

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.