GCC Related Kernel Building Error - General Questions and Answers

Hey XDA folk, pretty sure this is the correct forum to post this in, but if it isn't, then please enlighten me.
For those that aren't following my work, I've patched up the G2 CAF kernel from the lg-devs repo to my old kernel, along with GCC 5+ fixes. I am building with the GCC 6.0 UBERTC kernel toolchain. The kernel can be found here.
The exact kernel error I am getting is:
Code:
LD .tmp_vmlinux1
arch/arm/kernel/built-in.o:(___ksymtab_gpl+return_address+0x0): undefined reference to `return_address'
kernel/built-in.o: In function `get_parent_ip':
hw_breakpoint.c:(.text+0x39b10): undefined reference to `return_address'
hw_breakpoint.c:(.text+0x39b3c): undefined reference to `return_address'
/home/tsunami/android/kernel/lge/msm8974-caf/Makefile:919: recipe for target '.tmp_vmlinux1' failed
make[2]: *** [.tmp_vmlinux1] Error 1
Makefile:130: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/tsunami/android/kernel/lge/msm8974-caf'
build/core/tasks/kernel.mk:229: recipe for target 'TARGET_KERNEL_BINARIES' failed
make: *** [TARGET_KERNEL_BINARIES] Error 2
My error probably resides within this commit, but reverting it leads to a different error as well (Not the unwind warning). I am not sure as to whether I am missing a separate commit or not.

Just gonna give this a small bump.

Another bump. Do code-related issues even go here?

Closed at OP's request.

Related

help building android kernel module, error

