在 ubuntu 上编译 bochs 失败

Make fail on compiling bochs on ubuntu

我的平台是Ubuntu18.04,bochs 2.6.9.

编译报错信息如下:

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

另外我的配置如下

./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

我实际上需要调试所以最好从源代码编译。

谢谢。

好吧,我试了一下,发现缺少flex包,所以安装了flex,问题解决了。

希望对其他人有所帮助。