Opened 4 years ago

Closed 4 years ago

#412 closed defect (fixed)

configure script does not check for bison being installed

Reported by: hholzgra Owned by: vliaukevich
Priority: major Milestone: 9.0.x
Component: undecided Version: 8.4
Keywords: Cc:
Complexity: Medium

Description

./configure ran successfully but make failed with:

make[2]: Entering directory `/home/vagrant/rasdaman/qlparser'
/bin/bash ../ylwrap lex.ll lex.yy.c lex.cc -- flex -i -I
/bin/bash ../ylwrap oql.yy y.tab.c oql.cc y.tab.h oql.h y.output oql.output -- bison -d -y
../ylwrap: line 113: bison: command not found
make[2]: * [oql.cc] Error 1

Change History (8)

comment:1 Changed 4 years ago by hholzgra

Turns out the AC_PROG_YACC check is there in configure.ac just fine, but it is commented out?

[...]
AC_PROG_AWK
#AC_PROG_YACC
AC_PROG_CC
[...]

comment:2 Changed 4 years ago by dmisev

  • Resolution set to fixed
  • Status changed from new to closed

comment:3 Changed 4 years ago by vliaukevich

  • Resolution fixed deleted
  • Status changed from closed to reopened

The line "AC_PROG_YACC" of configure.ac gives me
checking for bison... no
checking for byacc... no
and "AC_CHECK_PROGS(YACC, bison, [${am_missing_run} bison])" gives
checking for bison... yacc

But I'm sure that neither yacc or bison are present:
$ yacc
bash: /usr/bin/yacc: No such file or directory
$ bison
The program 'bison' can be found in the following packages:

  • bison
  • bison++

Try: sudo apt-get install <selected package>

comment:4 Changed 4 years ago by dmisev

  • Milestone set to 9.0

Veranika do you have an idea for a fix?

comment:5 Changed 4 years ago by vliaukevich

AC_PROG_YACC sets YACC=yacc, if neither bison nor byacc was found, without checking whether there is yacc at all. The only idea I have is to do this check manually like this:

AC_CHECK_PROGS(YACC, ['bison -y' byacc yacc], no)
if test "$YACC" = "no" ; then
   AC_MSG_ERROR([could not find bison, byacc or yacc. Please install.])
fi

comment:6 Changed 4 years ago by dmisev

  • Owner changed from dmisev to vliaukevich
  • Status changed from reopened to assigned

comment:7 Changed 4 years ago by vliaukevich

  • Status changed from assigned to accepted

I will add the proposed code snippet. Additionally I found that if byacc is installed, it is not used, as bison is hardcoded in our scripts. I will fix it as well.

comment:8 Changed 4 years ago by dmisev

  • Resolution set to fixed
  • Status changed from accepted to closed

Ok we can close this as patches were applied.

Note: See TracTickets for help on using tickets.