android-rpi / device_brcm_rpi3

576 stars 253 forks source link

Compiling under GCC 8 (Debian 10) fails: kernel/fork.c: Error: .err encountered #129

Open marcosx86 opened 4 years ago

marcosx86 commented 4 years ago

Hello mister,

I'm trying to compile nougat branch using your manifest. Got this error log from zImage build... could you help?

kernel/fork.c:1223:1: note: in expansion of macro ‘SYSCALL_DEFINE1’ SYSCALL_DEFINE1(set_tid_address, int user *, tidptr) ^~~~~~~ include/linux/syscalls.h:195:18: warning: ‘sys_unshare’ alias between functions of incompatible types ‘long int(long unsigned int)’ and ‘long int(long int)’ [-Wattribute-alias] asmlinkage long sys##name(MAP(x,SC_DECL,VA_ARGS)) \ ^~~ include/linux/syscalls.h:191:2: note: in expansion of macro ‘SYSCALL_DEFINEx’ SYSCALL_DEFINEx(x, sname, __VA_ARGS) ^~~~~ include/linux/syscalls.h:182:36: note: in expansion of macro ‘SYSCALL_DEFINEx’

define SYSCALL_DEFINE1(name, ...) SYSCALLDEFINEx(1, ##name, __VA_ARGS__)

                                ^~~~~~~~~~~~~~~

kernel/fork.c:1980:1: note: in expansion of macro ‘SYSCALL_DEFINE1’ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags) ^~~~~~~ include/linux/syscalls.h:199:18: note: aliased declaration here asmlinkage long SyS##name(MAP(x,SC_LONG,VA_ARGS)) \ ^~~ include/linux/syscalls.h:191:2: note: in expansion of macro ‘SYSCALL_DEFINEx’ SYSCALL_DEFINEx(x, sname, __VA_ARGS__) ^~~~~ include/linux/syscalls.h:182:36: note: in expansion of macro ‘SYSCALL_DEFINEx’

define SYSCALL_DEFINE1(name, ...) SYSCALLDEFINEx(1, ##name, __VA_ARGS__)

                                ^~~~~~~~~~~~~~~

kernel/fork.c:1980:1: note: in expansion of macro ‘SYSCALL_DEFINE1’ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags) ^~~~~~~ include/linux/syscalls.h:195:18: warning: ‘sys_clone’ alias between functions of incompatible types ‘long int(long unsigned int, long unsigned int, int , long unsigned int, int )’ and ‘long int(long int, long int, long int, long int, long int)’ [-Wattribute-alias] asmlinkage long sys##name(MAP(x,SC_DECL,VA_ARGS)) \ ^~~ include/linux/syscalls.h:191:2: note: in expansion of macro ‘SYSCALL_DEFINEx’ SYSCALL_DEFINEx(x, sname, __VA_ARGS__) ^~~~~ include/linux/syscalls.h:186:36: note: in expansion of macro ‘SYSCALL_DEFINEx’

define SYSCALL_DEFINE5(name, ...) SYSCALLDEFINEx(5, ##name, __VA_ARGS__)

                                ^~~~~~~~~~~~~~~

kernel/fork.c:1833:1: note: in expansion of macro ‘SYSCALL_DEFINE5’ SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp, ^~~~~~~ include/linux/syscalls.h:199:18: note: aliased declaration here asmlinkage long SyS##name(MAP(x,SC_LONG,VA_ARGS)) \ ^~~ include/linux/syscalls.h:191:2: note: in expansion of macro ‘SYSCALL_DEFINEx’ SYSCALL_DEFINEx(x, sname, __VA_ARGS__) ^~~~~ include/linux/syscalls.h:186:36: note: in expansion of macro ‘SYSCALL_DEFINEx’

define SYSCALL_DEFINE5(name, ...) SYSCALLDEFINEx(5, ##name, __VA_ARGS__)

                                ^~~~~~~~~~~~~~~

kernel/fork.c:1833:1: note: in expansion of macro ‘SYSCALL_DEFINE5’ SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp, ^~~~~~~ /tmp/ccVIBIjM.s: Assembler messages: /tmp/ccVIBIjM.s:2006: Error: .err encountered make[1]: [scripts/Makefile.build:259: kernel/fork.o] Error 1 make: [Makefile:961: kernel] Error 2

primexshen commented 2 years ago

This is because of the very old linux tag that the rpi kernel is on. I came across this (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1414002) report and kept following until i found the exact fix for this issue.

I have upstreamed the kernel to 4.4.148 and now it builds fine again. Use this kernel source: https://github.com/primexshen/kernel_rpi