# Could not find bsd.compiler.mk



## Leander (Sep 13, 2012)

Hi,

I try to compile a new kernel but it kept on failing ... so I tried to debug a little and tried to compile GENERIC to see whether it would run at all but it also kept on failing with the following error message:

```
Storage [/usr/src]# make buildkernel KERNCONF=GENERIC
"Makefile.inc1", line 49: Could not find [FILE]bsd.compiler.mk[/FILE]
"Makefile.inc1", line 279: Malformed conditional (${MK_CLANG_IS_CC} == "no")
"Makefile.inc1", line 1129: Malformed conditional (${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no")
"Makefile.inc1", line 1131: if-less endif
"Makefile.inc1", line 1186: Malformed conditional (${MK_CLANG} != "no" && (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang"))
"Makefile.inc1", line 1189: if-less endif
"Makefile.inc1", line 1191: Malformed conditional (${MK_GCC} != "no" && ${MK_CLANG_IS_CC} == "no")
"Makefile.inc1", line 1193: if-less endif
"Makefile.inc1", line 1254: Malformed conditional (${MK_LIBCPLUSPLUS} != "no")
"Makefile.inc1", line 1256: if-less endif
"Makefile.inc1", line 1259: Malformed conditional (${MK_LIBCPLUSPLUS} != "no")
"Makefile.inc1", line 1261: if-less endif
make: fatal errors encountered -- cannot continue
*** Error code 1

Stop in /usr/src.
Storage [/usr/src]#
```

It looks lke it can't find the makefile "Could not find bsd.compiler.mk"

Looking for it manually also didn't find any file named like this:

```
Storage [/usr/src]# find / -name [FILE]bsd.compiler.mk[/FILE]
Storage [/usr/src]#
```

Note that the FreeBSD 9.0 Release is freshly installed on this machine.
Any ideas why this happens?


----------



## Uniballer (Sep 13, 2012)

Did you 
	
	



```
make buildworld
```
 first to build the kernel tool chain?


----------



## Leander (Sep 13, 2012)

Hi Uniballer,

nope ... , since I just wanted to recompile the kernel only instead of rebuilding the entire system.

... but "make buildworld" also didn't help ...

```
Storage [/usr/src]# make buildworld
cd: [FILE]/usr/src/tools/build/make_check[/FILE]: No such file or directory

--------------------------------------------------------------
>>> Building an up-to-date make(1)
--------------------------------------------------------------
cd: /usr/src/usr.bin/make: No such file or directory
*** Error code 2

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
Storage [/usr/src]#
```


----------



## chatwizrd (Sep 13, 2012)

Did you update your source tree with csup or svn yet?

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html


----------



## SirDice (Sep 14, 2012)

It looks like your source tree is incomplete.


----------



## Leander (Sep 15, 2012)

SirDice said:
			
		

> It looks like your source tree is incomplete.


Maybe ... ?!
So here is what I do in order to sync src and ports:


```
# Generate Supfile for Ports and Sources:
echo "
*default tag=.
*default host=[url=cvsup.de.FreeBSD.org]cvsup.de.FreeBSD.org[/URL]
*default prefix=/usr
*default base=/var/db
*default release=cvs
*default delete use-rel-suffix
*default compress

src-base release=cvs
src-sys release=cvs

ports-all
" > [FILE]/etc/cvsup/ports-supfile[/FILE]
chmod 0755 [FILE]/etc/cvsup/ports-supfile[/FILE]






mkdir -p -m 0644 /var/db/sup

echo "#==============#
# CVSUP Refuse #
#==============#

doc/bn_*
doc/da_*
#doc/de_*
doc/el_*
doc/es_*
doc/fr_*
doc/hu_*
doc/it_*
doc/ja_*
doc_mn_*
doc/nl_*
doc/no_*
doc/pl_*
doc/pt_*
doc/ru_*
doc/sr_*
doc/tr_*
doc/zh_*

#ports/accessibility
#ports/arabic
#ports/astro
" > [FILE]/var/db/sup/refuse[/FILE]
chmod -R 0755 [FILE]/var/db/sup/refuse[/FILE]


csup -z -L 0 [FILE]/etc/cvsup/ports-supfile[/FILE]

cd /usr/ports && make fetchindex
```


it's mainly copied from the handbook - so I don't see what I'm missing?!
Any ideas?

Thx & best regards


----------



## Leander (Sep 15, 2012)

It seems to work when I modified /etc/cvsup/ports-supfile to

```
#src-base release=cvs
#src-sys release=cvs
src-all
```

Sys and base had always been enough to recompile the kernel ... What am I missing?


----------



## phoenix (Sep 15, 2012)

You can't use a buildworld/buildkernel cycle to build the kernel without a full source tree installed.

You can use "the old way" of compiling a kernel, though:

```
# cd /usr/src/sys/<arch>/conf
# ee MYKERNEL
# config MYKERNEL
# cd ../compile/MYKERNEL
# make cleandepends; make depends; make; make install
# shutdown -r now
```


----------



## Leander (Sep 15, 2012)

I never used the old way of compiling a kernel. The "new" way as described in the handbook has always worked for me up to RELEASE 7.3 even I only had base and sys synced ...

any way it' working now - thx for the help


----------

