Xiaomi_Kernel_OpenSource icon indicating copy to clipboard operation
Xiaomi_Kernel_OpenSource copied to clipboard

Compilation Error [CANCRO]

Open Xephi opened this issue 11 years ago • 30 comments

Again an another error :

In file included from drivers/tspdrv/tspdrv.c:54:0: drivers/tspdrv/ImmVibeSPI.c: In function 'drv2604_write_reg_val': drivers/tspdrv/ImmVibeSPI.c:681:4: error: implicit declaration of function 'KBUILD_STR' [-Werror=implicit-function-declaration] drivers/tspdrv/ImmVibeSPI.c:681:4: error: 'tspdrv' undeclared (first use in this function) drivers/tspdrv/ImmVibeSPI.c:681:4: note: each undeclared identifier is reported only once for each function it appears in drivers/tspdrv/ImmVibeSPI.c: In function 'drv2604_read_reg': drivers/tspdrv/ImmVibeSPI.c:732:2: error: 'tspdrv' undeclared (first use in this function) cc1: some warnings being treated as errors

scripts/Makefile.build:307: recipe for target 'drivers/tspdrv/tspdrv.o' failed make[2]: *** [drivers/tspdrv/tspdrv.o] Error 1 scripts/Makefile.build:443: recipe for target 'drivers/tspdrv' failed make[1]: *** [drivers/tspdrv] Error 2 Makefile:950: recipe for target 'drivers' failed make: *** [drivers] Error 2

Xephi avatar Apr 02 '15 18:04 Xephi

Compiling with what GCC ?

rooque avatar Apr 02 '15 21:04 rooque

https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6

Xephi avatar Apr 02 '15 21:04 Xephi

Try with 4.7

rooque avatar Apr 02 '15 21:04 rooque

Same error :/

Xephi avatar Apr 02 '15 23:04 Xephi

Xiaomi; it's great to give a kernel, but you could give instruction on how to build too. And which dependancy are necessary. My next phone will be another brand I think.

loicpirez avatar Apr 03 '15 09:04 loicpirez

Try GCC 4.9.3 (http://forum.xda-developers.com/showthread.php?p=36677987#post36677987) I haven't tried it yet though, have more important work than this mess here

ghost avatar Apr 03 '15 12:04 ghost

Again, same error at the same point :

In file included from drivers/tspdrv/tspdrv.c:58:0: drivers/tspdrv/ImmVibeSPI.c: In function 'drv2604_write_reg_val': drivers/tspdrv/ImmVibeSPI.c:681:4: error: implicit declaration of function 'KBUILD_STR' [-Werror=implicit-function-declaration] drivers/tspdrv/ImmVibeSPI.c:681:4: error: 'tspdrv' undeclared (first use in this function) drivers/tspdrv/ImmVibeSPI.c:681:4: note: each undeclared identifier is reported only once for each function it appears in drivers/tspdrv/ImmVibeSPI.c: In function 'drv2604_read_reg': drivers/tspdrv/ImmVibeSPI.c:732:2: error: 'tspdrv' undeclared (first use in this function) cc1: some warnings being treated as errors scripts/Makefile.build:307: recipe for target 'drivers/tspdrv/tspdrv.o' failed make[2]: *** [drivers/tspdrv/tspdrv.o] Error 1 scripts/Makefile.build:443: recipe for target 'drivers/tspdrv' failed make[1]: *** [drivers/tspdrv] Error 2 Makefile:950: recipe for target 'drivers' failed make: *** [drivers] Error 2

Xephi avatar Apr 03 '15 13:04 Xephi

Remove "-Werror-implicit-function-declaration" from the Makefile in your kernel source directory and try again

ghost avatar Apr 05 '15 17:04 ghost

Kick -Wall out too while your on it. I never had much left for warnings which are treated as errors.. Unless you want to fix every little code derp :P

ghost avatar Apr 05 '15 17:04 ghost

Tested without theses flags, but always these errors ( cause tspdrv seems to be always undeclared ^^")

Xephi avatar Apr 06 '15 02:04 Xephi

Yeah, they gave us broken junk.. Theres a file /include/linux/dynamic_debug.h that is unusable.. I imported a clean one from the OnePlus One, which is also a SD801 phone to avoid any issues.. Compiles beyond those errors. Replace your file with this: https://github.com/stefant234/AndromedaCANCRO-KK/blob/master/include/linux/dynamic_debug.h

ghost avatar Apr 06 '15 08:04 ghost

Don't know how I fixed tspdrv, it just stopped quirking :O

ghost avatar Apr 06 '15 08:04 ghost

New place, same error.. Don't bother with my Import.. Something else is wrong here

ghost avatar Apr 06 '15 08:04 ghost

there are a heck of errors in the source, fixed a lot of them and finally got it buildable but not bootable try deleting this lines in the original immvibespi.c

/* From Xiaomi start / pr_debug("drv2604 write 0x%02x, 0x%02x", data[i], data[i / From Xiaomi end */

i m using the compiler arm-cortex_a15-linux-gnueabihf-linaro_4.9.1-2014.04 http://forum.xda-developers.com/showthread.php?p=59859361#post59859361

deeplyarnab avatar Apr 06 '15 09:04 deeplyarnab

These are all the issues i faced and fixed and got it buildable http://pastebin.com/F0fTegmq

i have got the zImage file but the problem is i dont know how to flash it and tried many methods but it didnt boot and went straight to fastboot

deeplyarnab avatar Apr 06 '15 09:04 deeplyarnab

In the beginning of the compilation dtb's are generated. http://forum.xda-developers.com/showthread.php?t=2469510 You need to create the boot.img with the additional dt.img for it to boot

ghost avatar Apr 06 '15 09:04 ghost

Already fixed most errors here apparently too.. Going to try your immvibespi.c fix now

ghost avatar Apr 06 '15 09:04 ghost

i tried that but gave errors, anyways let it be! i got the z image to boot! YAY!!!

used this anykernel zip http://forum.xda-developers.com/showthread.php?t=2670512

deeplyarnab avatar Apr 06 '15 10:04 deeplyarnab

Full success here too. Meh, I have a different way to assemble zips and boot.imgs :)

ghost avatar Apr 06 '15 10:04 ghost

I will try theses changes :) By the way, is your kernel stable with CM-12 @stefant234 ?

Xephi avatar Apr 06 '15 10:04 Xephi