This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Bootstrap failure building libjava on sparc-solaris2 caused by fix-header
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: gcc-bugs at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Cc: neil at daikokuya dot co dot uk
- Date: Sat, 29 Mar 2003 12:16:17 -0500 (EST)
- Subject: Bootstrap failure building libjava on sparc-solaris2 caused by fix-header
For about the last two weeks, within 24 hours after this report:
http://gcc.gnu.org/ml/gcc-testresults/2003-03/msg00855.html
I started getting bootstrap failures on sparc-sun-solaris2.7 when
building libjava:
> In file included from .../libjava/prims.cc:18:
> .../build/gcc/include/signal.h:241: error: declaration
> of C function `int kill(long int, int)' conflicts with
> .../build/gcc/include/signal.h:52: error: previous
> declaration `int kill(int, int)' here
> make[5]: *** [prims.lo] Error 1
Today I traced this to a problem with fix-header. It's gratuitously
introducing prototypes in system headers for stuff that the OS already
provides. In the case of the `kill' prototype, it gets it wrong so we
get the conflict and failure.
I did a diff of the 3.3 vs. 3.4 fixed include directories, and wrong
diffs occur in these files shown from the build log:
> fix-header: fixing stdlib.h
> fix-header: fixing signal.h
> fix-header: fixing time.h
Normally the above files don't get "fixed" on solaris2.7.
The erroneous 3.3 to 3.4 diffs are:
stdlib.h:
+#if defined(__USE_FIXED_PROTOTYPES__) || defined(__cplusplus) || defined (__STRICT_ANSI__)
+extern int putenv (char *);
+#endif /* defined(__USE_FIXED_PROTOTYPES__) || ... */
signal.h:
+#if defined(__USE_FIXED_PROTOTYPES__) || defined(__cplusplus) || defined (__STRICT_ANSI__)
+extern int kill (long, int);
+#endif /* defined(__USE_FIXED_PROTOTYPES__) || ... */
time.h:
+#if defined(__USE_FIXED_PROTOTYPES__) || defined(__cplusplus) || defined (__STRICT_ANSI__)
+extern void tzset (void);
+#endif /* defined(__USE_FIXED_PROTOTYPES__) || ... */
I haven't tracked down the exact problematic patch, but some work
was done on 3/15 to fix-header.c by Neil which may be the cause.
Neil - can you offer some assistance with this problem?
Thanks,
--Kaveh
--
Kaveh R. Ghazi ghazi at caip dot rutgers dot edu