1826291 Members
4520 Online
109692 Solutions
New Discussion

Shared Lib Error

 
SOLVED
Go to solution
Alfonso_15
Advisor

Shared Lib Error

Good Morning.
I am try to run this program: insert . And show this Error:
#> ./insert
/usr/lib/dld.sl: Call to mmap() failed -TEXT /u01/app/oracle/product/8.0.5/lib/
libclntsh.sl/usr/lib/dld.sl: Permission denied
Abort(coredump)
The program is type:
#>insert:PA-RISC2.0 shared executable dynamically linked -not stripped

But when I execute the program with debugger (gdb) runs fine!!!! Then when I run with gdb , is using other dld.sl
(Note when I did #> chatr insert it shows a link to static /usr/lib/libdld.1, and when I did #>chatr gdb it shows dynamic /usr/lib/libdld.2) This could be the reason?
I not have the source code for recompile the program.
The how I can make run my program without gdb?
Thanks a lot for any help.



alfonsoarias
8 REPLIES 8
Massimo Bianchi
Honored Contributor

Re: Shared Lib Error

Hi,
if you are right about the libdld.2, are the dymac path search enabled ?

from
chatr insert

you should see if SHLIB_PATH is enabled.

Another point of attention: your program is referencing
/u01/app/oracle/product/8.0.5/lib/libclntsh.sl

which is the oracle client library.

The user who is starting the insert, is able to read that file?

And,most obvious question, what has changed since last time it worked ?


Massimo


Alfonso_15
Advisor

Re: Shared Lib Error

Thanks Massimo for answer:
The program is running in a HP B10.20 With Oracle 8.0.5. But nnow we are migrating to HPB11.11 with Oracle 9.2.0.
#>chatr gdb show dinamyc path disable:
gdb:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
dynamic /usr/lib/libdld.2
shared library binding:
deferred
#>chatr insert shows also dinamyc path disable:
insert:
shared executable
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path disabled first Not Defined
shared library list:
static /u01/app/oracle/product/8.0.5/lib/libclntsh.sl
dynamic /usr/lib/pa1.1/libcl.1
static /usr/lib/libcma.1
static /usr/lib/libdld.1
dynamic /usr/lib/libc.1
dynamic /usr/lib/libstd.1
dynamic /usr/lib/libstream.1
dynamic /usr/lib/libCsup.1
shared library binding:
deferred

I copy all libraries from old server to /u01/app/oracle/product/8.0.5/lib/libclntsh.sl, and with Debugger, the program connect to Oracle database well. But again, when I run from command line my program, it not runs.

How I can change with chatr for uses uses /usr/lib/libdld.2 instead of /usr/lib/libdld.1 ?
Thanks, in advance.
alfonsoarias
Massimo Bianchi
Honored Contributor

Re: Shared Lib Error

Hi,
if we get this running, it's just luck...

10.20, oracle 805 --> 11.00, oracle 9.2

make a copy of the executable insert

try this:

chatr +s enable insert

this will enable the searching in SHLIB_PATH

then export your SHLIB_PATH=/usr/lib/libdld.2

And then try.

if fails, try also

chatr -l /usr/lib/libdld.2 insert

to enable look up of libdld.2


and re-try.

mmmmmmmm,
Massimo
Alfonso_15
Advisor

Re: Shared Lib Error

Massimo:
The commands
#> chatr -s enable insert works fine.
#> export SHLIB_PATH=/usr/lib/libdld.2 Works fine.
But
chatr -l /usr/lib/libdld.2 shows this error
shared library path not found in the list -- /usr/lib/libdld.2

I try also with -l libdld.2, -l dld.2 and -l:/usr/lib/libdld.2 and same error.
I try also with SHLIB_PATH=/usr/lib , and no change the result. Could be the version of chatr?

alfonsoarias
Mike Stroyan
Honored Contributor
Solution

Re: Shared Lib Error

/u01/app/oracle/product/8.0.5/lib/libclntsh.sl
needs to be executable. Do "chmod +x" to it.
gdb is more forgiving about mapping in shared libraries that don't have execute permission. That must be a side-effect of the way that gdb maps shared library text as private writeable regions to allow it to set breakpoints.
Mike Stroyan
Honored Contributor

Re: Shared Lib Error

Oh, by the way. The libdld.1 vs. libdld.2 business is a red-herring. The gdb program is linked with libdld.2 because it was built on 11.00. The 'insert' program is linked with libdld.1 because it was built on a 10.x release. gdb does not lend its shared libraries to the processes that it debugs.
Massimo Bianchi
Honored Contributor

Re: Shared Lib Error

Thank you Mike for your infos !

i learnt something new...
Massimo
Alfonso_15
Advisor

Re: Shared Lib Error

Mike thanks, was a simple permissions problem. Thanks Works fine. Massimo thanks a lot, I learn about chatr.
Bye guys.
alfonsoarias