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

Hi munks,
i have a problem with loading an 32 bit shared library in perl.
Even when i try to load a special shared library (i do only have a 32 bit version) with DynaLoader it fails with follow message:

Can't load '/FS/MyModule/blib/arch/auto/MyModule/MyModule.so' for module MyModule: /FS/MyModule/blib/arch/auto/MyModule/blib/arch/auto/MyModule/MyModule.so: wrong ELF class: ELFCLASS32 at /usr/local/bin/perl-5.8.8/lib/DynaLoader.pm line 230. at test.pl line 12

Is there any way to fix that?
  • Comment on using 32 bit shared library in 64 bit perl

Replies are listed 'Best First'.
Re: using 32 bit shared library in 64 bit perl
by Anonymous Monk on Apr 11, 2008 at 10:24 UTC
Re: using 32 bit shared library in 64 bit perl
by bigmacbear (Monk) on Apr 11, 2008 at 22:54 UTC

    Not really. You pretty much have to use 32-bit libraries with 32-bit Perl and 64-bit libraries with 64-bit Perl. However...

    If you are working with a packaged application that has both sets of libraries available for download, you can, with a bit of effort, set it up so that whatever is using the 32-bit libraries can do so, while your 64-bit Perl uses its own 64-bit libraries to access the same application. Have a look at what I did to install DBD::MySQL on Solaris.

      Thank you, i will look out.