一、ubuntu环境配置时遇到的问题
配置环境的这一步:
$ sudo apt-get install libc6:i386 libgcc1:i386 gcc-4.6-base:i386 libstdc++5:i386 libstdc++6:i386
遇到的问题:
E: Unable to locate package gcc-4.6-base:i386
E: Couldn't find any package by glob 'gcc-4.6-base'
E: Couldn't find any package by regex 'gcc-4.6-base'
我是在云服务器上操作的,使用阿里云的sources.list软件源,参考这篇博客
https://blog.csdn.net/qq_46015650/article/details/121567601
二、运行pintos时遇到的问题
在这一步时:
$ ../../utils/pintos -- run alarm-multiple
出现了以下问题:
Unrecognized character \x16; marked by <-- HERE after if ($<-- HERE near column 7 at ../../utils/pintos line 911.
原因:下载了旧版本的pintos
解决:到git公共库里重新下个新的(tree-snapshot)
三、编译utils时遇到的问题
在这一步时:
$ cd maker/pintos/src/utils
$ vim Makefile *//Modify the 5th line: LDFLAGS -> LDLIBS*
$ make
出现的问题:
gcc -Wall -W -c -o setitimer-helper.o setitimer-helper.c
gcc setitimer-helper.o -o setitimer-helper
setitimer-helper.o: In function 'main':
setitimer-helper.c:(.text+0xcb): undefined reference to 'floor'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'setitimer-helper' failed
make: *** [setitimer-helper] Error 1
Makefile文件打开之后进入编辑,将第三行LDFLAGS改成LDLIBS,然后再执行make,参考这一篇
http://hk.voidcc.com/question/p-hsdjgrmm-ve.html