# VirtualBox build error



## balanga (Mar 2, 2016)

After trying to building VirtualBox yesterday over several hours the build stopped  with 


```
kmk: *** No rule to make target '/usr/src/sys/kern/bus_if.m'
```

Any pointers?

I have no previous experience with VirtualBox and wanted to see what it looked like.


----------



## wblock@ (Mar 2, 2016)

Which version of FreeBSD is this on?  Is the system source present in /usr/src?


----------



## SirDice (Mar 2, 2016)

On what version of FreeBSD? And did you update the ports tree beforehand?


----------



## balanga (Mar 2, 2016)

wblock@ said:


> Which version of FreeBSD is this on?  Is the system source present in /usr/src?



Do I need /usr/src ?

I tried following https://www.freebsd.org/doc/handbook/virtualization-host-virtualbox.html...


----------



## balanga (Mar 2, 2016)

SirDice said:


> On what version of FreeBSD? And did you update the ports tree beforehand?



I have just done a complete re-install of FreeBSD using FreeBSD 11.0, so maybe I shouldn't expect it to build. I installed the ports tree yesterday.


----------



## tobik@ (Mar 2, 2016)

balanga said:


> Do I need /usr/src ?


Yes, VirtualBox requires a kernel module (emulators/virtualbox-ose-kmod) and if you install from ports it needs the sources in /usr/src to compile. The handbook really should mention this but doesn't.


----------



## tobik@ (Mar 2, 2016)

balanga said:


> I have just done a complete re-install of FreeBSD using FreeBSD 11.0, so maybe I shouldn't expect it to build. I installed the ports tree yesterday.


Welcome to FreeBSD 11.0-CURRENT. Currently there seem to be problems with VirtualBox: https://lists.freebsd.org/pipermail/freebsd-current/2016-March/059909.html


----------



## balanga (Mar 2, 2016)

tobik said:


> Yes, VirtualBox requires a kernel module (emulators/virtualbox-ose-kmod) and if you install from ports it needs the sources in /usr/src to compile. The handbook really should mention this but doesn't.



What is the recommended way of installing the sources?


----------



## kpa (Mar 2, 2016)

If you are serious about following CURRENT at this moment you should be using SVN for installing and updating them.


----------



## cpm@ (Mar 3, 2016)

It was fixed on HEAD by r409965.


----------



## SirDice (Mar 3, 2016)

Obligatory warning: Topics about unsupported FreeBSD versions


----------

