# Cannot build 9.1 kernel: MK_CLANG_IS_CC can't be set by a us



## klugja (Jan 10, 2013)

I first upgraded my system to 9.1.  Then I renamed /usr/src, and created a new /usr/src.

I then recreated /usr/src/ with csup(1) and 


```
*default release=cvs tag=RELENG_9_1
```
in the configuration file.

I then did:


```
# /usr/sbin/config MYKERNEL
Kernel build directory is ../compile/MYKERNEL
Don't forget to do ``make cleandepend && make depend''

usrv-tsegp2#/usr/src:1149 make cleandepend
"/usr/src/share/mk/bsd.own.mk", line 478: MK_CLANG_IS_CC can't be set by a user.
*** [cleandepend] Error code 1

Stop in /usr/src.
```

I never had any issues building 9.0.

I do not see any CLANG options in my kernel configuration.

cc is gcc on my system.  Should it be?  clang is on my system.


----------



## SirDice (Jan 10, 2013)

Use the proper way to compile a kernel, you're following instructions that were current with FreeBSD 4.x.

`# cd /usr/src/ && make buildkernel KERNCONF=MYKERNEL`


----------



## klugja (Jan 10, 2013)

```
usrv-tsegp2#/usr/src:1174 cd /usr/src/ && make buildkernel KERNCONF=MYKERNEL
"/usr/src/share/mk/bsd.own.mk", line 478: MK_CLANG_IS_CC can't be set by a user.
*** [buildkernel] Error code 1

Stop in /usr/src.
```


----------



## SirDice (Jan 10, 2013)

Is this i386 or amd64? What's in /etc/make.conf and /etc/src.conf?


----------



## klugja (Jan 10, 2013)

/etc/src.conf does not exist.


```
$ cat /etc/make.conf
MK_CLANG_IS_CC=no
# added by use.perl 2012-11-27 15:18:08
PERL_VERSION=5.14.2
```


----------



## SirDice (Jan 10, 2013)

Remove that MK_CLANG_IS_CC line.


----------

