android-rpi/device_brcm_rpi3

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

marcosx86 opened this issue · 1 comments

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, ...) SYSCALL_DEFINEx(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, ...) SYSCALL_DEFINEx(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, ...) SYSCALL_DEFINEx(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, ...) SYSCALL_DEFINEx(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

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