dlopen problem

dlopen problem

Post by Michel Hie » Tue, 01 May 2001 17:33:04



Hi there,

using the function 'dlopen', I receive the following error for some of
the library I use :

    'No such file or directory'  (errno <2>).

My problem is that I'm 100% sure the file exists, is on the right
location and has a good format  (work on another machine).

Does anyone have any idea?

TIA

--
Michel

 
 
 

dlopen problem

Post by Michel Hie » Tue, 01 May 2001 18:58:18


Don't search, I found the problem.
It was a library needed by the library I wanted to load that was missing.

I've a second question:
       Is there a way to find the name of the missing module in such a case?

TIA

Michel

 
 
 

dlopen problem

Post by Georg Brein KI » Tue, 01 May 2001 20:44:36



> Don't search, I found the problem.
> It was a library needed by the library I wanted to load that was missing.

> I've a second question:
>        Is there a way to find the name of the missing module in such a case?

> TIA

> Michel

Usually there exists a program called "ldd" (at least under Solaris,
Linux
and (Open|Free|Net)BSD) which lists all libraries an executable or a
library
depends on; if such a dependency cannot be satisfied, you'll see it in
the
output of ldd:


        libc.so.1 =>     /usr/lib/libc.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libpthread.so.1 =>       /usr/lib/libpthread.so.1
        libthread.so.1 =>        /usr/lib/libthread.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libposix4.so.1 =>        /usr/lib/libposix4.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libaio.so.1 =>   /usr/lib/libaio.so.1
        libastkssy1.so =>        (file not found)
        /usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1

In this example, the library libastkssy1.so cannot be found.

G. Brein

 
 
 

dlopen problem

Post by Michael Kerri » Tue, 01 May 2001 20:59:10




Quote:>Don't search, I found the problem.
>It was a library needed by the library I wanted to load that was missing.

>I've a second question:
>       Is there a way to find the name of the missing module in such a case?

the ldd command will list the dynamic libraries upon which an
executanble or a dynamic library depends.  Is this sufficient for your
purposes?

Cheers

Michael

 
 
 

dlopen problem

Post by Michel Hie » Tue, 01 May 2001 23:33:28


Works fine  :-)

Thanks.

 
 
 

1. dlopen problem

 Does anyone know why I get a segmentation fault
 on this code?
 void* handle = NULL;
 char name[64]="/home/data/build/ilImagedata.so\0....garbage";
 if ((handle = dlopen(name, RTLD_LAZY)) ==NULL)

name isn't really defined like that, but for the purpose of this problem
it's addequate.
If anyone could make a suggestion, I'd really really appreciate it.

Sent via Deja.com
http://www.deja.com/

2. How to logout from an unknown location ?

3. dlopen() problem

4. Help: Need CPU time on Pentium 200 MHz running Linux.

5. dlopen problems

6. mutex lock

7. Solution to -ldl or dlopen() problem

8. setting up Intel Satisfaxtion 400i

9. dlopen() problem with symbols. very strange.

10. DLopen problem using PAM API

11. Strange dlopen() problems with glibc 2.2.5

12. C++ dlopen() problem

13. mysterious dlopen problem