Aris
Aris

Reputation: 5

Error during DynaLoader.pm execution How does .so file relate or created to this

I am getting the below error when trying to run a perl script.

Can't load '/oatss/oatss-prod/lib/WatchDogErrs.so' for module WatchDogErrs: /oatss/oatss-prod/lib/WatchDogErrs.so: wrong ELF class: ELFCLASS32 at /usr/lib64/perl5/DynaLoader.pm line 200.

How does this .so file get created from .pm file, where is the issue residing.

Upvotes: 0

Views: 3670

Answers (1)

cjm
cjm

Reputation: 62099

The .so doesn't get created from a .pm file, it gets created from a .xs file during the Perl module build process (e.g. the make after perl Makefile.PL). It's a library of C code integrated into Perl. Such libraries are architecture and Perl major version-specific.

DynaLoader.pm is one of the 2 main modules for loading C code into Perl (XSLoader.pm is the other).

In this case, it appears somebody compiled WatchDogErrs with a 32-bit Perl and installed it in /oatss/oatss-prod/lib/. You're trying to use it with a 64-bit Perl. That won't work. You'll need to use a 32-bit Perl compatible with the one used to compile WatchDogErrs.so, or recompile it with the Perl you want to use (and install it somewhere else, or you'll break the scripts that are using 32-bit Perl).

Upvotes: 1

Related Questions