Recently I upgraded gcc from 3.3.2(really outdated!) to 3.4.6 on HPUX 11.23 June 2006 update. This build on both ia64 and pa-risc machines. This gcc is built on HPUX 11.23 by using the native ANSI C compiler. # what /opt/ansic/bin/cc /opt/ansic/bin/cc: HP aC++/C for Integrity Servers B3910B A.06.10 [Mar 22 2006] The configure options for gcc are #env PATH=$/usr/local/bin:/opt/OCEK/bin:$PATH CC="/opt/ansic/bin/cc" ../configure --prefix=/opt/OCEK --with-gnu-as --with-as=/opt/OCEK/bin/as --without-gnu-ld --enable-shared=yes --enable-static=yes --enable-threads=posix --enable-languages=c,c++,objc --enable-libstdcxx-v3 --enable-version-specific-runtime-libs #gmake bootstrap #gmake install The compilation is successful and the gcc binaries are available to me on both pa and ia64. But when I try to compile gnustep(versions 1.6.0/1.12.0/1.13.0)with this gcc it fails. The log is available below On PA-risc gmake[1]: Entering directory `/USERSPACE/ocek/gnustep-base/gnustep-base-1.6.0/Source' Making all in subprojects of library libgnustep-base... gmake[2]: Entering directory `/USERSPACE/ocek/gnustep-base/gnustep-base-1.6.0/Source/Additions' Making all for subproject Additions... Compiling file GSObjCRuntime.m ... GSObjCRuntime.m: In function `GSObjCFindVariable': GSObjCRuntime.m:73: warning: dereferencing type-punned pointer will break strict-aliasing rules GSObjCRuntime.m: At top level: GSObjCRuntime.m:636: error: conflicting types for '__objc_exec_class' GSObjCRuntime.m:300: error: previous declaration of '__objc_exec_class' was here gmake[3]: *** [shared_obj/hppa/hpux11.23/gnu-gnu-gnu/GSObjCRuntime.o] Error 1 gmake[2]: *** [Additions.all.subproject.variables] Error 2 gmake[2]: Leaving directory `/USERSPACE/ocek/gnustep-base/gnustep-base-1.6.0/Source/Additions' gmake[1]: *** [libgnustep-base.all.library.variables] Error 2 gmake[1]: Leaving directory `/USERSPACE/ocek/gnustep-base/gnustep-base-1.6.0/Source' gmake: *** [internal-all] Error 2 On HPUX 11.23 ia64 the build fails as follows Making all in subprojects of library libgnustep-base... gmake[2]: Entering directory `/USERSPACE/ocek/gnustep-base/gnustep-base-1.13.0/Source/Additions' Making all for subproject Additions... Compiling file GSCategories.m ... In file included from /usr/include/sys/stdpad.h:23, from /usr/include/sys/sigevent.h:45, from /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/sys/time.h:37, from /usr/include/sys/resource.h:50, from /usr/include/sys/wait.h:100, from /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/stdlib.h:399, from ../../Headers/Additions/GNUstepBase/preface.h:28, from ../../Headers/Foundation/NSObject.h:160, from ../../Headers/Foundation/NSDebug.h:31, from ../../Headers/Foundation/Foundation.h:32, from GSCategories.m:27: /usr/include/machine/sys/_types.h:65: error: parse error before "__fpreg" /usr/include/machine/sys/_types.h:69: error: parse error before '}' token In file included from /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/sys/newsig.h:87, from /usr/include/sys/signal.h:43, from /usr/include/sys/wait.h:141, from /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/stdlib.h:399, from ../../Headers/Additions/GNUstepBase/preface.h:28, from ../../Headers/Foundation/NSObject.h:160, from ../../Headers/Foundation/NSDebug.h:31, from ../../Headers/Foundation/Foundation.h:32, from GSCategories.m:27: /usr/include/machine/sys/newsig.h:47: error: parse error before "__opaque128_t" /usr/include/machine/sys/newsig.h:52: error: parse error before "mcontext_t" /usr/include/machine/sys/newsig.h:145: error: parse error before "mcontext_t" In file included from /usr/include/machine/sys/signal.h:59, from /usr/include/sys/signal.h:547, from /usr/include/sys/wait.h:141, from /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/stdlib.h:399, from ../../Headers/Additions/GNUstepBase/preface.h:28, from ../../Headers/Foundation/NSObject.h:160, from ../../Headers/Foundation/NSDebug.h:31, from ../../Headers/Foundation/Foundation.h:32, from GSCategories.m:27: /usr/include/machine/sys/sigcontext.h:43: error: field `__uc' has incomplete type In file included from ../../Headers/Additions/GNUstepBase/preface.h:28, from ../../Headers/Foundation/NSObject.h:160, from ../../Headers/Foundation/NSDebug.h:31, from ../../Headers/Foundation/Foundation.h:32, from GSCategories.m:27: /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/stdlib.h:573: error: parse error before "int" /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/stdlib.h:574: error: parse error before "int" /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/stdlib.h:614: error: parse error before "int" /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/stdlib.h:615: error: parse error before "int" In file included from ../../Headers/Foundation/Foundation.h:39, from GSCategories.m:27: ../../Headers/Foundation/NSBundle.h:578:1: warning: "__" redefined In file included from /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/string.h:15, from GSCategories.m:26: /opt/OCEK/lib/gcc/ia64-hp-hpux11.23/3.4.0/include/sys/stdsyms.h:398:1: warning: this is the location of the previous definition In file included from ../../Headers/Foundation/NSException.h:35, from ../../Headers/Foundation/NSClassDescription.h:29, from ../../Headers/Foundation/Foundation.h:43, from GSCategories.m:27: /usr/include/setjmp.h:22: error: parse error before "jmp_buf" /usr/include/setjmp.h:39: error: parse error before "sigjmp_buf" /usr/include/setjmp.h:53: error: parse error before "int" /usr/include/setjmp.h:67: error: parse error before "int" /usr/include/setjmp.h:80: error: parse error before "int" /usr/include/setjmp.h:81: error: parse error before "int" In file included from ../../Headers/Foundation/NSClassDescription.h:29, from ../../Headers/Foundation/Foundation.h:43, from GSCategories.m:27: ../../Headers/Foundation/NSException.h:193: error: parse error before "jmp_buf" ../../Headers/Foundation/NSException.h:193: warning: no semicolon at end of struct or union ../../Headers/Foundation/NSException.h:196: error: parse error before '}' token ../../Headers/Foundation/NSException.h:196: warning: type defaults to `int' in declaration of `NSHandler' ../../Headers/Foundation/NSException.h:196: warning: data definition has no type or storage class ../../Headers/Foundation/NSException.h:275: error: parse error before '*' token ../../Headers/Foundation/NSException.h:277: error: parse error before '*' token In file included from ../../Headers/Foundation/Foundation.h:97, from GSCategories.m:27: ../../Headers/Foundation/NSThread.h:41: error: parse error before "NSHandler" GSCategories.m: In function `-[NSData(GSCategories) initWithHexadecimalRepresentation:]': GSCategories.m:308: warning: subscript has type `char' gmake[3]: *** [shared_obj/GSCategories.o] Error 1 gmake[2]: *** [Additions.all.subproject.variables] Error 2 gmake[2]: Leaving directory `/USERSPACE/ocek/gnustep-base/gnustep-base-1.13.0/Source/Additions' gmake[1]: *** [libgnustep-base.all.library.variables] Error 2 gmake[1]: Leaving directory `/USERSPACE/ocek/gnustep-base/gnustep-base-1.13.0/Source' gmake: *** [internal-all] Error 2 The same build is successful on HPUX 11.11. The build goes through with gcc 3.3.x line on 11.23 both pa and ipf. I am not sure if this is incompatible on gcc side or gnustep. Kindly help.
Why do you think this is a GCC bug and not a GNUStep bug?
Can you attach the preprocessed source?
(In reply to comment #2) > Can you attach the preprocessed source? > hello there, sorry for the late reply. After I added the following patch to gcc-3.4.6/gcc/config/ia64/hpux.h I could get rid of the error in the gnustep-base build on the ia64 machine. diff -rupN gcc-3.4.6.orig/gcc/config/ia64/hpux.h gcc-3.4.6/gcc/config/ia64/hpux.h --- gcc-3.4.6.orig/gcc/config/ia64/hpux.h 2006-10-23 12:57:31.000000000 +0530 +++ gcc-3.4.6/gcc/config/ia64/hpux.h 2006-10-23 12:57:31.000000000 +0530 @@ -40,6 +40,9 @@ do { \ builtin_define("__IA64__"); \ builtin_define("_LONGLONG"); \ builtin_define("_INCLUDE_LONGLONG"); \ + builtin_define("__fpreg=long double"); \ + builtin_define("__float80=long double"); \ + builtin_define("__float128=long double"); \ builtin_define("_UINT128_T"); \ if (c_dialect_cxx () || !flag_iso) \ { \ These declarations were present in the earlier gcc (3.3.2). Please include these declarations in the next release of gcc.
(In reply to comment #3) > These declarations were present in the earlier gcc (3.3.2). > Please include these declarations in the next release of gcc. First this patch is wrong. Second the problem in 3.4.x is that LANG_HOOKS_REGISTER_BUILTIN_TYPE was not being declared for the objective-C front-end which caused those types to not be declared. Third this was fixed in 4.0.0 by: 2004-08-15 Ziemowit Laski <zlaski@apple.com> Since this was a regression only in 3.4.6 and 3.4.x is no longer being updated, closing as fixed for 4.0.0.
thanks for this input. I would not be able to move to 4 line immediately. Can you tell me how to make this declaration in 3.4.6 so that I can create a patch for my own use.