Bug 9652 - libjava bootstrap failure on irix6.5.1[78]
Summary: libjava bootstrap failure on irix6.5.1[78]
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 3.4.0
: P3 normal
Target Milestone: 3.1.x/3.2.x
Assignee: Rainer Orth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-11 00:46 UTC by david.billinghurst
Modified: 2004-04-21 02:55 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description david.billinghurst 2003-02-11 00:46:00 UTC
libgcj build fails on irix6.5.1[78]

/exd4/billingd/obj/gcc/gcc/xgcc -shared-libgcc -B/exd4/billingd/obj/gcc/gcc/ -nostdinc++ -L/exd4/billingd/obj/gcc/mips-sgi-irix6.5/mabi=64/libstdc++-v3/src -L/exd4/billingd/obj/gcc/mips-sgi-irix6.5/mabi=64/libstdc++-v3/src/.libs -B/exd4/billingd/tmp/gcc/mips-sgi-irix6.5/bin/ -B/exd4/billingd/tmp/gcc/mips-sgi-irix6.5/lib/ -isystem /exd4/billingd/tmp/gcc/mips-sgi-irix6.5/include -mabi=64 -DHAVE_CONFIG_H -I. -I/exd4/billingd/src/gcc/libjava -I./include -I./gcj -I/exd4/billingd/src/gcc/libjava -Iinclude -I/exd4/billingd/src/gcc/libjava/include -I/exd4/billingd/src/gcc/libjava/../boehm-gc/include -DNO_EXECUTE_PERMISSION=1 -DSILENT=1 -DNO_SIGNALS=1 -DNO_EXECUTE_PERMISSION=1 -DALL_INTERIOR_POINTERS=1 -DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1 -DATOMIC_UNCOLLECTABLE=1 -I/exd4/billingd/src/gcc/libjava/libltdl -I/exd4/billingd/src/gcc/libjava/libltdl -I/exd4/billingd/src/gcc/libjava/.././libjava/../gcc -I/exd4/billingd/src/gcc/libjava/../zlib -I/exd4/billingd/src/gcc/libjava/../libffi!
/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum -W -Wall -D_GNU_SOURCE -DPREFIX=\"/exd4/billingd/tmp/gcc\" -g -O2 -mabi=64 -Wp,-MD,.deps/prims.pp -c /exd4/billingd/src/gcc/libjava/prims.cc   -DPIC -o .libs/prims.o
 In file included from /exd4/billingd/src/gcc/libjava/prims.cc:12:
 include/platform.h: In function `int _Jv_accept(int, sockaddr*, socklen_t*)':
 include/platform.h:107: error: invalid conversion from `socklen_t*' to `int*'

Rainer Orth http://gcc.gnu.org/ml/java/2003-02/msg00038.html wrote:

I've tripped over the same problem some time ago, but didn't have time to
report or provide a fix.  The problem is that IRIX 6.5.17 and 6.5.18
introduced a definition of socklen_t in <sys/socket.h>.  libjava assumes
that if socklen_t is defined, it can be used e.g. as the type of accept's
last arg.  This is wrong here, since IRIX provides several different
definitions of accept, with differing types:

#if _NO_XOPEN4 && _NO_XOPEN5
/* Std BSD4.3/SGI */
extern int accept(int, void *, int *);

#if _ABIAPI
/* BB3.0 is XPG compliant but can't use hidden names */
extern int accept(int, struct sockaddr *, size_t *);

#else
/* this is normal XPG */
extern int __xpg4_accept(int, struct sockaddr *, size_t *);

So socklen_t should match those, but doesn't, leading to the compilation
failure observed.  This is a known bug (Bug Id 864477), to be fixed in the
upcoming 6.5.19, but not for 6.5.1[78].

I meant to fix the current definition via fixincludes to read like this:

/*
 * socklen_t type definition
 */
#ifndef _SOCKLEN_T
#define _SOCKLEN_T
#if _NO_XOPEN4 && _NO_XOPEN5
typedef int socklen_t;
#else
typedef size_t socklen_t;
#endif /* _NO_XOPEN4 && _NO_XOPEN5 */
#endif /*_SOCKLEN_T */

Unfortunately, I haven't found any time to do so.  I'll probably wait for
6.5.19 (to be released in a few days) to check their definition to make
sure I don't do anything incompatible for 6.5.1[78] and don't break 6.5.19
either.

	Rainer

Release:
3.2.2/3.3/3.4

