This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
-lpthread problem?
- From: Andrew Haley <aph at redhat dot com>
- To: Anthony Green <green at redhat dot com>
- Cc: java at gcc dot gnu dot org
- Date: Sat, 4 Jan 2003 16:08:02 +0000 (GMT)
- Subject: -lpthread problem?
- References: <1041695203.2178.19.camel@escape>
Anthony Green writes:
> I have a gcj-based application on Linux which links in a number of
> third-party shared libraries, all created with libtool. One of these
> libraries was itself linked with -lpthread.
>
> I have discovered that my application hangs while getting a stack trace
> unless I remove the -lpthread from the link line of the library I link
> into my application.
>
> I think this would really baffle a casual user. Any suggestions on how
> to make it a little more friendly?
To quote drepper:
"This is a known limitation of the old thread implementation. The new
thread library will work regardless of the position in the ELF symbol
lookup scope (i.e., regardless of whether it is linked to directly or
not). For now have people linked against libpthread directly."
Andrew.