Closed boredcoder411 closed 8 months ago
Can you please provide a lot more context including
Debian on wsl i686-elf-tools 7.1.0 itried it with the pre-builts, same issue as when I compile them myself. I tried downloading them on windows and copying them to debian, then downloading them on debian directly, same issue i'm running the provided script to compile the tools, and a custom build script:
i686-elf-as boot.s -o boot.o
i686-elf-gcc -c kernel.c -o kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra
i686-elf-gcc -T linker.ld -o myos.bin -ffreestanding -O2 -nostdlib boot.o kernel.o -lgcc
grub-file --is-x86-multiboot myos.bin
echo $?
cp myos.bin isodir/boot/myos.bin
grub-mkrescue -o myos.iso isodir
qemu-system-i386 -cdrom myos.iso -m 1G
rm *.o
rm *.bin
rm isodir/boot/myos.bin
to compile my os
Update: when my build script is run as sudo, I get: i686-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory
Which line of code in the above is throwing the error?
Does the error occur if you try and compile it using the Windows version of i686-elf-tools?
It's line 2, and yes it does
For the purposes of investigation, I'd like to focus on Windows
Are you able to provide the contents of your kernel.c
file?
In addition, are you able to advise whether you have potentially removed some of the files contained in the download?
All files and folders contained in i686-elf-tools-windows.zip
must exist in the exact same locations relative to each other. If you have copied all of the executables out of the bin
folder somewhere else, it won't work.
I tested downloading this file and was successfully able to compile it using the command you listed
C:\i686-elf-tools-windows\bin>i686-elf-gcc.exe -c C:\kernel.c -o C:\kernel.o -std=gnu99 -ffreestanding -O2 -Wall -Wextra
The error message you are getting strongly indicates to me that some of the files contained in i686-elf-tools-windows.zip
are missing
I tried looking around online and nothing seems to help the issue or fix it. I tried compiling it myself using the build script this repo provides, but to no avail. Can anyone help?