'llvm/Support/TargetRegistry.h: No such file or directory
I have this error when I make
project in WSL(Ubuntu 20.04). And I have installed LLVM and Clang.Hou should I do?
Kconfig Makefile README.md build configs include resource scripts src tools
why@YOGA:~/ics2021/nemu$ make
+ CXX src/utils/disasm.cc
src/utils/disasm.cc:5:10: fatal error: llvm/Support/TargetRegistry.h: No such file or directory
5 | #include "llvm/Support/TargetRegistry.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [/home/why/ics2021/nemu/scripts/build.mk:40: /home/why/ics2021/nemu/build/obj-riscv32-nemu-interpreter/src/utils/disasm.o] Error 1```
Solution 1:[1]
Actually, It's part of the NJU ICS Course project, and the right path should be #include "llvm/MC/TargetRegistry.h"
. For llvm-11, the file is in "llvm/Support/TargetRegistry.h". But for llvm-14, it's in "llvm/MC/TargetRegistry.h". You should check where the TargetRegistry.h
is. For me with Ubuntu, the file is at /usr/include/llvm/MC/
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |