Bug 24142 - Git checkout today (27th January 2019) - compilation fails at some rust-exp.c file + YACC
Summary: Git checkout today (27th January 2019) - compilation fails at some rust-exp.c...
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: HEAD
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2019-01-27 15:00 UTC by shevegen
Modified: 2019-01-28 07:39 UTC (History)
0 users

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description shevegen 2019-01-27 15:00:44 UTC
make[3]: Nothing to be done for 'install'.
make[3]: Leaving directory '/Depot/jjj/binutils-27.01.2019/BUILD/sim/testsuite'
make[2]: Leaving directory '/Depot/jjj/binutils-27.01.2019/BUILD/sim'
make[2]: Entering directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb'
CONFIG_HEADERS=config.h:config.in \
  CONFIG_COMMANDS="default depdir" \
  /bin/sh config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default commands
config.status: executing depdir commands
make[3]: Entering directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb'
make[4]: Entering directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb/build-gnulib'
make[5]: Entering directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb/build-gnulib'
make[6]: Entering directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb/build-gnulib/import'
make  all-recursive
make[7]: Entering directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb/build-gnulib/import'
make[8]: Entering directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb/build-gnulib/import'
make[8]: Nothing to be done for 'all-am'.
make[8]: Leaving directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb/build-gnulib/import'
make[7]: Leaving directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb/build-gnulib/import'
make[6]: Leaving directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb/build-gnulib/import'
make[5]: Leaving directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb/build-gnulib'
make[4]: Leaving directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb/build-gnulib'
make[3]: Leaving directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb'
  YACC   rust-exp.c
/Depot/jjj/binutils-27.01.2019/BUILD/gdb/../../gdb/rust-exp.y:28.1-7: error: POSIX Yacc does not support %expect [-Werror=yacc]
 %expect 1
make[2]: *** [Makefile:2469: rust-exp.c] Error 1
make[2]: Leaving directory '/Depot/jjj/binutils-27.01.2019/BUILD/gdb'
make[1]: *** [Makefile:10450: install-gdb] Error 2
make[1]: Leaving directory '/Depot/jjj/binutils-27.01.2019/BUILD'
make: *** [Makefile:2226: install] Error 2

Not sure if I did anything wrong here.

I tried to install it into my home account as superuser via the following configure script.

../configure --prefix=/root --enable-64-bit-bfd --enable-gold=no --enable-plugins --enable-shared --disable-nls --disable-werror

GCC version is 8.2.0 and the other tools should be quite up to date.

PS: Is this in any way related to the rust language? Anyway, I will try a git clone without
gdb; may be easier, but I report the above error line in regards to POSIX Yacc either way as it may perhaps be useful. Could also be related to elfutils, but I think it would be very helpful if, in any way, the error message or indicator message could be more verbose. Googling for this error right now led to only marginal results that did not help a lot (possibly also because only quite few people may be using git clone, compared to those who just use the latest stable binutils variants).

PSS: May also be helpful to show the git clone command for just checking out binutils but without gdb. 

I did:

git clone git://sourceware.org/git/binutils.git    

but I am no git expert so I have no idea if that just works; may be helpful to affirm that this works on the webpage for binutils mentioned above (well, this one https://www.gnu.org/software/binutils/ ).
Comment 1 Alan Modra 2019-01-28 07:39:10 UTC
> git clone git://sourceware.org/git/binutils.git

No, don't do that.  binutils.git is an old repository (that probably should be deleted to stop user confusion).

If you want to just build binutils from the proper binutils repository, binutils-gdb.git, configure with --disable-gdb --disable-sim --disable-readline --disable-libdecnumber.