[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: native threads and Invocation API



>>>>> Gene McCulley writes:

>>>>> "Juergen" == Juergen Kreileder <kreilede@issan.cs.uni-dortmund.de> writes:
    Juergen> Try adding '-D_REENTRANT' and '-lpthread'.

    Gene> That doesn't help.  The libpthread.so has
    Gene> sem_{destroy,post,wait,init}@@GLIBC_2.1 and
    Gene> sem_{destroy,post,wait,init}@GLIBC_2.0, but the libjava.so
    Gene> wants sem_{destroy,post,wait,init}@@GLIBC_2.0.  It looks
    Gene> like the JDK package needs to be relinked against a later
    Gene> version of 2.1.  Debian unstable is currently at 2.1.2.
    Gene> What is the JDK linked against?

2.1, the the glibc 2.1 versions of sem_* are new in 2.1.2.  This
problem looks like a general issue with symbol versioning, the default
version '@@' in glibc < 2.1.2 was GLIBC2.0, now it is GLIBC_2.1.  So
how is it possible to link against against libraries that are linked
against older defaut symbols than available on a system?  (Maybe you
should ask this question on a glibc or gcc list.)  IMHO the gcc/ld
should handle this automatically.

The workaround is to link against green threads, it doesn't make a
difference as long as you use the public JNI calls.

Looks like our next release needs 3 builds: glibc-2.0, glibc-2.1[.1],
and glibc 2.1.2 :-((

    Gene> This same test works fine against a stable version of Debian
    Gene> that uses glibc2.0.

Symbol versioning is new in glibc 2.1


        Juergen


Reply to: