Bug #294
closedmissing dependency checks in ./configure
100%
Description
./configure dose not check for bison (yacc) and flex
Updated by Pierre-Louis Bonicoli about 12 years ago
- Subject changed from missing dependcy checks in ./configure to missing dependency checks in ./configure
- Status changed from New to In Progress
When yacc
/bison
is not available, make
build step fails:
$ make test -f src/conf.c || /bin/bash ./ylwrap src/conf.y y.tab.c src/conf.c y.tab.h src/conf.h y.output src/conf.output -- yacc -d ./ylwrap: line 113: yacc: command not found make: *** [src/conf.c] Error 1
When lex/flex
is not available, make
build step fails:
$ make test -f src/lex.c || /bin/bash ./ylwrap src/lex.l .c src/lex.c -- /bin/bash /home/pilou/bip/missing --run flex /home/pilou/bip/missing: line 52: flex: command not found WARNING: `flex' is missing on your system. You should only need it if you modified a `.l' file. You may need the `Flex' package in order for those modifications to take effect. You can get `Flex' from any GNU archive site. make: *** [src/lex.c] Error 1
Is there a particular reason/problem for preferring a fail during the configure
step instead of a fail during the make step
?
According to Autoconf behavior and documentation:
- by default when
bison
orbyacc
is not found, the macroAC_PROG_YACC
set variableYACC
to "yacc
": soyacc
is considered as always available - by default when
lex
orflex
are is found, the macroAC_PROG_LEX
set variableLEX
to ":
"
Is inclusion in the bip release tarballs of the files src/conf.h
, src/conf.c
and src/lex.c
generated by bison
and flex
an acceptable solution?
Updated by Jan-Philipp Warmers almost 12 years ago
The configure script should ensure integrity and completeness of the build environment
Updated by Marc Dequènes about 11 years ago
- Assignee set to Marc Dequènes
- Priority changed from Low to High
- Target version set to 0.8.9
Updated by Marc Dequènes about 11 years ago
- Priority changed from High to Low
In fact postponing the error is an intended behavior according to autoconf. Yacc and Lex are optional dependencies, as most software authors publish pre-generated files, and as long as you don't modify them you're not gonna need these tools. Even if we do not publish pre-generated files, i think it's better to keep with this behavior.
Nevertheless, the YACC macro falls back to "yacc" even if it is not present, thus a workaround to use the "missing" mechanism when appropriate is needed.
Updated by Marc Dequènes about 11 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset 1c3ef1d360c2db1902f5f04415192c123ba4c378.
Updated by Marc Dequènes about 11 years ago
well, in fact releases are now made using script/bip-release which uses distcheck which embed everything needed, so no need for yacc and flex except if you need to refresh them.