[GE users] Linux DRMAA library dependencies

Piotr Domagalski szalik at szalik.net
Fri May 19 16:11:36 BST 2006


    [ The following text is in the "iso-8859-2" character set. ]
    [ Your display is set for the "ISO-8859-10" character set.  ]
    [ Some special characters may be displayed incorrectly. ]

On Fri, May 19, 2006 at 04:49:20PM +0200, Andreas Haas wrote:
> Please help me understand what you're proposing. Do you mean
> we should integrate entire libdl.so into libdrmaa.so? If so,
> how could this be accomplished?

I always thought that shared libraries have their own dependencies and
as I've tested a minute before, it seems to work like that for me... 

[piotr at hedera test]$ cat foo.c
#include <sys/types.h>
#include <stdlib.h>
#include <drmaa.h>
int foo()
{
        char buf[1024];
        drmaa_init(NULL, buf, 1024);
        return 0;
}

[piotr at hedera test]$ gcc -I/opt/sge/include -L/opt/sge/lib/lx24-x86 \
	-ldrmaa -ldl -shared -Wl,-soname,libfoo.so -o libfoo.so foo.o

[piotr at hedera test]$ ldd libfoo.so
        linux-gate.so.1 =>  (0x0099c000)
        libdrmaa.so => /opt/sge/lib/lx24-x86/libdrmaa.so (0x00cf6000)
        libdl.so.2 => /lib/libdl.so.2 (0x00b01000)
        libc.so.6 => /lib/libc.so.6 (0x00111000)
        libm.so.6 => /lib/libm.so.6 (0x0023a000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0025f000)
        /lib/ld-linux.so.2 (0x00b82000)

[piotr at hedera test]$ cat main.c
int main()
{
        extern int foo();
        foo();
        return 0;
}

[piotr at hedera test]$ gcc -L. -lfoo main.c
[piotr at hedera test]$ ./a.out
[piotr at hedera test]$


So I think you could just link with libdl.so during DRMAA library
compilation...

-- 
Piotr Domagalski

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net




More information about the gridengine-users mailing list