Summary: | binutils build fails if intl/plural.y is newer than intl/plural.c | ||
---|---|---|---|
Product: | binutils | Reporter: | Ryan Prichard <rprichard> |
Component: | binutils | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | egeyar, juro.bystricky, nickc, pjb, rprichard, wilson |
Priority: | P2 | ||
Version: | 2.31 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | 2018-03-09 00:00:00 |
Description
Ryan Prichard
2018-03-08 23:56:03 UTC
I just got the same bug report for a riscv* target. I can reproduce this failure for any target by forcing intl to build. Steps to reproduce: ../binutils-gdb/configure make configure-intl edit intl/Makefile to change "all: all-no" to "all: all-yes" touch ../binutils-gdb/intl/plural.y make all-intl I have bison 3.0.4. Hi Ryan,
> binutils already requires bison to build, so it seems sensible to fix this
> issue the same way that glibc was already fixed:
>
> rprichard@cashew:~/android/binutils-gdb$ for f in $(find . -name '*.y');
> do echo -- $f; find . -name $(basename ${f%.y}.c); done
> -- ./gold/yyscript.y
> -- ./intl/plural.y
> ./intl/plural.c
> ./out/intl/plural.c
Sorry - can you run this solution by me again ? How does it fix the timestamps ?
Cheers
Nick
There is no fix in the PR. The list of files is just showing that plural.c is the only bison output file in the git tree. The glibc solution is to drop the generated file from the git tree, and always generate it at build time. The gcc solution is to add a script that touches every generated file after checkout to fix the timestamps. This is contrib/gcc_update. The gcc solution could work for binutils, provided that no one ever needs to build the intl dir. The glibc solution will not work unless we update the intl dir. It looks like we have a 15 year old copy of the intl package, which is why it no longer works with current bison versions. Note the 2003 import message in the ChangeLog file. The glibc plural.y file has a 2018 copyright, the binutils copy of the file has a 2001 copyright. So the fix here is to update intl to a recent version. > The glibc plural.y file has a 2018 copyright,
That doesn't say much, it is routinely updated every year. The last merge from upstream was commit 6d24885784 ("intl: Merge with gettext version 0.19.3"), from 2014.
*** Bug 24029 has been marked as a duplicate of this bug. *** This is the same bug as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92008 and a patch has been added to fix that bug. Merging that patch into the binutils git tree should fix this bug. There is also a config/gettext.m4 hunk that hasn't been committed yet, and might not be until after the gcc 10 branch is made. I don't know if that part is required to complete the fix; I haven't checked. I believe this has been fixed |