[Resolved][HELP] Compile error [mik kernel]

D

DookMatt

Guest
Yes, but there are at least two of the hunks that are not applied correctly, at least it did for me. After doing the patch -p0 command what was the output?
One FAILED only in cpufreq.c but i add manually #include <sched.h>. i have this error with original mik kernel and with patched mik kernel.
 
D

doktornotor

Guest
I have this error when i compile mik kernel (i downloaded it from his git repo):

Code:
CC [M]  drivers/net/wireless/bcm4325/src/shared/linux_osl.o
cc1: warnings being treated as errors
drivers/net/wireless/bcm4325/src/shared/linux_osl.c: In function 'osl_pktfree_static':
drivers/net/wireless/bcm4325/src/shared/linux_osl.c:376:34: error: array subscript is above array bounds
For the original question:

Code:
cc1: warnings being treated as errors
simply means you are compiling this with -Werror or that this flag is hardcoded in the script you are using to compile. So, simply do not do this or append -Wno-error or some Wno-error=<foo> variation of that to your CFLAGS. At least this was a warning and not fatal with gcc-4.4, and also this warning had tons of false positives (still can see some bugs about it with 4.5 even)

(No time to check out the repo so do not expect any patches from me ATM. :p)
 
D

doktornotor

Guest
I try with "make -j2 -Wno-errors" but the error there is GRRR
Well because it is supposed to be -Wno-error in the first place... :p And second, I would suggest to do this instead:

Code:
CFLAGS="$CFLAGS -Wno-error" make -j2
 
Last edited:

franciscofranco

Recognized Developer
Dec 9, 2010
24,725
136,397
0
Carcavelos
Dook, the patch I posted previously works fine. The loop is just trying to access the array but it's out of bounds because the defined "space" for the array is smaller than the condition in the loop. And the patch fixes that.
 
D

DookMatt

Guest
Dook, the patch I posted previously works fine. The loop is just trying to access the array but it's out of bounds because the defined "space" for the array is smaller than the condition in the loop. And the patch fixes that.
with the patch i've:
Code:
`dhd_module_cleanup' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
make: *** [.tmp_vmlinux1] Error 1
 
D

doktornotor

Guest
done, but there is the error. :mad:
Eh... first of all, you need to run something like

Code:
make mrproper
or you will be using the same makefiles that have been already generated with the previous CFLAGS so what you are doing will not do any good.

Second, if that still does not work with those CFLAGS b/c your CFLAGS are ignored, then you simply have to use grep and sed to remove the hardcoded -Werror crap.

Would suggest reading something like Gentoo developer documentation. ;)

P.S. Kindly note I am still talking about the error in the first post of this thread, not about any other errors introduced by broken patching of the source code.
 
Last edited: