[SOS] Probleme de compilation article1 sous unbuntu

themadmax themadmax at free.fr
Ven 11 Avr 19:07:35 CEST 2008


Fichier http://sos.enix.org/wiki-fr/upload/SOSDownload/sos-code-art1.tgz

- Version de gcc
version gcc 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

- Lors du make :
gcc -I/home/max/sos/sos-code-article1 -c bootstrap/multiboot.S -Wall
-nostdlib -nostdinc -ffreestanding -DKERNEL_SOS  -DASM_SOURCE=1 -o
bootstrap/multiboot.o
gcc -I/home/max/sos/sos-code-article1 -c drivers/x86_videomem.c -Wall
-nostdlib -nostdinc -ffreestanding -DKERNEL_SOS  -o
drivers/x86_videomem.o
gcc -I/home/max/sos/sos-code-article1 -c drivers/bochs.c -Wall -nostdlib
-nostdinc -ffreestanding -DKERNEL_SOS  -o drivers/bochs.o
gcc -I/home/max/sos/sos-code-article1 -c sos/klibc.c -Wall -nostdlib
-nostdinc -ffreestanding -DKERNEL_SOS  -o sos/klibc.o
gcc -I/home/max/sos/sos-code-article1 -c sos/main.c -Wall -nostdlib
-nostdinc -ffreestanding -DKERNEL_SOS  -o sos/main.o
ld --warn-common -T ./support/sos.lds -o sos.elf bootstrap/multiboot.o
drivers/x86_videomem.o drivers/bochs.o sos/klibc.o sos/main.o
drivers/x86_videomem.o: In function `sos_x86_videomem_printf':
x86_videomem.c:(.text+0x21f): undefined reference to `__stack_chk_fail'
drivers/bochs.o: In function `sos_bochs_printf':
bochs.c:(.text+0x352): undefined reference to `__stack_chk_fail'
sos/klibc.o: In function `vsnprintf':
klibc.c:(.text+0x65a): undefined reference to `__stack_chk_fail'
make: *** [sos.elf] Erreur 1

- Rajout de l'option -fno-stack-protector dans le Makefile :
[l02] : CFLAGS  = -Wall -nostdlib -nostdinc -ffreestanding -DKERNEL_SOS
-fno-stack-protector

- Après
./support/build_image.sh fd.img sos.elf
Found correct grub installation in /usr/lib/grub/i386-pc
Found correct /sbin/grub at /usr/sbin/grub
shift: 167: can't shift that many
make: *** [fd.img] Erreur 2

- Modification build_image.sh ligne 167 :
options="$1" #; shift

- Build ok !



Plus d'informations sur la liste de diffusion Sos