Odd errors with GCC-compiles

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
ScorchOS
Member
Member
Posts: 44
Joined: Fri Oct 24, 2008 6:20 am
Location: Wiltshire, UK
Contact:

Odd errors with GCC-compiles

Post by ScorchOS »

I'm not sure if this is the correct forum, but as this is related to the development of the ApolloOS kernel...

Someone is looking at contributing to the ApolloOS project, but they want to use a Windows environment to do it. They've setup NASM and MinGW (moving the binaries to the C:\Windows directory) and I've worked with them to provide a batch file that should actually work... (I'm not sure how we'll go about mounting the floppy image to add the kernel executable, I assume that may need a third-party app)

However, we're coming across a bit of a problem. Each time he runs it he gets:

Code: Select all

gcc: installation problem, cannot exec 'cc1' : No such file or directory
for each C file that we try to compile (of which there are 8 ). Then the inevitable 'kernel.o not available' error when it comes to linking.

There seems to be nothing wrong with the batch file (code included below). Have we done something wrong during the installation?

Code: Select all

@echo off
echo Now assembling, compiling, and linking your kernel:
cd src
nasm -f elf -o start.o start.asm
rem Compile C sources using gcc...
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -fleading-underscore -I./include -o kernel.o -c kernel.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -fleading-underscore -I./include -o scrn.o -c scrn.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -fleading-underscore -I./include -o gdt.o -c gdt.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -fleading-underscore -I./include -o idt.o -c idt.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -fleading-underscore -I./include -o isrs.o -c isrs.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -fleading-underscore -I./include -o irq.o -c irq.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -fleading-underscore -I./include -o timer.o -c timer.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -fleading-underscore -I./include -o kb.o -c kb.c
rem This links all your files. Remember that as you add *.o files, you need to
rem add them after start.o. If you don't add them at all, they won't be in your kernel!
ld -T link.ld -o kernel.x start.o kernel.o scrn.o gdt.o idt.o isrs.o irq.o timer.o kb.o
echo Cleaning up object files...
del *.o
echo Done!
pause
I tend to use a Linux environment to develop ApolloOS, so this is a new one on me. :?
ScorchOS: http://sites.google.com/site/scorchopsys/


"The golden rule: RTFM, check the wiki, google it and have a go BEFORE asking the question!"
User avatar
ScorchOS
Member
Member
Posts: 44
Joined: Fri Oct 24, 2008 6:20 am
Location: Wiltshire, UK
Contact:

Re: Odd errors with GCC-compiles

Post by ScorchOS »

Ok, not to worry - I think I've cracked it. :D

Thanks to Mike Saunders for his suggestion. After a bit of research I realised that we need to alter the PATH variable for MinGW. Essentially Step 3 of this tutorial:

http://csjava.occ.cccd.edu/~gilberts/mingw/

It just goes to show - do your homework about a package before you install it #-o (though I tend to use a Linux distro to develop ApolloOS so I think I can be forgiven for an oversight there! )
ScorchOS: http://sites.google.com/site/scorchopsys/


"The golden rule: RTFM, check the wiki, google it and have a go BEFORE asking the question!"
Post Reply