in reply to Loading a 32-bit library via DynaLoader into 64-bit Perl 5.8.8 on HP-UX 11i
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... :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Loading a 32-bit library via DynaLoader into 64-bit Perl 5.8.8 on HP-UX 11i
by MidLifeXis (Monsignor) on Jan 31, 2007 at 19:19 UTC |