我正在尝试在我的 MacOS 上安装 XV6。这些是我遵循的步骤:
brew install qemu
brew tap nativeos/i386-elf-toolchain
brew install nativeos/i386-elf-toolchain/i386-elf-binutils
brew install nativeos/i386-elf-toolchain/i386-elf-gcc
克隆 xv6-public 存储库后,我将 Makefile 更改为 https://github.com/ashr123/XV6-MacOS-Makefile/tree/master
中给出的文件现在我从 xv6-public 目录运行
make qemu clean
。
我收到此错误:
i386-elf-gcc -fno-pic -std=gnu17 -static -fno-builtin -fno-strict-aliasing -O2 -Wall -MD -ggdb -m32 -march=i686 -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie -no-pie -c -o sh.o sh.c
sh.c: In function 'runcmd':
sh.c:58:1: error: infinite recursion detected [-Werror=infinite-recursion]
58 | runcmd(struct cmd *cmd)
| ^~~~~~
sh.c:89:5: note: recursive call
89 | runcmd(rcmd->cmd);
| ^~~~~~~~~~~~~~~~~
sh.c:109:7: note: recursive call
109 | runcmd(pcmd->left);
| ^~~~~~~~~~~~~~~~~~
sh.c:116:7: note: recursive call
116 | runcmd(pcmd->right);
| ^~~~~~~~~~~~~~~~~~~
sh.c:95:7: note: recursive call
95 | runcmd(lcmd->left);
| ^~~~~~~~~~~~~~~~~~
sh.c:97:5: note: recursive call
97 | runcmd(lcmd->right);
| ^~~~~~~~~~~~~~~~~~~
sh.c:127:7: note: recursive call
127 | runcmd(bcmd->cmd);
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [sh.o] Error 1
我不明白出了什么问题。 感谢所有帮助。预先感谢。
您应该使用 xv6-riscv - https://github.com/mit-pdos/xv6-riscv.git 代替。
正如 REAMDE 提到的,xv6-public 已经不再维护了。