# [PC-BSD] Error message when rebuilding the kernel.



## Romanrp (Feb 5, 2010)

When I run "make buildkernel KERNCONF=MYKERNEL" everything goes well until after a while but then I get a error message saying

```
c/sys/dev/ath -I/usr/src/sys/dev/ath/ath_hal                                    
cc1: warnings being treated as errors
/usr/src/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c: In function 'ar5416Attach':
/usr/src/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c:355: warning: passing argument 1 of 'ar5416InitNfHistBuff' from incompatible pointer type
/usr/src/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c:355: error: too few arguments to function 'ar5416InitNfHistBuff'
*** Error code 1

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

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

Stop in /usr/src.
```


----------



## sixtydoses (Feb 5, 2010)

If you don't need the 'device ath'(and those related to it) then you can remove them from your custom kernel and rebuild.


----------



## Romanrp (Feb 5, 2010)

I need the device ath,i think that that is the patch I applied in order to make my wireless work.


----------



## fronclynne (Feb 5, 2010)

Sounds like you have -Werror set somewhere.


----------



## Romanrp (Feb 5, 2010)

how do i remove the -Werror?


----------



## fronclynne (Feb 5, 2010)

What version of FreeBSD are you using?

What version is the source you're trying to build?

What is in your /etc/make.conf, /etc/src.conf?

What does your kernconf look like?

Where did you get this patch to make your wireless work?


----------



## Romanrp (Feb 6, 2010)

I am running pc-bsd 8 rc whcih I assume is based on freebsd 8.
Not sure about the source.
to get the patch I did this 

```
fetch http://people.freebsd.org/~rpaulo/ar9285_stable_8.diff
cd /usr/src
patch < /place/where/diff/file/is/stored
```
I think that the patch is dodgy.  I think I will need to find a new patch or make adjustments to this one.


```
/etc/make.conf
#UNCOMENT this if you want to do port builds with no interaction
#BATCH=yes
```

I have no /etc/src.conf


----------



## DutchDaemon (Feb 6, 2010)

Romanrp said:
			
		

> I am running pc-bsd 8 rc which I assume is based on freebsd 8.



Derived from. Be sure not to see or *treat* them as 'identical'. They're not.


----------



## fronclynne (Feb 7, 2010)

Romanrp said:
			
		

> I am running pc-bsd 8 rc whcih I assume is based on freebsd 8.
> Not sure about the source.
> to get the patch I did this
> 
> ...



I'm going to toss out a WAG, and suggest that whatever version/revision of source code you have, it is not compatible with a patch meant for FreeBSD 8-STABLE.

On a bog-stock FreeBSD system, it looks to me like -Werror is pulled in from /usr/src/share/mk/bsd.sys.mk.  You might try setting NO_WERROR=true in /etc/make.conf, and seeing if your module builds.

[red]Nota bene!  Vorsicht![/red]  If those warnings are important and you ignore them, you could get an unbootable kernel building past them.  You will be very crabby if this happens.


----------

