trouble building libgcj on FreeBSD 2.2.7

Anthony Green
Mon May 17 08:34:00 GMT 1999

Andrew wrote:
> To start with, configure with --disable-threads and make sure that
> everything works.  We generally use qthreads on Linux and
> posix-threads on Solaris.  Have you tried --enable-threads=qt?

Actually, qthreads isn't in libgcj - although we could consider doing
that.  Posix threads work fine under Linux.  Debugging is the only
issue.  You will need a thread aware gdb 4.18 for that.

> The problem in your case seems to be that pthread_cancel() is not
> defined in your pthread.h.  I have no idea why that should be, but
> as far as I know you're working on a system on which we haven't run
> with POSIX threads, so you're going to have to do some porting work.

Yes, Andrew is right.  FreeBSD doesn't provide pthread_cancel().  I
believe pthread_cancel is actually an optional part of the spec.

pthread_cancel() is used to implement Thread.stop.  Thread.stop is
deprecated, and not using it is a really good idea.

I suppose our two options are

1) add a configure test for pthread_cancel, and JvFail in Thread.stop
   if it isn't provided, or

2) simply remove Thread.stop.



Anthony Green                                               Cygnus Solutions
                                                       Sunnyvale, California

More information about the Java mailing list