在我的 MAC 操作系统上安装 XV6 时遇到问题

问题描述 投票:0回答:1

我正在尝试在我的 MacOS 上安装 XV6。这些是我遵循的步骤:

  1. https://github.com/mit-pdos/xv6-public
  2. 下载xv6
  3. 使用
    brew install qemu
  4. 安装了 qemu
  5. https://github.com/nativeos/homebrew-i386-elf-toolchain 安装了 i386-elf 工具链。使用这些命令:
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

我不明白出了什么问题。 感谢所有帮助。预先感谢。

macos makefile xv6
1个回答
0
投票

您应该使用 xv6-riscv - https://github.com/mit-pdos/xv6-riscv.git 代替。

正如 REAMDE 提到的,xv6-public 已经不再维护了。

© www.soinside.com 2019 - 2024. All rights reserved.