Bug 6742 - Ungraceful build error if bison or yacc is not available when building ld from CVS
Summary: Ungraceful build error if bison or yacc is not available when building ld fro...
Status: RESOLVED OBSOLETE
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.18
: P2 enhancement
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-13 09:29 UTC by Joe Ren
Modified: 2022-07-21 23:55 UTC (History)
2 users (show)

See Also:
Host:
Target: i686-pc-cygwin
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Ren 2008-07-13 09:29:41 UTC
I have tried to build a binutils for target cygwin by both native build under
Windows XP and cross build under Ubuntu 8.04. The problem is if the yacc parser
is not installed, the build of LD will fail because the ld/deffilep.y file can
not be parsed.

This takes me time to find out the problem because the error is something like
"main is duplicated" and provide no information of the yacc.

Suggestion is to detect the existence of yacc if target is cygwin while running
the configure script.
Comment 1 Alan Modra 2008-08-15 05:32:52 UTC
Were you building from a release tarball, a snapshot, or cvs?  If from a proper
release you should have deffilep.c and deffilep.h so yacc is not needed. 
Otherwise, yes, you do need yacc available.
Comment 2 Hans-Peter Nilsson 2012-05-12 09:52:03 UTC
Apparently a misdiagnosed generic error (not cygwin-specific), as was reported *with a quote from the build log* in <http://sourceware.org/ml/binutils/2012-05/msg00151.html>.  It took us a long time to diagnose this because this bug report only was something like "main is duplicated" and provided no information of the log. :]
The error now (first) happening for a different file is likely due to changes since 2008.
Comment 3 Alan Modra 2022-07-21 23:55:52 UTC
Missing bison/flex is diagnosed.