From owner-freebsd-current@FreeBSD.ORG Sat May 26 06:48:22 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1DBC106564A; Sat, 26 May 2012 06:48:22 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 952488FC0C; Sat, 26 May 2012 06:48:22 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1SYAnQ-0001WK-CI>; Sat, 26 May 2012 08:48:16 +0200 Received: from e178001056.adsl.alicedsl.de ([85.178.1.56] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1SYAnQ-0000oL-4u>; Sat, 26 May 2012 08:48:16 +0200 Message-ID: <4FC07CA9.9010707@zedat.fu-berlin.de> Date: Sat, 26 May 2012 08:48:09 +0200 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120502 Thunderbird/12.0.1 MIME-Version: 1.0 To: Dimitry Andric References: <4FBE67A7.40904@zedat.fu-berlin.de> <4FBE8C30.404@FreeBSD.org> In-Reply-To: <4FBE8C30.404@FreeBSD.org> X-Enigmail-Version: 1.5pre Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF6B110DB624D31EE505EADEB" X-Originating-IP: 85.178.1.56 Cc: Current FreeBSD 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" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2012 06:48:23 -0000 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--