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

Andreas Haas Andreas.Haas at Sun.COM
Sat May 20 13:59:52 BST 2006

On Sat, 20 May 2006, Piotr Domagalski wrote:

> On Fri, May 19, 2006 at 07:06:04PM +0200, Andreas Haas wrote:
> > it works and even allows -lpthread be omitted from DRMAA application
> > linking stage. Please find a related patch for libs/japi/Makefile
> > under
> Great!
> As for -lpthread, I think the situation is a bit tricky, particularly on
> my FreeBSD 6.1 box. Even though the library is linked with -lpthread,

Hm ... I encounter under Darwin there seems to be generally no -lpthread
dependency. Here is old/new linking ldd for test_drmaa_perf

   > otool -L /vol2/tools/SW/darwin/bin/test_drmaa_perf
           libdrmaa.dylib (compatibility version 0.0.0, current version 0.0.0)
           /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 63.0.0)
           /usr/lib/libdl.dylib (compatibility version 1.0.0, current version 1.0.0)

   > otool -L DARWIN/test_drmaa_perf
           /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 63.0.0)
        libdrmaa.dylib (compatibility version 0.0.0, current version 0.0.0)

note in both cases -lpthread is used at linking stage since test_drmaa_perf
is multithreaded application code.

> the application using it must also link with the threading library or
> else it crashes on start. I think it's only a FreeBSD issue, and kind of
> a bug (probably libc has it's internal locks and gets confused somehow
> if the application is not directly linked with pthreads)...

Does your application code itself use pthread_*() calls?
Where does it crash: in application code or in library code?

> All in all, it's easier to remember that drmaa just uses pthread and to
> link app with apropriate threading library. Adding -ldl was more
> OS-dependant, FreeBSD doesn't have libdl.so for instance.

In terms of standard definition I see no general issue with having
different libraries to be specified at application linking stage for
different OSes: DRMAA compliance testsuite allows to absorb it. An
issue it would be only, if DRMAA applications would inherit some
shared library dependency which can not be fulfilled easily at
deployment time and -dl and -lpthread for sure are unproblematic.


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