Hi all,
I'm trying to build the tiwlan_drv kernel module for my Droid1. I built the kernel, and now I am trying to build this module. However, I get several warnings and errors:
Code:
LD [M] /home/gnychis/Documents/android/ti/wilink_6_1/stad/build/linux/tiwlan_drv.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "hPlatform_DevicePowerOn" [/home/gnychis/Documents/android/ti/wilink_6_1/stad/build/linux/tiwlan_drv.ko] undefined!
I'm not sure why I get that undefined error when I just built the core of the module.
Code:
make[2]: Entering directory `/home/gnychis/Documents/android/omap'
CC [M] /home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build/../../../../platforms/os/linux/src/WlanDrvIf.o
/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build/../../../../platforms/os/linux/src/WlanDrvIf.c: In function 'wlanDrvIf_Create':
/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build/../../../../platforms/os/linux/src/WlanDrvIf.c:855: error: implicit declaration of function 'create_freezeable_workqueue'
/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build/../../../../platforms/os/linux/src/WlanDrvIf.c:855: warning: assignment makes pointer from integer without a cast
make[3]: *** [/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build/../../../../platforms/os/linux/src/WlanDrvIf.o] Error 1
make[2]: *** [_module_/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build] Error 2
make[2]: Leaving directory `/home/gnychis/Documents/android/omap'
make[1]: *** [../../../../platforms/os/linux/build/tiwlan_drv_stub.o] Error 2
make[1]: Leaving directory `/home/gnychis/Documents/android/ti/wilink_6_1/platforms/os/linux/build'
make: *** [../../../platforms/os/linux/build/tiwlan_drv_stub.o] Error 2
Here is the full output:
http://pastebin.com/6T0UcWgw
solved, this function name (where i get the error), was renamed in the kernel version i'm using... discrepancies between english
freezable and freezeable

[Q][SOLVED] Kernel help

hi guys
i have been compiling a kernel and had a few sucessful builds but today i went to compile a new one because i deleted my zimage by misstake but now im facing these errors and for the life of me cant figure it out
here the error the compile spits out
Code:
CC drivers/cpufreq/cpufreq_smartass2.o
drivers/cpufreq/cpufreq_smartass2.c:122: error: static declaration of 'cpufreq_gov_smartass2' follows non-static declaration
include/linux/cpufreq.h:364: note: previous declaration of 'cpufreq_gov_smartass2' was here
make[2]: *** [drivers/cpufreq/cpufreq_smartass2.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
so any idea on how to fix this?
Solved by going though cpufreq_smartass2.c and changing everything that said smartass to smartass2
Thanks in advanced
Eoghan
eoghan2t7 said:
hi guys
i have been compiling a kernel and had a few sucessful builds but today i went to compile a new one because i deleted my zimage by misstake but now im facing these errors and for the life of me cant figure it out
here the error the compile spits out
Code:
CC drivers/cpufreq/cpufreq_smartass2.o
drivers/cpufreq/cpufreq_smartass2.c:122: error: static declaration of 'cpufreq_gov_smartass2' follows non-static declaration
include/linux/cpufreq.h:364: note: previous declaration of 'cpufreq_gov_smartass2' was here
make[2]: *** [drivers/cpufreq/cpufreq_smartass2.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
so any idea on how to fix this?
Solved by going though cpufreq_smartass2.c and changing everything that said smartass to smartass2
Thanks in advanced
Eoghan
Click to expand...
Click to collapse
I had this error with a custom governor, turns out I missed a capitalization spot. Problem solved.

make[1]: *** [mm/vmscan.o] Error 1

I'm building a CM13 appeared the following error when the kernel..
CC mm/vmscan.o
mm/vmscan.c: In function 'putback_inactive_pages':
mm/vmscan.c:1336:5: error: implicit declaration of function 'SetPageWasActive' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
scripts/Makefile.build:307: recipe for target 'mm/vmscan.o' failed
make[1]: *** [mm/vmscan.o] Error 1
Makefile:952: recipe for target 'mm' failed
make: *** [mm] Error 2
I got the same issue while building the CM13 kernel for the S5 (klte).
Did you manage to fix it?
newjanson said:
I got the same issue while building the CM13 kernel for the S5 (klte).
Did you manage to fix it?
Click to expand...
Click to collapse
did you manage to fix it ?
im trying to get cm14 kernel for klte working
Enable zcache

error compiling Slimmarsmallow for nexus 5

Im getting this error while compiling rom most probably in kernel,error log below
PHP:
Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /home/preshot2989/slim/kernel/lge/hammerhead/kernel/timeconst.pl line 373.
/home/preshot2989/slim/kernel/lge/hammerhead/kernel/Makefile:129: recipe for target 'kernel/timeconst.h' failed
make[3]: *** [kernel/timeconst.h] Error 255
/home/preshot2989/slim/kernel/lge/hammerhead/Makefile:950: recipe for target 'kernel' failed
make[2]: *** [kernel] Error 2
make[2]: *** Waiting for unfinished jobs....
just did a few search in xda and google found few solution but stiil the same
already installed bc ,updated perl in ubuntu 16.04LTS and switch to JDK 7.
Help would be appreciated
roshan2989 said:
Im getting this error while compiling rom most probably in kernel,error log below
PHP:
Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /home/preshot2989/slim/kernel/lge/hammerhead/kernel/timeconst.pl line 373.
/home/preshot2989/slim/kernel/lge/hammerhead/kernel/Makefile:129: recipe for target 'kernel/timeconst.h' failed
make[3]: *** [kernel/timeconst.h] Error 255
/home/preshot2989/slim/kernel/lge/hammerhead/Makefile:950: recipe for target 'kernel' failed
make[2]: *** [kernel] Error 2
make[2]: *** Waiting for unfinished jobs....
just did a few search in xda and google found few solution but stiil the same
already installed bc ,updated perl in ubuntu 16.04LTS and switch to JDK 7.
Help would be appreciated
Click to expand...
Click to collapse
You need to edit the Perl file like in this commit: https://gerrit.omnirom.org/#/c/12887/1/kernel/timeconst.pl

Need help with KVM-Enabled stock kernel compilation

I am having an issue when compiling the kernel with KVM Enabled options, I am using the stock google toolchain and I am compiling the stock OnePlus pie kernel :
In file included from arch/arm64/kvm/../../../arch/arm/kvm/arm.c:44:0:
./arch/arm64/include/asm/kvm_mmu.h: In function 'kvm_get_hyp_vector':
./arch/arm64/include/asm/kvm_mmu.h:328:3: error: implicit declaration of function 'has_vhe' [-Werror=implicit-function-declaration]
if (!has_vhe())
^
cc1: some warnings being treated as errors
scripts/Makefile.build:298: recipe for target 'arch/arm64/kvm/../../../arch/arm/kvm/arm.o' failed
make[1]: *** [arch/arm64/kvm/../../../arch/arm/kvm/arm.o] Error 1
AS arch/arm64/kernel/kuser32.o
Makefile:995: recipe for target 'arch/arm64/kvm' failed
make: *** [arch/arm64/kvm] Error 2

Categories

Resources