Bug 21714 - [4.6/4.7/4.8 Regression] libjava bootstrap failure in java/lang/natConcreteProcess.cc
Summary: [4.6/4.7/4.8 Regression] libjava bootstrap failure in java/lang/natConcretePr...
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.0.0
: P5 normal
Target Milestone: 4.6.4
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2005-05-22 21:47 UTC by cato
Modified: 2012-11-09 22:34 UTC (History)
4 users (show)

See Also:
Host:
Target: *-netbsdelf1.*
Build:
Known to work:
Known to fail: 4.0.4
Last reconfirmed: 2006-02-12 18:10:10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cato 2005-05-22 21:47:37 UTC
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.
Comment 1 Andrew Pinski 2005-05-22 22:08:50 UTC
Huh, are you sure it does not have pthreads.
Comment 2 kristerw@netbsd.org 2005-05-23 15:31:58 UTC
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.
Comment 3 Andrew Pinski 2005-05-23 15:39:09 UTC
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.
Comment 4 David Daney 2005-05-23 15:47:40 UTC
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.
Comment 5 Tom Tromey 2005-05-23 18:06:25 UTC
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.
Comment 6 cato 2005-05-23 20:55:44 UTC
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?
Comment 7 Andrew Pinski 2005-10-13 19:22:30 UTC
Moving to 4.2 since java and netbsd are not primary/secondary targets/languages.
Comment 8 Mark Mitchell 2006-05-25 02:36:09 UTC
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.
Comment 9 Tom Tromey 2008-01-17 22:25:07 UTC
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.
Comment 10 Joseph S. Myers 2008-07-04 16:54:01 UTC
Closing 4.1 branch.
Comment 11 Joseph S. Myers 2009-03-31 18:48:10 UTC
Closing 4.2 branch.
Comment 12 Richard Biener 2009-08-04 12:26:24 UTC
GCC 4.3.4 is being released, adjusting target milestone.
Comment 13 Richard Biener 2010-05-22 18:10:29 UTC
GCC 4.3.5 is being released, adjusting target milestone.
Comment 14 Richard Biener 2011-06-27 12:14:10 UTC
4.3 branch is being closed, moving to 4.4.7 target.
Comment 15 Jakub Jelinek 2012-03-13 12:47:25 UTC
4.4 branch is being closed, moving to 4.5.4 target.
Comment 16 Steven Bosscher 2012-11-09 22:34:33 UTC
Let's be realistic about this: WONTFIX.