ubuntubochs

Make fail on compiling bochs on ubuntu


My platform is Ubuntu 18.04, and bochs 2.6.9.

The compiling error message are as follow:

make[1]: Entering directory '/home/shore/MineOS/Source/bochs-2.6.9/bx_debug'
gcc -c -I.. -I./.. -I../instrument/stubs -I./../instrument/stubs -I. -I./. -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -pthread   parser.c -o 
parser.o
y.tab.c: In function ‘yyparse’:
y.tab.c:59:16: warning: implicit declaration of function ‘yylex’; did you mean ‘bxlex’? [-Wimplicit-function-declaration]
y.tab.c:1516:23: note: in expansion of macro ‘YYLEX’
y.tab.c:67:27: warning: implicit declaration of function ‘yyerror’; did you mean ‘yyerrok’? [-Wimplicit-function-declaration]
y.tab.c:1553:5: note: in expansion of macro ‘YYERROR_CALL’
y.tab.c: At top level:
parser.y:10:0: error: unterminated #if

Also my configuration is as follow

./configure --enable-plugins --enable-debugger --enable-disasm --enable-readline --enable-cpu-level=6 --enable-smp --enable-x86-64 --enable-avx --enable-a20-pin --enable-fast-function-calls --enable-all-optimizations --enable-x86-debugger --enable-alignment-check

I actually need debug so it is better to compile from source.

Thanks.


Solution

  • Well I tried and found that flex package was missing, so installed flex and problems solved.

    Hope it would help someone else.