trouble building libgcj on FreeBSD 2.2.7

Andrew Haley aph@pasanda.cygnus.co.uk
Mon May 17 07:36:00 GMT 1999


> Date: Sat, 15 May 1999 18:51:56 -0700 (PDT)
> From: Seth Golub <seth@thehouse.org>
> 
> I've got a fresh CVS checkout from earlier today.  egcs built without
> a hitch, but I get an error trying to build libgcj:
> 
> c++ -DHAVE_CONFIG_H -I. -I../../../libgcj/libjava -I./include -Iinclude -I../../../libgcj/libjava/include -I../../../libgcj/libjava/../boehm-gc -I./../boehm-gc -DSILENT=1 -DNO_SIGNALS=1 -DNO_DEBUGGING=1 -DJAVA_FINALIZATION=1 -I../../../libgcj/libjava/../compat-include -fno-rtti -fvtable-thunks -W -Wall -g -O2 -Wp,-MD,.deps/posix-threads.pp -c  -fPIC -DPIC ../../../libgcj/libjava/posix-threads.cc -o .libs/posix-threads.lo
> ../../../libgcj/libjava/posix-threads.cc: In function `void _Jv_ThreadCancel(_Jv_Thread_t *, void *)':
> ../../../libgcj/libjava/posix-threads.cc:277: implicit declaration of function `int pthread_cancel(...)'
> gmake[2]: *** [posix-threads.lo] Error 1
> gmake[2]: Leaving directory `/usr/home/pizzazon/tmp/libgcj-build/i386-unknown-freebsd2.2.7/libjava'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/usr/home/pizzazon/tmp/libgcj-build/i386-unknown-freebsd2.2.7/libjava'
> gmake: *** [all-target-libjava] Error 2
> 
> 
> My config.status:
> ../libgcj/configure --host=i386-unknown-freebsd2.2.7 --prefix=/usr/home/pizzazon/egcs --enable-java-gc=boehm --enable-threads=posix --enable-fast-character --norecursion 
> 
> egcs was also built with --enable-threads=posix
> 
> I tried configuring and building libgcj without --enable-threads=posix 
> but got the same error.  I didn't try rebuilding egcs without it
> though.  Of course, I would rather have thread support.

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?

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.

Andrew.


More information about the Java mailing list