Date: Sat, 26 May 2012 08:48:09 +0200 From: "O. Hartmann" <ohartman@zedat.fu-berlin.de> To: Dimitry Andric <dim@FreeBSD.org> Cc: Current FreeBSD <freebsd-current@FreeBSD.org> Subject: 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" Message-ID: <4FC07CA9.9010707@zedat.fu-berlin.de> In-Reply-To: <4FBE8C30.404@FreeBSD.org> References: <4FBE67A7.40904@zedat.fu-berlin.de> <4FBE8C30.404@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF6B110DB624D31EE505EADEB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/24/12 21:29, Dimitry Andric wrote: > On 2012-05-24 18:53, O. Hartmann wrote: >> Trying to build buildworld on FreeBSD 10-CURRENT/amd64 with CLANG toda= y >> ends up in the following error: >> >> =3D=3D=3D> 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=3D'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" >=20 > 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): >=20 > CC=3D'clang' \ > mkdep \ > -f .depend \ > -a \ > -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include \ > -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clan= g/include \ > -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableG= en \ > -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=3D\"i386-unknown-freebsd10.0\" \ > -DDEFAULT_SYSROOT=3D\"\" \ > -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 >=20 > Are you appending or assigning to CFLAGS in make.conf/src.conf? Yes, I do. This very moment, I got rid of those messages. I think it is not very clear to me (and maybe others) anymore, what goes into /etc/src.conf and what is to be remaining in /etc/make.conf. Since I wrecked all my FreeBSD 10-0-CURRENT boxes around the 15th of May by simply building a "world" (on a daily baisis, so they got affected all), but was luckily able to repair, I guess I need to figure out what's really necessary to go in /etc/src.conf and in /etc/make.conf. There are some mails in this list claiming that setting CC=3D, CXX=3D and= CPP=3D needs also to be done in /etc/src.conf. I have those already set i= n /etc/make.conf using a "knob" for checking to build with CLANG or not. Well, am I right that first /etc/make.conf gets read and then /etc/src.conf? By mistake I set "CFLAGS=3D" instead of "CFLAGS+=3D" in /etc/src.conf, so all settings performed prior to the "sucking in" of /etc/src.conf got banned from the options - and ended up in not finding even includes anymore (due to missing -Ifoo/bar options). Very tricky and a large pithole to step into if not carefully thought about. Regards, Oliver P.S. Most of the confusion is due to the fact I want the base OS be built by CLANG as well as all ports which can bear being built by CLANG. But there are those which can't yet and somehow I try to sort them out and build them with prefereably the gcc46 or gcc47 (I use the base systems USE_GCC=3D4.6+ option). For this purpose, I include at the end of /etc/make.conf a file named ports.conf like this: =2Einclude "/usr/local/etc/ports.conf" The content of ports.conf is like: [...] # mail/thunderbird =2Eif ${.CURDIR:M/usr/ports/mail/thunderbird} USE_GCC=3D 4.6+ #CC=3D cc #CXX=3D c++ #CPP=3D cpp CFLAGS+=3D -DLDAP_DEPRECATED CXXFLAGS+=3D -DLDAP_DEPRECATED =2Eendif [...] This approach does only work, if the not well documented knob "WITH_CLANG_IS_CC" is not set, so cc stays with the legacy gcc 4.2.1. By the way, I would like to see a much more restrictive way to separate the FreeBSD core system from ports in a logical way. Either I have a great misunderstanding and this is already the fact, or ... --------------enigF6B110DB624D31EE505EADEB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJPwHyvAAoJEOgBcD7A/5N8qjoIANzAQcRG/s6aCGNqaTB6RXDG 3X5MBIToZ7cMchWPEUELCtwLU+LpsIfVJ0xYin5Kk05b+RM5uyYdOgoHs6FUfFYv bXewsY3JivyHsgnje3R3b/6k3iF/KWQkXPs4bHmgFxp3Fo3yTKxT41YSU4wWwErL nTYG0B4pm+neH3T/aMpoUSWkdW4wSQMtP9THKLrYa2hI4hEHBTIG/EahF5geADBr 0SFlTPDwrOg6Qie/zoAlGqXI1ffE4lxt33wroQGrSoIgb6JXqSiQJCD33bqxs7Rc kGJFKJzDsTtOOfV9jmcfNszKvYcHk8804Y+XVT8uK4z4pHamYF9OBqWzQhyA0vE= =vN4R -----END PGP SIGNATURE----- --------------enigF6B110DB624D31EE505EADEB--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FC07CA9.9010707>