User account creation filtered due to spam.

Bug 5944

Summary: Use of uint32_t breaks libgcj bootstrap on Solaris 2.5.1
Product: gcc Reporter: Rainer Orth <ro>
Component: libgcjAssignee: Tom Tromey <tromey>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, java-prs, ro
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Host: sparc-sun-solaris2.5.1 Target: sparc-sun-solaris2.5.1
Build: sparc-sun-solaris2.5.1 Known to work:
Known to fail: Last reconfirmed:

Description Rainer Orth 2002-03-13 12:16:05 UTC
Bootstrapping fails on Solaris 2.5.1 trying to compile gnu/gcj/io/shs.cc:

 libjava/libltdl -I/vol/gnu/src/gcc/gcc-3.1-branch-dist/libjava/.././libjava/../gcc -I/vol/gnu/src/gcc/gcc-3.1-branch-dist/libjava/../zlib -I/vol/gnu/src/gcc/gcc-3.1-branch-dist/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -I/vol/X11/include -W -Wall -D_GNU_SOURCE -DPREFIX=\"/vol/gcc\" -g -O2 -MD -MT java/io/natFileDescriptor.lo -MF java/io/natFileDescriptor.pp -c java/io/natFileDescriptor.cc  -fPIC -DPIC -o java/io/.libs/natFileDescriptor.o
In file included from /vol/gnu/src/gcc/gcc-3.1-branch-dist/libjava/gnu/gcj/io/shs.cc:18:
/vol/gnu/src/gcc/gcc-3.1-branch-dist/libjava/gnu/gcj/io/shs.h:34: parse error 
   before `[' token
/vol/gnu/src/gcc/gcc-3.1-branch-dist/libjava/gnu/gcj/io/shs.h:35: parse error 
   before `,' token
/vol/gnu/src/gcc/gcc-3.1-branch-dist/libjava/gnu/gcj/io/shs.h:36: parse error 
   before `[' token

This happens due to the following patch

2002-02-06  Adam Megacz <adam@xwt.org>

        * gnu/gcj/io/shs.h, gnu/gcj/io/shs.cc, gnu/gcj/io/natSimpleSHSStream.cc:
        use uint<n>_t instead of LONG and BYTE

which unconditionally uses uint<n>_t which doesn't exist in standard headers on
Solaris 2.5.1.  java/lang/mprec.h has a workaround/fix for this.

Release:
3.1 20020313 (prerelease)

Environment:
System: SunOS tamarinde 5.5.1 Generic_103640-28 sun4u sparc SUNW,Ultra-4
Architecture: sun4

	
host: sparc-sun-solaris2.5.1
build: sparc-sun-solaris2.5.1
target: sparc-sun-solaris2.5.1
configured with: /vol/gnu/src/gcc/gcc-3.1-branch-dist/configure --prefix=/vol/gcc --with-local-prefix=/vol/gcc --disable-nls

How-To-Repeat:
Try bootstrapping on Solaris 2.5.1 with libgcj included (the default).
Comment 1 Rainer Orth 2002-03-13 12:16:05 UTC
Fix:
I don't know how to best fix this: either include java/lang/mprec.h or (probably
far better) move those definitions of uint<n>_t to a better place.
Comment 2 Rainer Orth 2002-03-13 22:20:26 UTC
From: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: libgcj/5944: gnu/gcj/io/shs.cc doesn't compile on Solaris 2.5.1 (bootstrap failure)
Date: Wed, 13 Mar 2002 22:20:26 +0100 (MET)

 > >Category:       libgcj
 > >Responsible:    unassigned
 > >Synopsis:       Use of uint32_t breaks libgcj bootstrap on Solaris 2.5.1
 > >Arrival-Date:   Wed Mar 13 12:16:05 PST 2002
 
 Trying to bootstrap on Tru64 UNIX V4.0F, I noticed a similar problem: this
 system doesn't have any definition of uint<n>_t in system headers, so
 bootstrap with --enable-libgcj is broken on this platform as well.
 
 	Rainer
Comment 3 Tom Tromey 2002-03-15 13:59:40 UTC
Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-Why: I'm handling this.
Comment 4 Tom Tromey 2002-03-15 13:59:40 UTC
State-Changed-From-To: open->closed
State-Changed-Why: I've checked in the fix.
    Thanks.
Comment 5 Tom Tromey 2002-03-15 21:56:04 UTC
From: tromey@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libgcj/5944
Date: 15 Mar 2002 21:56:04 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_1-branch
 Changes by:	tromey@gcc.gnu.org	2002-03-15 13:56:04
 
 Modified files:
 	libjava        : ChangeLog 
 	libjava/gnu/gcj/io: shs.h 
 
 Log message:
 	2002-03-15  Tom Tromey  <tromey@redhat.com>
 	Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
 	
 	Fix for PR libgcj/5944.
 	* gnu/gcj/io/shs.h: Define uint8_t and uint32_t.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_1-branch&r1=1.1197.2.36&r2=1.1197.2.37
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/gnu/gcj/io/shs.h.diff?cvsroot=gcc&only_with_tag=gcc-3_1-branch&r1=1.2&r2=1.2.2.1
 

Comment 6 Tom Tromey 2002-03-15 21:59:14 UTC
From: tromey@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libgcj/5944
Date: 15 Mar 2002 21:59:14 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	tromey@gcc.gnu.org	2002-03-15 13:59:14
 
 Modified files:
 	libjava        : ChangeLog 
 	libjava/gnu/gcj/io: shs.h 
 
 Log message:
 	2002-03-15  Tom Tromey  <tromey@redhat.com>
 	Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
 	
 	Fix for PR libgcj/5944.
 	* gnu/gcj/io/shs.h: Define uint8_t and uint32_t.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.1235&r2=1.1236
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/gnu/gcj/io/shs.h.diff?cvsroot=gcc&r1=1.2&r2=1.3