[Bug libstdc++/25025] Failure to build, <command line>:1:2: error: missing '(' after predicate

dave at hiauly1 dot hia dot nrc dot ca gcc-bugzilla@gcc.gnu.org
Tue Nov 29 22:00:00 GMT 2005



------- 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...

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


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25025



More information about the Gcc-bugs mailing list