rmind/npf

Build fails on Ubuntu 18.04

archit-p opened this issue · 1 comments

When running make deb on Ubuntu 18.04, I get the following error. I believe, the "npf_parse.h" is auto-generated by yacc.

lex -o npf_scan.c npf_scan.l
cc -g -O2 -fdebug-prefix-map=/home/student/sources/npf/pkg=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu99 -O2 -g -Wall -Wextra -Werror -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE -D_DEFAULT_SOURCE -I. -D__RCSID\(x\)= -D__dead= -D__printflike\(x,y\)= -Wno-unused-local-typedefs -Wno-unused-result -Wno-unknown-warning-option  -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wmissing-declarations  -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -Wold-style-definition -DNDEBUG -Dgetprogname\(\)=\"npfctl\" -Wno-sign-compare -c npf_scan.c -o npf_scan.o
npf_scan.l:36:10: fatal error: npf_parse.h: No such file or directory
 #include "npf_parse.h"
          ^~~~~~~~~~~~~
compilation terminated.
Makefile:74: recipe for target 'npf_scan.o' failed
make[3]: *** [npf_scan.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/student/sources/npf/pkg/SOURCES/npfctl'
dh_auto_build: cd SOURCES && make -j8 -C npfctl returned exit code 2
debian/rules:27: recipe for target 'override_dh_auto_install' failed
make[2]: *** [override_dh_auto_install] Error 2
make[2]: Leaving directory '/home/student/sources/npf/pkg'
debian/rules:16: recipe for target 'binary' failed
make[1]: *** [binary] Error 2
make[1]: Leaving directory '/home/student/sources/npf/pkg'
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
Makefile:18: recipe for target 'deb' failed
make: *** [deb] Error 2

Some context to help with debugging, output from yacc --version.

bison (GNU Bison) 3.0.4
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Output from flex --version:

flex 2.6.4

The issue was fixed by removing bison.

For future reference:

sudo apt remove bison
sudo apt install byacc

fixed the issue.