Project

General

Profile

Actions

Bug #294

closed

missing dependency checks in ./configure

Added by Jan-Philipp Warmers over 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Low
Target version:
Start date:
2012-03-30
Due date:
% Done:

100%

Estimated time:
1:00 h
Patch Available:
No
Found in Versions:
Confirmed:
No
Branch:
Security:
No
Help Needed:
No

Description

./configure dose not check for bison (yacc) and flex

Actions #1

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 or byacc is not found, the macro AC_PROG_YACC set variable YACC to "yacc": so yacc is considered as always available
  • by default when lex or flex are is found, the macro AC_PROG_LEX set variable LEX 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?

Actions #2

Updated by Jan-Philipp Warmers almost 12 years ago

The configure script should ensure integrity and completeness of the build environment

Actions #3

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
Actions #4

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.

Actions #5

Updated by Marc Dequènes about 11 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
Actions #6

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.

Actions

Also available in: Atom PDF