Re: CLANG buildworld failure: lint: cannot exec /usr/obj/usr/src/tmp/usr/bin/cc: No such file or directory

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sun, 04 Mar 2012 22:46:43 +0100
On 2012-03-04 21:34, O. Hartmann wrote:
...
> Where are those new "WITH_CLANG_XXXX" tags documented?

In src.conf(5), where all the WITH_ and WITHOUT_ settings are
documented.

I should probably have sent a heads up to this list, to announce this
new setting, which installs clang as /usr/bin/cc, /usr/bin/c++ and
/usr/bin/cpp, effectively making it the "default compiler".

That said, I made a mistake in r232322, which introduced the setting,
causing gcc not to be built at all if you had all default settings,
except CC=clang, CXX=clang++ and CPP=clang-cpp.

This caused no 'cc', 'c++' and 'cpp' executables to be installed under
the temporary object tree.  It should theoretically work, but some tools
like lint still have 'cc' hardcoded, and thus they fail.

I have worked around this in r232522.  Please update to that revision,
and try again.


> In my case things developed even worse. After the last "make update" in
> /usr/src (SVN based), I can't even build a kernel (make buildworld fails
> very early):
> 
> ===> games/fortune/strfile (obj,depend,all,install)
> /usr/obj/usr/src/tmp/usr/src/games/fortune/strfile created for
> /usr/src/games/fortune/strfile
> rm -f .depend
> CC='clang' mkdep -f .depend -a
> -I/usr/obj/usr/src/tmp/legacy/usr/include -std=gnu99
> /usr/src/games/fortune/strfile/strfile.c
> echo strfile: /usr/lib/libc.a
> /usr/obj/usr/src/tmp/legacy/usr/lib/libegacy.a >> .depend
> clang -O2 -pipe -O2 -fno-strict-aliasing -pipe -std=gnu99
> -I/usr/obj/usr/src/tmp/legacy/usr/include -c
> /usr/src/games/fortune/strfile/strfile.c
> clang -O2 -pipe -O2 -fno-strict-aliasing -pipe -std=gnu99
> -I/usr/obj/usr/src/tmp/legacy/usr/include  -static
> -L/usr/obj/usr/src/tmp/legacy/usr/lib -o strfile strfile.o -legacy
> clang: warning: argument unused during compilation: '-std=gnu99'
> strfile.o: In function `main':
> /usr/src/games/fortune/strfile/strfile.c:(.text+0x2e0): undefined
> reference to `_ThreadRuneLocale'

This is unrelated to the 'cc' problem, but I suggest deleting /usr/obj/*
and starting the build from scratch.
Received on Sun Mar 04 2012 - 20:46:46 UTC

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