Following is the relevant output from my make. gmake[3]: Entering directory `/usr/local/.src/gcc.obj/hppa64-hp-hpux11.11/libstdc++-v3/libsupc++' /bin/sh ../libtool --tag CXX --tag disable-shared --mode=compile /usr/local/src/gcc.obj/gcc/xgcc -shared-libgcc -B/usr/local/src/gcc.obj/gcc/ -nostdinc++ -L/usr/local/src/gcc.obj/hppa64-hp-hpux11.11/libstdc++-v3/src -L/usr/local/src/gcc.obj/hppa64-hp-hpux11.11/libstdc++-v3/src/.libs -B/usr/local/64bit/hppa64-hp-hpux11.11/bin/ -B/usr/local/64bit/hppa64-hp-hpux11.11/lib/ -isystem /usr/local/64bit/hppa64-hp-hpux11.11/include -isystem /usr/local/64bit/hppa64-hp-hpux11.11/sys-include -I/usr/local/src/gcc-4.0.2/libstdc++-v3/../gcc -I/usr/local/src/gcc.obj/hppa64-hp-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux11.11 -I/usr/local/src/gcc.obj/hppa64-hp-hpux11.11/libstdc++-v3/include -I/usr/local/src/gcc-4.0.2/libstdc++-v3/libsupc++ -Aa -D_INCLUDE__STDC_A1_SOURCE -O2 -g -mpa-risc-2-0 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c -o del_op.lo /usr/local/src/gcc-4.0.2/libstdc++-v3/libsupc++/del_op.cc /usr/local/src/gcc.obj/gcc/xgcc -shared-libgcc -B/usr/local/src/gcc.obj/gcc/ -nostdinc++ -L/usr/local/src/gcc.obj/hppa64-hp-hpux11.11/libstdc++-v3/src -L/usr/local/src/gcc.obj/hppa64-hp-hpux11.11/libstdc++-v3/src/.libs -B/usr/local/64bit/hppa64-hp-hpux11.11/bin/ -B/usr/local/64bit/hppa64-hp-hpux11.11/lib/ -isystem /usr/local/64bit/hppa64-hp-hpux11.11/include -isystem /usr/local/64bit/hppa64-hp-hpux11.11/sys-include -I/usr/local/src/gcc-4.0.2/libstdc++-v3/../gcc -I/usr/local/src/gcc.obj/hppa64-hp-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux11.11 -I/usr/local/src/gcc.obj/hppa64-hp-hpux11.11/libstdc++-v3/include -I/usr/local/src/gcc-4.0.2/libstdc++-v3/libsupc++ -Aa -D_INCLUDE__STDC_A1_SOURCE -O2 -g -mpa-risc-2-0 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c /usr/local/src/gcc-4.0.2/libstdc++-v3/libsupc++/del_op.cc -o del_op.o <command line>:1:2: error: missing '(' after predicate gmake[3]: *** [del_op.lo] Error 1 gmake[3]: Leaving directory `/usr/local/.src/gcc.obj/hppa64-hp-hpux11.11/libstdc++-v3/libsupc++'
I attempted to build 3.4.4 in the same way afterwards, and got exactly the same error.
How did you configure GCC? From using google it sounds like you configured GCC to use the GNU binutils but it is using the native toolchain instead.
The "-Aa" option is likely the problem. It's probably set in CFLAGS. If you're using the HP tools, put the "-Aa" in your CC define. There's more info in the manual on this.
Subject: Re: Failure to build, <command line>:1:2: error: missing '(' after predicate On Sun, Nov 27, 2005 at 06:57:05PM -0000, danglin at gcc dot gnu dot org wrote: > The "-Aa" option is likely the problem. It's probably set in > CFLAGS. If you're using the HP tools, put the "-Aa" in your CC > define. There's more info in the manual on this. No, I never put "-Aa" in CFLAGS, it's being added inside the gcc build itself. I tried your suggestion of adding "-Aa" to CC, but my build fails much earlier in that case, due to not finding a definition of "struct stat". Do you care to know more about that?
Subject: Re: Failure to build, <command line>:1:2: error: missing '(' after predicate On Fri, Nov 25, 2005 at 08:27:34PM -0000, pinskia at gcc dot gnu dot org wrote: > How did you configure GCC? > >From using google it sounds like you configured GCC to use the GNU binutils but > it is using the native toolchain instead. Not intentionally, but only a careful reading of the documentation reveals to me that PATH is used (non-intuitively in my view) for as and ld even when --with-gnu-as and --with-gnu-ld are given. Using GNU as and --with-ld=/usr/ccs/bin/ld does indeed give me the same error, but forcing GNU ld stops the build even sooner with: ... checking for g++ that supports -ffunction-sections -fdata-sections... yes checking for sin in -lm... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. gmake: *** [configure-target-libstdc++-v3] Error 1
Subject: Re: Failure to build, <command line>:1:2: error: missing '(' after predicate > On Sun, Nov 27, 2005 at 06:57:05PM -0000, danglin at gcc dot gnu dot org wrote: > > The "-Aa" option is likely the problem. It's probably set in > > CFLAGS. If you're using the HP tools, put the "-Aa" in your CC > > define. There's more info in the manual on this. > > No, I never put "-Aa" in CFLAGS, it's being added inside the gcc build > itself. I tried your suggestion of adding "-Aa" to CC, but my build > fails much earlier in that case, due to not finding a definition of > "struct stat". Do you care to know more about that? Ok, this is comming from the configure test "checking for $CC option to accept ANSI C". This option shouldn't be used for the libstdc++ build but obviously it is... In order to build GCC 3.4 and later, you need an ANSI compiler. You also need to include the full HP-UX namespace The "struct stat" error probably is a result of not providing the appropriate namespace defines in you CC define. -Aa provides strict ANSI. For example, these are the defines that I use for GCC builds prior to 4.0 under HP-UX 11.11: -D_HPUX_SOURCE -D_XOPEN_UNIX -D_XOPEN_SOURCE_EXTENDED -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE_XOPEN_SOURCE_500 -D_HPUX_SOURCE is the important define. The others are needed for C++ library support (wide characters, etc). Instead of trying to build C++ starting with an HP compiler, it's easier to just build C and then use this compiler to rebuild GCC with the additional languages that you want. It's always been tricky to bootstrap GCC using an HP compiler and its not tested much. You should use binutils (current CVS version is needed with GCC 4.1 and later for EH exception support). Dave
Subject: Re: Failure to build, <command line>:1:2: error: missing '(' after predicate On Tue, Nov 29, 2005 at 10:00:39PM -0000, dave at hiauly1 dot hia dot nrc dot ca wrote: > > ------- Comment #6 from dave at hiauly1 dot hia dot nrc dot ca 2005-11-29 22:00 ------- > Subject: Re: Failure to build, <command line>:1:2: error: missing '(' after > predicate > > > On Sun, Nov 27, 2005 at 06:57:05PM -0000, danglin at gcc dot gnu dot org wrote: > > > The "-Aa" option is likely the problem. It's probably set in > > > CFLAGS. If you're using the HP tools, put the "-Aa" in your CC > > > define. There's more info in the manual on this. > > > > No, I never put "-Aa" in CFLAGS, it's being added inside the gcc build > > itself. I tried your suggestion of adding "-Aa" to CC, but my build > > fails much earlier in that case, due to not finding a definition of > > "struct stat". Do you care to know more about that? > > Ok, this is comming from the configure test "checking for $CC option to > accept ANSI C". This option shouldn't be used for the libstdc++ build > but obviously it is... Thanks for your help, it turns out you were almost right the first time. Although I wasn't setting CFLAGS, I unwittingly had "-Aa" in my CXXFLAGS. Stopping that solved my problem. > In order to build GCC 3.4 and later, you need an ANSI compiler. You > also need to include the full HP-UX namespace The "struct stat" error > probably is a result of not providing the appropriate namespace defines > in you CC define. -Aa provides strict ANSI. For example, these are > the defines that I use for GCC builds prior to 4.0 under HP-UX 11.11: > > -D_HPUX_SOURCE -D_XOPEN_UNIX -D_XOPEN_SOURCE_EXTENDED > -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE_XOPEN_SOURCE_500 > > -D_HPUX_SOURCE is the important define. The others are needed for C++ > library support (wide characters, etc). I've mostly always used HP's ANSI compiler in the default -Ae mode, which includes -D_HPUX_SOURCE, however I discovered it also add +e, which allows `long long'. All 3.4 and 4.0 gcc's I tried had `long long' variables that required this. I found this odd, given that I was building 64-bit code. I'd say this is a bug -- would you agree? > Instead of trying to build C++ starting with an HP compiler, it's easier > to just build C and then use this compiler to rebuild GCC with the additional > languages that you want. It's always been tricky to bootstrap GCC using > an HP compiler and its not tested much. You should use binutils (current > CVS version is needed with GCC 4.1 and later for EH exception support). I can appreciate that, and was almost about to resort to C only, but my C++ is good now. Is binutils-2.16.1 fine for 4.0? I'll run the tests and find out for myself anyway. Thanks again.
This appears resolved.