iBoai
iBoai

Reputation: 3

i386-elf-gcc: error: spawn: No such file or directory

I am following a Github OS development tutorial and I came across a lesson where you need to download i386-elf-gcc and use it to compile sample code.

(respectively lesson https://github.com/cfenollosa/os-tutorial/tree/master/12-kernel-c)

I keep getting the error:

i386-elf-gcc: error: spawn: No such file or directory

when I try to run the command that is IN the lesson:

i386-elf-gcc -ffreestanding -c function.c -o function.o

I have downloaded the tutorial files and there is no possibility that I copied the code incorrectly. I have been struggling with this error for the past few months and I am really looking forward to an answer.

Upvotes: 0

Views: 1526

Answers (1)

John Bollinger
John Bollinger

Reputation: 181149

I am following a Github OS development tutorial and I came across a lesson where you need to download i386-elf-gcc and use it to compile sample code

I have no idea what in that lesson makes you think you're intended to download i386-elf-gcc. Rather, that lesson appears to follow on from the previous one, where you build (and install) a whole cross-compiling toolchain. The expectation is that you will use that toolchain in subsequent lessons that require you to compile C code. Make sure all components of that toolchain are in fact installed, per the instructions in lesson 11. And if the compiler in fact does not work, then the issue is almost certainly with how you built and / or installed it (i.e. lesson 11) not with the command you're trying to use to run it in lesson 12.

Upvotes: 2

Related Questions