Re: usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Error.cpp:15:10: fatal error: 'llvm/TableGen/Error.h' file not found, #include "llvm/TableGen/Error.h"

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Thu, 24 May 2012 21:29:52 +0200
On 2012-05-24 18:53, O. Hartmann wrote:
> Trying to build buildworld on FreeBSD 10-CURRENT/amd64 with CLANG today
> ends up in the following error:
> 
> ===> lib/clang/libllvmtablegen (obj,depend,all,install)
> /usr/obj/usr/src/tmp/usr/src/lib/clang/libllvmtablegen created for
> /usr/src/lib/clang/libllvmtablegen
> rm -f .depend
> CC='clang' mkdep -f .depend -a
> -I/usr/obj/usr/src/tmp/legacy/usr/include
> /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Error.cpp
> /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Main.cpp
> /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Record.cpp
> /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TableGenAction.cpp
> /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TableGenBackend.cpp
> /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TGLexer.cpp
> /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TGParser.cpp
> 
> /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Error.cpp:15:10:
> fatal error: 'llvm/TableGen/Error.h' file not found
> #include "llvm/TableGen/Error.h"

Something is going wrong with your include paths; most likely your
CFLAGS gets mangled.  The actual mkdep command line should have been
similar to (wrapped for clarity):

  CC='clang' \
  mkdep \
  -f .depend \
  -a \
  -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include \
  -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include \
  -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen \
  -I. \
  -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include \
  -DLLVM_ON_UNIX \
  -DLLVM_ON_FREEBSD \
  -D__STDC_LIMIT_MACROS \
  -D__STDC_CONSTANT_MACROS \
  -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" \
  -DDEFAULT_SYSROOT=\"\" \
  -I/usr/obj/usr/src/tmp/legacy/usr/include \
  /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Error.cpp \
  /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Main.cpp \
  /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Record.cpp \
  /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TableGenAction.cpp \
  /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TableGenBackend.cpp \
  /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TGLexer.cpp \
  /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TGParser.cpp

Are you appending or assigning to CFLAGS in make.conf/src.conf?
Received on Thu May 24 2012 - 17:29:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:27 UTC