Operating System - HP-UX
1825759 Members
2131 Online
109687 Solutions
New Discussion

PERL Installation Problem::Bad Magic Number

 
Nainar
New Member

PERL Installation Problem::Bad Magic Number

Hi,

Im trying to install the Crypt-SSLeay0.45 module in the HP-UX 11.11 box. (The reasion im installing this module is to health check the SSL Web server(https://somesite.com)instance using perl program.) When I run the "make test" command im getting the "Exec format error" error.

*************************************
PERL_DL_NONLAZY=1 /opt/perl/bin/perl -Iblib/arch -Iblib/lib -I/opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi -I/opt/perl/lib/5.6.1 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/net_ssl.........../usr/lib/dld.sl: Bad magic number for shared library: blib/arch/auto/Crypt/SSLeay/SSLeay.sl
/usr/lib/dld.sl: Exec format error
Can't load 'blib/arch/auto/Crypt/SSLeay/SSLeay.sl' for module Crypt::SSLeay: Exec format error at /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/DynaLoader.pm line 206.
at lib/Net/SSL.pm line 15
Compilation failed in require at lib/Net/SSL.pm line 15.
Compilation failed in require at t/net_ssl.t line 5.
BEGIN failed--compilation aborted at t/net_ssl.t line 5.
t/net_ssl...........dubious ****************************************

Version of the perl installed in this box is "v5.6.1 built for PA-RISC1.1-thread-multi"

Information about the box:
ELF-64 executable object file - PA-RISC 2.0 (LP64)

Information about the SSLeay.sl file::
ELF-64 shared object file - PA-RISC 2.0 (LP64)

I dont know whether the perl binary compiled in 32 bit or 64 bit mode. Is it because I'm trying to install the 64 bit shared object file in to 32 bit perl installation? How do I find which bit of perl is installed? Or is there any other problem which is causing this error? Thanks in Advance
6 REPLIES 6
Uday_S_Ankolekar
Honored Contributor

Re: PERL Installation Problem::Bad Magic Number

Hi,

I think you can use perl -V command to get the bit info.
-USA..
Good Luck..
Rajeev  Shukla
Honored Contributor

Re: PERL Installation Problem::Bad Magic Number

Check for the path of the perl because the library your program is searching is in "/opt/perl/lib/5...." but just check i think perl is installed in /opt/perl5 and thats where all library are.
Just make a soft link of /opt/perl5 to /opt/perl that should solve your problem.
Because by default when you install perl5.6.1 it installs in /opt/perl5.
Cheers
Rajeev
H.Merijn Brand (procura
Honored Contributor

Re: PERL Installation Problem::Bad Magic Number

indeed perl -V will show you, but you can tell from the architecture sig: pa-risc-1.1 is 32bit only, and I've not seen 64bit perls around on HP's porting center (yet), so your combo is a no-go.

Either try to compile a 64bit perl from source (in that case, please go for 5.8.0, which has far better 64bit performance than 5.6.1, and a lot of 64bit issues and bugs solved), or get hold of 32bit libs for SSL
Enjoy, Have FUN! H.Merijn
Nainar
New Member

Re: PERL Installation Problem::Bad Magic Number

Hi All,

Thanks for all the tips. Procura, as you said I tried to get the 32bit SSLeay. But it is not availabe in the market yet. So what I did is, installed the GCC 3.2 for 32 bit and compiled the program again. The "make test" worked fine without any error. But when i compile the program by doing "make", Im again getting the following error.

**************************************
gcc -c -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -mpa-risc-1-1 -fPIC -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.12\" -DXS_VERSION=\"2.12\" -fPIC -I/opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/CORE Base64.c
cc1: warning: changing search order for system directory "/usr/local/include"
cc1: warning: as it has already been specified as a non-system directory
In file included from /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/CORE/perl.h:713,
from Base64.xs:32:
/usr/include/sys/socket.h:439: parse error before "sendfile"
/usr/include/sys/socket.h:440: parse error before "bsize_t"
/usr/include/sys/socket.h:441: parse error before "sendpath"
/usr/include/sys/socket.h:442: parse error before "bsize_t"
/usr/include/sys/socket.h:456: parse error before "__sendfile64"
/usr/include/sys/socket.h:456: parse error before "bsize_t"
/usr/include/sys/socket.h:457: parse error before "__sendpath64"
/usr/include/sys/socket.h:457: parse error before "bsize_t"
/usr/include/sys/socket.h:459: parse error before "sendfile"
/usr/include/sys/socket.h: In function `sendfile':
/usr/include/sys/socket.h:459: parse error before "bsize_t"
/usr/include/sys/socket.h: At top level:
/usr/include/sys/socket.h:460: parse error before "sendpath"
/usr/include/sys/socket.h: In function `sendpath':
/usr/include/sys/socket.h:460: parse error before "bsize_t"
*** Error exit code 1
****************************************

But when i compile this by using the 64 bit GCC then it is working fine. what could be the problem. I downloaded the GCC 3.2 from HP Porting..and i installed the make 3.79.1 also. But that didn't help me. Any idea why im getting this error.

Thanks
Nainar
OneNeck UNIXSA
Frequent Advisor

Re: PERL Installation Problem::Bad Magic Number

I am getting the same error.

This is perl, v5.6.1 built for PA-RISC1.1-thread-multi
(with 1 registered patch, see perl -V for more detail)

gcc (GCC) 3.2
OpenSSL 0.9.7 31 Dec 2002

Has anyone install the Perl SSLeay module successfully?
H.Merijn Brand (procura
Honored Contributor

Re: PERL Installation Problem::Bad Magic Number

Yeah, me with HP C-ANSI-C for perl-5.6.1, perl-5.8.0 and perl-5.9.0 32bit non-threaded with OpenSSL-0.9.6g (now 0.9.7) from http://hpux.connect.org.uk/hppd/hpux/Languages/openssl-0.9.7/
Enjoy, Have FUN! H.Merijn