kraft icon indicating copy to clipboard operation
kraft copied to clipboard

Kraft "configure" command fails on Fedora Linux as the default yacc is Berkley Yacc not GNU Bison

Open skyhisi opened this issue 3 years ago • 0 comments

Describe the bug When kraft configure is run for the first time it builds kconfig, this uses the default system yacc which on Fedora 33 is Berkley Yacc not GNU Bison, but passes the Bison specific option -W.

[INFO    ] make: Entering directory '/home/silas/.unikraft/unikraft'
[INFO    ] mkdir -p /home/silas/Documents/programs/testing/unikraft/helloworld/build/kconfig/lxdialog
[INFO    ] make --no-print-directory CC="/usr/lib64/ccache/gcc" HOSTCC="/usr/lib64/ccache/gcc" \
[INFO    ] obj=/home/silas/Documents/programs/testing/unikraft/helloworld/build/kconfig -C /home/silas/.unikraft/unikraft/support/kconfig -f Makefile.br /home/silas/Documents/programs/testing/unikraft/helloworld/build/kconfig/conf
yacc: invalid option -- 'W'
Usage: yacc [options] filename

Options:
  -b file_prefix        set filename prefix (default "y.")
  -B                    create a backtracking parser
  -d                    write definitions (.tab.h)
  -H defines_file       write definitions to defines_file
  -i                    write interface (y.tab.i)
  -g                    write a graphical description
  -l                    suppress #line directives
  -L                    enable position processing, e.g., "%locations"
  -o output_file        (default ".tab.c")
  -p symbol_prefix      set symbol prefix (default "yy")
  -P                    create a reentrant parser, e.g., "%pure-parser"
  -r                    produce separate code and table files (y.code.c)
  -s                    suppress #define's for quoted names in %token lines
  -t                    add debugging support
  -v                    write description (y.output)
  -V                    show version information and exit
make[3]: *** [Makefile.rules:84: /home/silas/Documents/programs/testing/unikraft/helloworld/build/kconfig/parser.tab.h] Error 1
make[2]: *** [/home/silas/Documents/programs/testing/unikraft/helloworld/build/Makefile:695: /home/silas/Documents/programs/testing/unikraft/helloworld/build/kconfig/conf] Error 2
make[1]: *** [Makefile:919: sub-make] Error 2
make: *** [Makefile:32: _all] Error 2
[INFO    ] make: Leaving directory '/home/silas/.unikraft/unikraft'
[ERROR   ] Command 'make -C /home/silas/.unikraft/unikraft A=/home/silas/Documents/programs/testing/unikraft/helloworld P= L= UK_DEFCONFIG=/tmp/tmplv6mlq9s defconfig' returned 2

Work around Install bison package (sudo dnf install bison), then manually run the failing make command and override the use of yacc by passing YACC=bison, e.g:

make --no-print-directory YACC=/usr/bin/bison CC="/usr/lib64/ccache/gcc" HOSTCC="/usr/lib64/ccache/gcc" obj=/home/silas/Documents/programs/testing/unikraft/helloworld/build/kconfig -C /home/silas/.unikraft/unikraft/support/kconfig -f Makefile.br /home/silas/Documents/programs/testing/unikraft/helloworld/build/kconfig/conf

Desktop:

  • OS: Fedora 33

skyhisi avatar Dec 14 '20 22:12 skyhisi