[drmaa-wg] Re: [GE users] Linux DRMAA library dependencies

Andreas Haas Andreas.Haas at Sun.COM
Fri May 19 12:06:04 CDT 2006


On Fri, 19 May 2006, Piotr Domagalski wrote:

> 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]$

Hi Piotr,

it works and even allows -lpthread be omitted from DRMAA application
linking stage. Please find a related patch for libs/japi/Makefile
under

   http://gridengine.sunsource.net/issues/show_bug.cgi?id=2057

thanks for pointing me on this.

It even has an impact on DRMAA compliance testsuite.

Regards,
Andreas





More information about the drmaa-wg mailing list