1832087 Members
3028 Online
110037 Solutions
New Discussion

Bad Magic....

 
Filosofo
Regular Advisor

Bad Magic....

Hi,
I have a problem ....
exec tibrvout -A -s biTibrvout:biTibrv -- -o /sv/gbcldv27/atai/rel/server/bin/tibrvout.config :
/usr/lib/dld.sl: Bad magic number for shared library: /sv/gbcldv27/rel/server/lib/liboracle.sl
/usr/lib/dld.sl: Exec format error
CMDTUX_CAT:819: INFO: Process id=25717 Assume started (pipe).
What can I do?

Thanks for yours helps...

Filo
Sistem engeneer expert
22 REPLIES 22
Massimo Bianchi
Honored Contributor

Re: Bad Magic....

Hi,
I know my answer could be too banal, but are you sure that
- version of oracle library is compatible with the platform you are compiling on ?


Could you give more details ?

In Metalink this is the only note i found:

Problem Description: ==================== You are trying to create your own shared library using Oracle's archived libraries. You believe Oracle's libraries were compiled with the +z compiler option. You would like to get the libraries compiled with the +Z option. Problem Explanation: ==================== The compiler options +z and +Z cause the compiler to generate position independent code (PIC) for use in building shared libraries. Normally, +z should be used to generate PIC; however, when certain limits are exceeded, +Z is required to generate PIC. Solution Description: ===================== The 7.1.6 shared library liboracle.sl was compiled with +z, not +Z. The +Z option is not needed in order for liboracle.sl to be used successfully. If you wish to create your own shared library using Oracle's archived libraries, then it is up to you to make sure the contents of the shared library conform to the limitations of +z. Other uses of the Oracle software in customer-created shared libraries are not supported, and we cannot recompile our libraries with +Z.
.


Usuallt exec format error means that you are using the wrong binaries or shared libraries...

Massimo


Filosofo
Regular Advisor

Re: Bad Magic....

Thanks Massimo,
what I can do to verify if my oracle is compatible with the OS insalled?

Thanks

Filo
Sistem engeneer expert
Vicente Sanchez_3
Respected Contributor

Re: Bad Magic....

Hello Filo,

Check in search for "Bad Magic" there are several previous posts. Perhaps one of them can help you.

HTH, Vicente.
Massimo Bianchi
Honored Contributor

Re: Bad Magic....

Hi,

you must check the number of kernel bits in your kernerl


getconf KERNEL_BITS

and the version of oracle
readbale from the label.

oracle 9.x is only for 64bit HPUX.

Can you tell us
- your O.S.
- your version of Oracle
- what are trying to do ?

Massimo
Filosofo
Regular Advisor

Re: Bad Magic....

Hello,
the kernel bits version is 64 bits, oracle version is 9.2.0.3.
On the same serever there is also 8.1.7 64 bits oracle version.

I hope that you can help me.

Filo
Sistem engeneer expert
Charles Harris
Super Advisor

Re: Bad Magic....

Hi,

Just a quick point, the bad magic error usually indicates that you have installed and attempted to run a binary compiled on an uncompatible platform / or compiled for different hardware or in this case, maybe you have an existing library for an older application that is not compatible with the new one.

Hope this helps,

-=ChaZ=-
Filosofo
Regular Advisor

Re: Bad Magic....

Thanks Charles
I said that on the server thare is also oracle 8.1.7 64 bits.....but we don't use this version now.....
Can this is a problem like said Charles?

Thanks

Filo
Sistem engeneer expert
Massimo Bianchi
Honored Contributor

Re: Bad Magic....

Hi,
if you are sure that the binaries are for your platform, may be you mixed up your shared linraries.


Check the environtmane tf the user that is tryin to execute the action. Are the path regarding the 9.x ionstallation always the first occurences..

Massimo
Filosofo
Regular Advisor

Re: Bad Magic....

thanks Massimo,
the path is ok.

Thanks

Filo
Sistem engeneer expert
Charles Harris
Super Advisor

Re: Bad Magic....

Hi,

Just another quick thought, ( I know very little about Oracle ) you mentioned that the PATH variable was ok, but does the .profile for the new Oracle install point to the default PATH as defined in the generic /etc/profile ? - alonge the same line, have you tried removing the PATH env and only putting in the new working / libs / oracle filesystems, including the usual bin /usr/bin etc ?

Finaly, you could try performing a full system backup, removing the old version of Oracle or move its associated lib dirs out of the way and then reinstalling the new product?

Hope you fix it!

Cheers,


-=ChaZ=-
Massimo Bianchi
Honored Contributor

Re: Bad Magic....

Hi, just to track down the problem: could you post the output of the following command?


file /sv/gbcldv27/rel/server/lib/liboracle.sl
what /sv/gbcldv27/rel/server/lib/liboracle.sl

Massimo
Bill Hassell
Honored Contributor

Re: Bad Magic....

Actually, the path that you should be concerned about is $SHLIB_PATH, not $PATH which is used to find executables. When you login normally, the contents of /etc/PATH will be assigned to $PATH. However, the same should happen with /etc/SHLIB_PATH and the variable SHLIB_PATH defined in your environment. Because you have two instances of Oracle, there are likely two separate shared library directories for each instance. You need to make sure that $SHLIB_PATH does not have any reference to the old version of Oracle *and* any Oracle environment variables point only to the current version o Oracle and related directories. Oracle variables are usually added to /etc/profile or local .profile files, or sourced from those profile files.


