Wrong elf class: ELFCLASS64

Gordon Thagard gthagard at ENG.FSU.EDU
Tue Feb 17 15:13:11 GMT 2004


Solaris 9
perl-5.8.3-sol9-sparc-local from SunFreeware.com
gcc 3.3.2

I'v been trying, unsuccessfully, to install some perl modules so that,
ultimately, I can get MailScanner running for our environment. There are
three perl modules that give troubles and the problem is clearly seen when
running 'make test'. The three perl modules are:

Digest-MD5
HTML-Parser
Net-DNS

Here's the output from 'make test' for 'Digest-MD5':
-------------------
Running Mkbootstrap for Digest::MD5 ()
chmod 644 MD5.bs
rm -f blib/arch/auto/Digest/MD5/MD5.so
LD_RUN_PATH="" gcc -B/usr/ccs/bin/  -G -L/usr/local/lib MD5.o  -o
blib/arch/auto/Digest/MD5/MD5.so
chmod 755 blib/arch/auto/Digest/MD5/MD5.so
cp MD5.bs blib/arch/auto/Digest/MD5/MD5.bs
chmod 644 blib/arch/auto/Digest/MD5/MD5.bs
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/align......Can't load
'/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so' for module
Digest::MD5: ld.so.1: /usr/local/bin/perl: fatal:
/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so: wrong ELF
class: ELFCLASS64 at /usr/local/lib/perl5/5.8.3/sun4-solaris/DynaLoader.pm
line 229.
 at t/align.t line 13
Compilation failed in require at t/align.t line 13.
BEGIN failed--compilation aborted at t/align.t line 13.
t/align......dubious
        Test returned status 2 (wstat 512, 0x200)
t/badfile....Can't load
'/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so' for module
Digest::MD5: ld.so.1: /usr/local/bin/perl: fatal:
/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so: wrong ELF
class: ELFCLASS64 at /usr/local/lib/perl5/5.8.3/sun4-solaris/DynaLoader.pm
line 229.
 at t/badfile.t line 3
Compilation failed in require at t/badfile.t line 3.
BEGIN failed--compilation aborted at t/badfile.t line 3.
t/badfile....dubious
        Test returned status 2 (wstat 512, 0x200)
t/bits.......Can't load
'/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so' for module
Digest::MD5: ld.so.1: /usr/local/bin/perl: fatal:
/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so: wrong ELF
class: ELFCLASS64 at /usr/local/lib/perl5/5.8.3/sun4-solaris/DynaLoader.pm
line 229.
 at t/bits.t line 6
Compilation failed in require at t/bits.t line 6.
BEGIN failed--compilation aborted at t/bits.t line 6.
t/bits.......dubious
        Test returned status 2 (wstat 512, 0x200)
t/clone......Can't load
'/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so' for module
Digest::MD5: ld.so.1: /usr/local/bin/perl: fatal:
/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so: wrong ELF
class: ELFCLASS64 at /usr/local/lib/perl5/5.8.3/sun4-solaris/DynaLoader.pm
line 229.
 at t/clone.t line 6
Compilation failed in require at t/clone.t line 6.
BEGIN failed--compilation aborted at t/clone.t line 6.
t/clone......dubious
        Test returned status 2 (wstat 512, 0x200)
t/files......Can't load
'/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so' for module
Digest::MD5: ld.so.1: /usr/local/bin/perl: fatal:
/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so: wrong ELF
class: ELFCLASS64 at /usr/local/lib/perl5/5.8.3/sun4-solaris/DynaLoader.pm
line 229.
 at t/files.t line 11
Compilation failed in require at t/files.t line 11.
BEGIN failed--compilation aborted at t/files.t line 11.
t/files......dubious
        Test returned status 2 (wstat 512, 0x200)
t/md5-aaa....Can't load
'/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so' for module
Digest::MD5: ld.so.1: /usr/local/bin/perl: fatal:
/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so: wrong ELF
class: ELFCLASS64 at /usr/local/lib/perl5/5.8.3/sun4-solaris/DynaLoader.pm
line 229.
 at t/md5-aaa.t line 11
Compilation failed in require at t/md5-aaa.t line 11.
BEGIN failed--compilation aborted at t/md5-aaa.t line 11.
t/md5-aaa....dubious
        Test returned status 2 (wstat 512, 0x200)
t/utf8.......Can't load
'/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so' for module
Digest::MD5: ld.so.1: /usr/local/bin/perl: fatal:
/root/src/perl/Digest-MD5-2.33/blib/arch/auto/Digest/MD5/MD5.so: wrong ELF
class: ELFCLASS64 at /usr/local/lib/perl5/5.8.3/sun4-solaris/DynaLoader.pm
line 229.
 at t/utf8.t line 13
Compilation failed in require at t/utf8.t line 13.
BEGIN failed--compilation aborted at t/utf8.t line 13.
t/utf8.......dubious
        Test returned status 2 (wstat 512, 0x200)
FAILED--7 test scripts could be run, alas--no output ever seen
make: *** [test_dynamic] Error 2
--------------------------

As such, my MailScanner fails with the same sort of error:

[root at testbed bin]# ./check_mailscanner.solaris
Starting MailScanner...
Can't load
'/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/auto/HTML/Parser/Parser.so'
for module HTML::Parser: ld.so.1: /usr/local/bin/perl: fatal:
/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/auto/HTML/Parser/Parser.so:
wrong ELF class: ELFCLASS64 at
/usr/local/lib/perl5/5.8.3/sun4-solaris/DynaLoader.pm line 229.
 at /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/HTML/Entities.pm line 113
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/HTML/Entities.pm line 113.
Compilation failed in require at
/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/HTML/TokeParser.pm line 11.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/HTML/TokeParser.pm line 11.
Compilation failed in require at
/opt/MailScanner/lib/MailScanner/MCPMessage.pm line 44.
BEGIN failed--compilation aborted at
/opt/MailScanner/lib/MailScanner/MCPMessage.pm line 44.
Compilation failed in require at /opt/MailScanner/bin/MailScanner line 51.
BEGIN failed--compilation aborted at /opt/MailScanner/bin/MailScanner line 51.

I've see many references to this sort of problem doing Google
searches but the only thing I found that might be relevant
was a suggestion to build my own perl and make sure that
it is compiled 64bit. Is the SunFreeware package my problem
or is there some modification I could make to the makefile
after running a 'perl Makefile.PL' that might fix this?

Any assistance would be greatly appreciated.

G



More information about the MailScanner mailing list