I am tring to install XV6 on my MacOS. These are the steps I followed:
- Downloaded xv6 from https://github.com/mit-pdos/xv6-public
- Installed qemu using
brew install qemu
- Installed i386-elf toolchain from https://github.com/nativeos/homebrew-i386-elf-toolchain. Used these commands:
brew tap nativeos/i386-elf-toolchain
brew install nativeos/i386-elf-toolchain/i386-elf-binutils
brew install nativeos/i386-elf-toolchain/i386-elf-gcc
After cloning the xv6-public repo, I changed the Makefile to the one given in https://github.com/ashr123/XV6-MacOS-Makefile/tree/master
Now I ran make qemu clean
from the xv6-public directory.
I get this error:
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
I don't understand what went wrong. All help is appreciated. Thanks in advance.