Re: [GE users] Linux DRMAA library dependencies
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@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@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@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@hedera test]$ cat main.c int main() { extern int foo(); foo(); return 0; }
[piotr@hedera test]$ gcc -L. -lfoo main.c [piotr@hedera test]$ ./a.out [piotr@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
participants (1)
-
Andreas Haas