# FreeBSD 8.3 to 9.0 upgrade - kernel compiling problem



## epouce (Jun 11, 2012)

Hi all!

I have just made an upgrade from FreeBSD 8.3-RELEASE to FreeBSD 9.0. During the upgrade process I had troubles with gmirror, but I have successfully solved them (destroying the mirror and creating it again). The upgrade was done with the freebsd-update utility.

I have also updated the ports tree to current version with [cmd=]portmanager -u -f[/cmd] After the ports update I made a final freebsd-update and I restarted the server.

After that I wanted to build a custom kernel. And here my troubles began. Durign the [cmd=]make buildkernel KERNCONF=MY_SERVER[/cmd] I received the following error:

```
cc1: error: /usr/src/sys/modules/zfs/../../../include: No such file or directory
*** Error code 1

Stop in /usr/src/sys/modules/zfs.
*** Error code 1

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

Stop in /usr/obj/usr/src/sys/MY_SERVER.
*** Error code 1

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

Stop in /usr/src.
```
After the error above I have tried to compile a GENERIC kernel (without any customisation) and I received the same error.

I have Googled a lot and I did not find any similar problem. I am aware that I have a lack of knowledge and this is why I am asking you for help.

Thaks for any help.


----------



## UNIXgod (Jun 11, 2012)

You need to pull the source. No reason to google it as it's in the handbook.


----------



## epouce (Jun 11, 2012)

Hi!

Thank you for your fast reply. I thought that the following line in /etc/freebsd-update.conf should be enough to update the source (because of the src word in it):


```
# Components of the base system which should be kept updated.
Components src world kernel
```

I will try to pull the source.

Thank you very much again.


----------



## SirDice (Jun 12, 2012)

I noticed freebsd-update only updates files that are already on the system. So if the source tree only contains the kernel sources it won't fetch the rest.

I recommend using csup(1) as described here: Thread 29172


----------

