linux - 在 Ubuntu 中编译 xv6 时出错(Makefile :124: recipe for target 'kernel' failed)

标签 linux ubuntu xv6

我只是尝试使用 make qemu-nox 在我的 Ubuntu 18.04.3 中编译 xv6

失败并出现以下错误。你能给我一些关于这个错误的信息吗?

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

最佳答案

链接时,ld 提示缺少由规则 vectors.S 生成的 vectors 数组

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

好像没有生成这条规则...

要构建 vector.S,只需在 make qemu-nox 之前键入 make vectors.S,甚至在一个命令中:

make vectors.S qemu-nox

关于linux - 在 Ubuntu 中编译 xv6 时出错(Makefile :124: recipe for target 'kernel' failed),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59122919/

相关文章:

c - 从一台服务器监听多个端口

linux - 如何在 PAM 之后而不是在重新映射用户之前告诉 SSH 到 setuid

linux - 从 Dockerfile 安装 Apache

c - 需要帮助来理解 xv6 内核中的语法

c++ - 在旧版本的 linux 上运行我的代码

linux - 使用 NASM 将数字写入文件

c - 尝试从 valgrind 读取泄漏摘要 - 程序在我的电脑上导致段错误,而不是在另一台电脑上

ubuntu - 如何为具有自动完成功能的 ubuntu 配置 Rider F#?

operating-system - 为什么xv6-riscv中没有GDT?

c - xv6 调度程序 - proc 从不!= 0