Operating System - HP-UX
1753879 Members
7435 Online
108809 Solutions
New Discussion юеВ

/usr/lib/dld.sl: Bad magic number for shared library: /usr/local/lib/libiconv.sl

 
SOLVED
Go to solution
Rick Garland
Honored Contributor

/usr/lib/dld.sl: Bad magic number for shared library: /usr/local/lib/libiconv.sl

Hi all:

Got a A500-6x running 11.11. I downloaded and installed gcc (with all dependencies) from the UTAH porting center.

I compiled a nagios plugin on this system with no problems and it works.

I am taking this binary and copy it to an ia64 (rx4640) system running 11.23.

When I run the same plugin I get the following error (Here is the complete error message)
/usr/lib/dld.sl: Bad magic number for shared library: /usr/local/lib/libiconv.sl
/usr/lib/dld.sl: Exec format error
ARIES32: Core file for PA32 application saved to /usr/local/nagios/libexec/core.check_swap
Abort(coredump)

I did some searching and all I can find is from the following post.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1147120

"file /usr/local/bin/gcc: PA-RISC2.0 shared executable dynamically linked" and "file /usr/local/lib/libiconv.sl: PA-RISC2.0 shared library -not stripped"
This is the result from the 11.11 system.

On the 11.23 system there is no gcc. "file /usr/local/lib/libiconv.sl: ELF-32 shared object file - IA64"

I am hesitant to move the libiconv.sl to the libiconv.so as stated in the previous post. This ia64 system is a TST/DEV running SG and a host of Oracle DBs and apps.

Any other ideas on working around this? Maybe a switch during the compile?

Many thanks!


2 REPLIES 2
Fabian Brise├▒o
Esteemed Contributor
Solution

Re: /usr/lib/dld.sl: Bad magic number for shared library: /usr/local/lib/libiconv.sl

Hello Rick.

Check this link out.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=542148
Knowledge is power.
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/dld.sl: Bad magic number for shared library: /usr/local/lib/libiconv.sl

Fabian's link seems to give you the details.

But your real problem is that you didn't copy nagios and ALL of its shlibs to your IPF system. And at that step, look for collisions.

Ideally, an IPF shlib should NOT be in this path /usr/local/lib/libiconv.sl and NOT end in .so. I.e. it should be in /usr/local/lib/hpux32/libiconv.so.

If you don't dare change it, you must copy your shlibs in another directory and use SHLIB_PATH to point to that one.

>Maybe a switch during the compile?

It has nothing to do with the compiler. This is a linker/dld issue.