# OSS will not build



## ddaley (Feb 19, 2012)

I updated my ports tree using [CMD="portsnap"] fetch update[/CMD] on Friday.  I have been able to rebuild everything except a couple of ports.  OSS is getting the following compile error.


```
os_freebsd.c: In function 'oss_install_chrdev':
os_freebsd.c:418: error: 'MAKEDEV_CHECKNAME' undeclared (first use in this function)
os_freebsd.c:418: error: (Each undeclared identifier is reported only once
os_freebsd.c:418: error: for each function it appears in.)
*** Error code 1
```

Will this require me to update my kernel sources as well?  I updated kernel source in Dec or Jan, but am still on 8.2.

I attached the entire build output.


----------



## Beeblebrox (Feb 19, 2012)

> Will this require me to update my kernel sources as well?


AFAIK, BSD's userspace separation means that unlike linux, ports builds are separate from kernel sources. Now this does not mean that FreeBSD-8 can build a port from HEAD (10) - that is another issue about library layouts and such (I guess) which change accross release versions.

I would bet that your error is specific to your machine, which is not uncommon. I have had many-a-port fail to build, and as a temporary workaround I have had to install that specific port with pkg_add. Once you add the pkg, the port build for whatever top layer program is satisfied and continues on its business of building that top-layer port.  2-3 weeks later you'll get a ports update which will fix that build error.

I just built oss btw, no errors. But then again I'm using gcc46 - JK gcc42 should build it as well.


----------



## ddaley (Feb 19, 2012)

Thanks Beeblebrox.

I was able to build OSS prior to updating the ports tree.  I have installed everything using ports.  

I am also using gcc46.

The patch for OSS explicitly adds the reference to that macro.  It also adds 
	
	



```
include <sys/module.h>
```
 which I believe is referring to /usr/src/sys/sys/module.h.  I think that may be where the problem is for me.  That value is not defined in module.h for me.

If I remove patch-kernel-OS-FreeBSD-os_freebsd.c from the patch set in files, then the port builds and installs just fine.


----------



## ddaley (Feb 19, 2012)

I e-mailed the maintainer as listed in the Makefile. Sound seems to work without that patch, but I would rather have an appropriate fix.


----------



## ddaley (Feb 21, 2012)

FYI.  Maintainer replied that this is a bug and was fixed over the weekend.  I haven't tested fix yet however.


----------

