Bootstrapping gcc "4.1.0 20050521 (experimental)" fails when compiling libjava: java/lang/natConcreteProcess.cc:25:21: error: pthread.h: No such file or directory java/lang/natConcreteProcess.cc: In member function 'void java::lang::ConcreteProcess$ProcessManager::init()': java/lang/natConcreteProcess.cc:105: error: 'pthread_self' was not declared in this scope because NetBSD 1.6 does not have threads. This is a regression, since bootstrapping gcc 3.4 works.
Huh, are you sure it does not have pthreads.
Subject: Re: libjava bootstrap failure in java/lang/natConcreteProcess.cc On Sun, 22 May 2005, pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-22 22:08 ------- > Huh, are you sure it does not have pthreads. Yes, I am sure. pthreads were added in the NetBSD 2.0 release.
Yes I was told late last night the same thing. This was caused by: 2004-08-12 David Daney <ddaney@avtrex.com> PR libgcj/11801 * java/lang/PosixProcess.java: Rewrote. * java/lang/natPosixProcess.cc: Rewrote. * java/lang/Runtime.java (execInternal): Declare throws IOException. * gcj/javaprims.h (ConcreteProcess$ProcessManager): Declare. * posix-threads.cc (block_sigchld) New function. (_Jv_ThreadRegister) Use it. (_Jv_ThreadStart) Use it. * configure.in (PLATFORM_INNER_NAT_HDRS): New AC_SUBST() used in... * Makefile.am: ... to specify extra native headers. * configure: Regenerated. * include/config.h: Regenerated. * Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated.
I don't think we should revert it as Process et al. were broken on many pthread targets before the patch. Since NetBSD is not posix, perhaps it should not be using PosixProcess. I am not a BSD hacker so I cannot fix it.
I agree, we should definitely not revert this. Instead someone should make this file compile and try to work ok when no threads are available. Or, if that can't be done, make a new natBSDProcess.cc.
Subject: Re: [4.0/4.1 Regression] libjava bootstrap failure in java/lang/natConcreteProcess.cc This is not a BSD problem -- it is just that NetBSD 1.6 is old enough that threads were not as pervasive as they are now (and NetBSD takes long term maintenance seriously, so 1.6 is still a maintained release branch). What are the problems with the old implementation? Would it make sense to resurrect it as natProcessNoThread.c or something?
Moving to 4.2 since java and netbsd are not primary/secondary targets/languages.
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.
From comment #6: > What are the problems with the old implementation? Would it make > sense to resurrect it as natProcessNoThread.c or something? See PR 11801 for the problems with the old implementation. Resurrecting the old code for BSD, or trying to fix it, is fine by me. However, if you don't have threads, very few java programs will actually work.
Closing 4.1 branch.
Closing 4.2 branch.
GCC 4.3.4 is being released, adjusting target milestone.
GCC 4.3.5 is being released, adjusting target milestone.
4.3 branch is being closed, moving to 4.4.7 target.
4.4 branch is being closed, moving to 4.5.4 target.
Let's be realistic about this: WONTFIX.