如何解决“fatal error: clang/Frontend/LangStandard.h: 无此文件或目录”错误
一、make时Clang前端头文件缺失错误
按照Haystack仓库的README说明操作,执行make命令时始终报错:
pet.cc:73:10: fatal error: clang/Frontend/LangStandard.h: No such file or directory
73 | #include <clang/Frontend/LangStandard.h>
我推测需要单独安装Clang,于是按照LLVM官方文档的说明编译安装了LLVM和Clang,确认安装成功后再次执行make,仍然出现相同错误。请问该如何获取并让编译器找到Clang前端的头文件?
二、执行./autogen.sh时的警告是否有问题?
执行仓库说明中的./autogen.sh时,出现两类警告:
第一类警告:
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
第二类警告:
Makefile.am:10: warning: source file 'source/arith/errors.c' is in a subdirectory,
Makefile.am:10: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled. For now, the corresponding output
automake: object file(s) will be placed in the top-level directory. However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
这些警告是否意味着项目存在问题,还是可以忽略?
内容的提问来源于stack exchange,提问作者BR8

