[Home]

Summary:ASTERISK-13785: [patch] A clean svn checkout needs bison to compile but configure does not check for it
Reporter:Michiel van Baak (mvanbaak)Labels:
Date Opened:2009-03-19 16:00:08Date Closed:2009-04-28 09:48:50
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/BuildSystem
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090320__bug14706.diff.txt
( 1) 2009032100_bug14706.diff.txt
Description:main/Makefile has a line to regenerate main/ast_expr2.c from the main/ast_expr2.y
Normally this would only happen when the .c file is older then the .y file.

While it might be so that both files have the same timestamp for the Digium devs that do checkouts over LAN, this is not true for people with normal DSL and/or Cable internet (and yes, there are even ppl with dialup 56kbps connections out there) and those checkouts will try to regenerate the .c file.
We can fix this in three ways:
1) Add bison to the configure script
AC_PATH_PROG([BISON], [bison], [])
if test -z "$BISON"; then
AC_MSG_ERROR([cannot find bison])
fi
2) rename the Makefile entry so it wont be run by default and people who edited the .y file have a Makefiletarget to regen the .c file
3) Fix the core issue by renaming the .y file so it's checkedout before the .c file.

Russell already said he did not want option 1 to go in because we 'do not depend on bison'


****** ADDITIONAL INFORMATION ******

I only tested trunk, but looking at the code I think all supported branches have this issue.
Comments:By: Tilghman Lesher (tilghman) 2009-03-20 18:37:37

Something like this, perhaps?

By: Michiel van Baak (mvanbaak) 2009-03-21 05:06:03

Works like a charm.

Makes me wonder why I did not think of this solution. Must be that you're smarter then me.

By: Michiel van Baak (mvanbaak) 2009-03-21 05:50:43

hhmm, more testing done.
If bison is not installed, the configure script will not error out but silently set the BISON path to ""
Compiling failes.

By: Michiel van Baak (mvanbaak) 2009-03-21 06:01:04

Updated patch that will actually bailout if bison is not installed.

By: Michiel van Baak (mvanbaak) 2009-04-28 09:48:50

Fixed differently by kpfleming in commits 190861 and 190861 in trunk.