Bug 18200

Summary: Failure trying to compile gold with latest released tarball (2.25)
Product: binutils Reporter: Javier Jardón <jjardon>
Component: goldAssignee: Cary Coutant <ccoutant>
Status: RESOLVED FIXED    
Severity: normal CC: ian, ratmice
Priority: P2    
Version: 2.25   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Javier Jardón 2015-04-04 17:03:22 UTC
Trying to compile 2.25 with the configuration options:

./configure --prefix=/usr --disable-nls --disable-werror --with-system-zlib --enable-gold

The build fail with this error:

/bin/sh ./../ylwrap yyscript.y y.tab.c yyscript.c y.tab.h yyscript.h y.output yyscript.output -- /binutils.build/missing bison -y  -d
WARNING: `bison' missing on your system.  You should only need it if
         you modified a `.y' file.  You may need the `Bison' package
         in order for those modifications to take effect.  You can get
         `Bison' from any GNU archive site.
updating yyscript.h
g++ -DHAVE_CONFIG_H -I.  -I. -I./../include -I./../elfcpp -DLOCALEDIR="\"/usr/share/locale\"" -DBINDIR="\"/usr/bin\"" -DTOOLBINDIR="\"/usr/x86_64-unknown-linux-gnu/bin\"" -DTOOLLIBDIR="\"/usr/x86_64-unknown-linux-gnu/lib\""   -W -Wall    -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=expression.o -g -O2 -MT expression.o -MD -MP -MF .deps/expression.Tpo -c -o expression.o expression.cc
In file included from expression.cc:33:0:
script-c.h:221:7: warning: 'yylex' initialized and declared 'extern'
 yylex(YYSTYPE*, void* closure);
       ^
script-c.h:221:7: error: 'YYSTYPE' was not declared in this scope
script-c.h:221:15: error: expected primary-expression before ',' token
 yylex(YYSTYPE*, void* closure);
               ^
script-c.h:221:17: error: expected primary-expression before 'void'
 yylex(YYSTYPE*, void* closure);
                 ^
script-c.h:221:30: error: expression list treated as compound expression in initializer [-fpermissive]
 yylex(YYSTYPE*, void* closure);
                              ^
Makefile:842: recipe for target 'expression.o' failed
make[4]: *** [expression.o] Error 1

Seems I need bison/flex in my system, but this doesnt seem rigth as:

- Im building from a released tarball
- configure passes correctly
Comment 1 matt rice 2015-04-04 18:58:13 UTC
It looks to me like gold/Makefile.am is missing the

diststuff: info $(EXTRA_DIST)

target that other subdirectories have,
though I don't think info is necessary for gold.
Comment 2 Sourceware Commits 2015-06-05 05:59:39 UTC
The master branch has been updated by Cary Coutant <ccoutant@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bdd2d2b7e6fbe90a07bd631cb599266fc6e12b5e

commit bdd2d2b7e6fbe90a07bd631cb599266fc6e12b5e
Author: Cary Coutant <ccoutant@gmail.com>
Date:   Thu Jun 4 22:58:39 2015 -0700

    Add diststuff target to Makefile.
    
    gold/
    	PR gold/18200
    	* Makefile.am (diststuff): Add target.
    	* Makefile.in: Regenerate.
Comment 3 Cary Coutant 2015-06-05 06:01:02 UTC
I've added a diststuff target to the gold Makefile on trunk.