build failure of gold (trunk)

Ian Lance Taylor iant@google.com
Fri Mar 4 18:44:00 GMT 2011


Gabriel Dos Reis <gdr@cs.tamu.edu> writes:

> A fresh check out of CVS gold fails to build with the following error:
>
> In file included from
> /home/gdr/src/sourceware/src/gold/expression.cc:33:0:
> /home/gdr/src/sourceware/src/gold/script-c.h:221:7: error: ‘yylex’ initialized and declared ‘extern’
> /home/gdr/src/sourceware/src/gold/script-c.h:221:7: error: ‘YYSTYPE’ was not declared in this scope
> /home/gdr/src/sourceware/src/gold/script-c.h:221:15: error: expected primary-expression before ‘,’ token
> /home/gdr/src/sourceware/src/gold/script-c.h:221:17: error: expected primary-expression before ‘void’
> /home/gdr/src/sourceware/src/gold/script-c.h:221:30: error: initializer expression list treated as compound expression
>
>
> this is with GCC-4.5.0.

What version of bison do you have installed on your system?

It looks like YYSTYPE is not defined in the generated file yyscript.h.
That file is generated by bison.  The definition should look like

typedef union YYSTYPE
{
  ...
} YYSTYPE;

Ian



More information about the Binutils mailing list