Bill Hassell, sysadmin
Filosofo
Regular Advisor

Re: Bad Magic....

Thanks for all yours helps....
Massimo, this is tha output of your commands:

# file /sv/gbcldv27/rel/server/lib/liboracle.sl
/sv/gbcldv27/rel/server/lib/liboracle.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64)
# what /sv/gbcldv27/rel/server/lib/liboracle.sl
/sv/gbcldv27/rel/server/lib/liboracle.sl:
Copyright (c) 1990, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1990, 2000 Regents of the University of Michigan.
Copyright (c) 1990, 2000 Regents of the University of Michigan.
Copyright (c) 1990, 2000 Regents of the University of Michigan.
Copyright (c) 1994, 2000, 2001 The Regents of the University of Michigan.
Copyright (c) 1990, 2001 Regents of the University of Michigan.
Copyright (c) 1990, 2001 Regents of the University of Michigan.
Copyright (c) 1990, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1990 Regents of the University of Michigan.
Copyright (c) 1990, 2000 Regents of the University of Michigan.
Copyright (c) 1990, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1990, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1995, 1999, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1995, 1999, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1995, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1990, 2000 Regents of the University of Michigan.
Copyright (c) 1995, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1990, 2000 Regents of the University of Michigan.
Copyright (c) 1993, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1990, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1995, 2000 Regents of the University of Michigan.
Copyright (c) 1990, 2000, 2001 Regents of the University of Michigan.
Copyright (c) 1996, 2000 Regents of the University of Michigan.
Copyright (c) 1990, 2000 Regents of the University of Michigan.
Copyright (c) 1990, 2000 Regents of the University of Michigan.
Copyright (c) 1995, 2000 Regents of the University of Michigan.
Copyright (c) 1993, 2001 The Regents of the University of Michigan.
Copyright (c) 1995 Regents of the University of Michigan.
Copyright (c) 1995, 1999, 2000, 2001 Regents of the University of Michigan.
#

Thanks.....

Filo
Sistem engeneer expert
Filosofo
Regular Advisor

Re: Bad Magic....

hello guys,
I try to execute ldd command on the library.....and I recived this output:

ldd /sv/gbcldv27/rel/server/lib/liboracle.sl
libc.2 => /usr/lib/pa20_64/libc.2
libm.2 => /usr/lib/pa20_64/libm.2
Unable to find library 'libwtc9.sl'.

I hope that this message can help you...Thanks for ALL yours help

Filo
Sistem engeneer expert
Massimo Bianchi
Honored Contributor

Re: Bad Magic....

Hi,
i'm running out of shots....
latest ld and liner patch ?
Previusoly there was a thread in which there were the patch requirement for a oracle 9.

What version of O.S. is yours (uname -a output) ?

Massimo Bianchi
Honored Contributor

Re: Bad Magic....

Hi,
try with a find with the name of the library.
May be it is not in the SHLIB_PATH.

If it is.... then check with chatr to see if searching is properly enabled.

Massimo

Filosofo
Regular Advisor

Re: Bad Magic....

Before a said that there isn't a library....but I see that not search in oracle path...Now is OK....the library tehere is......
My OS version is 11.11
You can see tha output of swlist -l patch in attachement.

Thanks

Filo
Sistem engeneer expert
Filosofo
Regular Advisor

Re: Bad Magic....

Hello,
I try to execute chatr /app/oracle/product/9.2.0.3/lib/libwtc9.sl and I see this output:

chatr(warning): file "/app/oracle/product/9.2.0.3/lib/libwtc9.sl" appears to be corrupted and does not have a DT_FLAGS dynamic table entry. Therefore, the -B options will not function properly.
/app/oracle/product/9.2.0.3/lib/libwtc9.sl:
64-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third /b/s223/lib/:/b/s223/rdbms/lib/
shared vtable support disabled
segments:
index type address flags size
5 text 4000000000000000 z---c D (default)
6 data 8000000100000000 ---m- D (default)
static branch prediction disabled
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr references disabled

I hope that you can help me please

Filo
Sistem engeneer expert
Massimo Bianchi
Honored Contributor

Re: Bad Magic....

Hi,
the chatr was intended for tibrvout.

But, what are you tryng to do, installing oracle ? compiling something ?


Massimo

Filosofo
Regular Advisor

Re: Bad Magic....

Starting an application....and I think that before to start it must compile something....

Thanks

Filo
Sistem engeneer expert
Massimo Bianchi
Honored Contributor

Re: Bad Magic....

Hi,
then... you are starting an application.

which application ?
and i suppose that you didn't paste all the output, but just the error.
Is there any more output.

If it is an oracle app, maybe that with all the log we can find something.

Massimo
Tim Sanko
Trusted Contributor

Re: Bad Magic....

Have you eliminated the 8.1.7 releases lib from thew shlib path. I think I remember something that kind of ugly from our first 9.X Oracle install.

Remove .../product/8.1.7/lib from SHLIB_PATH and relink the ORACLE. You may be happy after that.

Tim