Bug 18200 - Failure trying to compile gold with latest released tarball (2.25)
Summary: Failure trying to compile gold with latest released tarball (2.25)
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.25
: P2 normal
Target Milestone: ---
Assignee: Cary Coutant
Depends on:
Reported: 2015-04-04 17:03 IST by Javier Jardón
Modified: 2015-06-05 06:01 IST (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Javier Jardón 2015-04-04 17:03:22 IST
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 IST
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 cvs-commit@gcc.gnu.org 2015-06-05 05:59:39 IST
The master branch has been updated by Cary Coutant <ccoutant@sourceware.org>:


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

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