1

I just tried to complie xv6 in my Ubuntu 18.04.3 using make qemu-nox

It failed with the following error. Can you give me some information about this error?

ld -m elf_i386 -T kernel.ld -o kernel entry.o bio.o console.o exec.o file.o fs.o ide.o ioapic.o kalloc.o kbd.o lapic.o log.o main.o mp.o picirq.o pipe.o proc.o sleeplock.o spinlock.o string.o swtch.o syscall.o sysfile.o sysproc.o trapasm.o trap.o uart.o vectors.o vm.o -b binary initcode entryother trap.o: In function tvinit': /home/lee/OS-Homework/trap.c:23: undefined reference tovectors' /home/lee/OS-Homework/trap.c:24: undefined reference to `vectors' Makefile:124: recipe for target 'kernel' failed make: *** [kernel] Error 1

1 Answer 1

1

When linking, ld complains about the lack of vectors array which is generated by rule vectors.S

vectors.S: vectors.pl
    perl vectors.pl > vectors.S

It seems that it that this rule is not generated...

To build vector.S just type make vectors.S before make qemu-nox, or even in one command:

make vectors.S qemu-nox
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.