Environment:
irix6.5.18m
Comment 1 Rainer Orth 2003-02-19 16:39:05 UTC
From: ro@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libgcj/9652
Date: 19 Feb 2003 16:39:05 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	ro@gcc.gnu.org	2003-02-19 16:39:05
 
 Modified files:
 	gcc            : ChangeLog 
 	gcc/config/mips: iris6.h 
 	gcc/fixinc     : inclhack.def fixincl.x 
 Added files:
 	gcc/fixinc/tests/base/sys: socket.h 
 	gcc/fixinc/tests/base/internal: sgimacros.h wchar_core.h 
 
 Log message:
 	* config/mips/iris6.h (TARGET_OS_CPP_BUILTINS): Define __c99 for
 	ISO C99 and C++.
 	
 	* fixinc/inclhack.def (irix___restrict): Don't change __restrict
 	for C++ on IRIX 6.5.1[89].
 	* fixinc/tests/base/internal/sgimacros.h: New file.
 	
 	* fixinc/inclhack.def (irix_wcsftime): Use XPG5 variant for C99.
 	* fixinc/tests/base/internal/wchar_core.h: New file.
 	
 	* fixinc/inclhack.def (irix_socklen_t): Fix broken IRIX 6.5.1[78]
 	socklen_t definition.
 	* fixinc/fixincl.x: Regenerate.
 	* fixinc/tests/base/sys/socket.h: New file.
 	Fixes PR libgcj/9652.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.16785&r2=1.16786
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/iris6.h.diff?cvsroot=gcc&r1=1.56&r2=1.57
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/inclhack.def.diff?cvsroot=gcc&r1=1.146&r2=1.147
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/fixincl.x.diff?cvsroot=gcc&r1=1.140&r2=1.141
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/tests/base/sys/socket.h.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/tests/base/internal/sgimacros.h.diff?cvsroot=gcc&r1=NONE&r2=1.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/tests/base/internal/wchar_core.h.diff?cvsroot=gcc&r1=NONE&r2=1.1
 

Comment 2 David Billinghurst 2003-02-24 01:41:20 UTC
From: billingd@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libgcj/9652
Date: 24 Feb 2003 01:41:20 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_2-branch
 Changes by:	billingd@gcc.gnu.org	2003-02-24 01:41:20
 
 Modified files:
 	gcc/fixinc     : inclhack.def fixincl.x 
 	gcc            : ChangeLog 
 Added files:
 	gcc/fixinc/tests/base/sys: socket.h 
 
 Log message:
 	2003-02-24  David Billinghurst <David.Billinghurst@riotinto.com>
 	
 	Fixes PR libgcj/9652.
 	Backport patch from mainline:
 	2003-02-12  Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
 	
 	* fixinc/inclhack.def (irix_socklen_t): Fix broken IRIX 6.5.1[78]
 	socklen_t definition.
 	* fixinc/fixincl.x: Regenerate.
 	* fixinc/tests/base/sys/socket.h: New file.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/inclhack.def.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.120.2.6.4.2&r2=1.120.2.6.4.3
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/fixincl.x.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.117.2.5.4.2&r2=1.117.2.5.4.3
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/tests/base/sys/socket.h.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=NONE&r2=1.1.6.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.13152.2.657.2.235&r2=1.13152.2.657.2.236
 
Comment 3 Rainer Orth 2003-02-24 19:08:08 UTC
From: ro@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libgcj/9652
Date: 24 Feb 2003 19:08:08 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Branch: 	gcc-3_3-branch
 Changes by:	ro@gcc.gnu.org	2003-02-24 19:08:07
 
 Modified files:
 	gcc            : ChangeLog 
 	gcc/fixinc     : inclhack.def fixincl.x 
 	gcc/config/mips: iris6.h 
 Added files:
 	gcc/fixinc/tests/base/sys: socket.h 
 	gcc/fixinc/tests/base/internal: sgimacros.h wchar_core.h 
 
 Log message:
 	* config/mips/iris6.h (TARGET_OS_CPP_BUILTINS): Define __c99 for
 	ISO C99 and C++.
 	
 	* fixinc/inclhack.def (irix___restrict): Don't change __restrict
 	for C++ on IRIX 6.5.1[89].
 	* fixinc/tests/base/internal/sgimacros.h: New file.
 	
 	* fixinc/inclhack.def (irix_wcsftime): Use XPG5 variant for C99.
 	* fixinc/tests/base/internal/wchar_core.h: New file.
 	
 	* fixinc/inclhack.def (irix_socklen_t): Fix broken IRIX 6.5.1[78]
 	socklen_t definition.
 	* fixinc/fixincl.x: Regenerate.
 	* fixinc/tests/base/sys/socket.h: New file.
 	Fixes PR libgcj/9652.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.223&r2=1.16114.2.224
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/inclhack.def.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.139.4.3&r2=1.139.4.4
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/fixincl.x.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.132.4.3&r2=1.132.4.4
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/tests/base/sys/socket.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.8.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/mips/iris6.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.54.8.1&r2=1.54.8.2
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/tests/base/internal/sgimacros.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fixinc/tests/base/internal/wchar_core.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.4.1
Comment 4 Rainer Orth 2003-02-24 19:08:59 UTC
Responsible-Changed-From-To: unassigned->ro
Responsible-Changed-Why: Mine.
Comment 5 Rainer Orth 2003-02-24 19:08:59 UTC
State-Changed-From-To: open->closed
State-Changed-Why: Fixed for 3.2.3, 3.3, 3.4:
    
    http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01365.html