Building kernel fail

Moderators: mdrjr, odroid

Building kernel fail

Unread postby jit » Wed May 30, 2018 6:42 am

I'm trying to build kernel from a fresh git clone of branch odroidn1-4.4.y, but I'm facing some errors.
Is there anything to do after "make odroidn1_defconfig" and launching make ?

Code: Select all
arch/arm64/kernel/vdso.c: In function 'vdso_init':
arch/arm64/kernel/vdso.c:119:6: warning: 'memcmp' reading 4 bytes from a region of size 1 [-Wstringop-overflow=]
error, forbidden warning: vdso.c:119
  LD      arch/arm64/crypto/ghash-ce.o
make[1]: *** [scripts/Makefile.build:277: arch/arm64/kernel/vdso.o] Error 1
make: *** [Makefile:1011: arch/arm64/kernel] Error 2
  LD      arch/arm64/crypto/aes-ce-ccm.o
  LD      arch/arm64/crypto/aes-ce-blk.o
  CC      mm/oom_kill.o
  CC      arch/arm64/mm/mmu.o
  CC      arch/arm64/mm/context.o
  AS      arch/arm64/mm/proc.o
  LD      arch/arm64/crypto/built-in.o
  CC      arch/arm64/mm/pageattr.o
  CC      mm/maccess.o
  CC      mm/page_alloc.o
  CC      mm/page-writeback.o
  CC      mm/readahead.o
  LD      arch/arm64/mm/built-in.o
  CC      mm/swap.o
  CC      mm/truncate.o
  CC      mm/vmscan.o
In file included from mm/readahead.c:18:
include/linux/syscalls.h:195:18: warning: 'sys_readahead' alias between functions of incompatible types 'long int(int,  loff_t,  size_t)' {aka 'long int(int,  long long int,  long unsigned int)'} and 'long int(long int,  long long int,  long int)' [-Wattribute-alias]
error, forbidden warning: syscalls.h:195
make[1]: *** [scripts/Makefile.build:277: mm/readahead.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1011: mm] Error 2
jit
 
Posts: 107
Joined: Mon Mar 30, 2015 4:10 pm
languages_spoken: english, french
ODROIDs: odroid-w, 1x C0, 1x C1, 2x C1+, 1x C2, 1x XU4

Re: Building kernel fail

Unread postby odroid » Wed May 30, 2018 9:22 am

Did you build it natively?
viewtopic.php?f=150&t=30083#p215130
User avatar
odroid
Site Admin
 
Posts: 28859
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Building kernel fail

Unread postby jit » Wed May 30, 2018 2:24 pm

Yes I followwd this thread.
I juste added option --depth 1 to git clone for a faster download.
jit
 
Posts: 107
Joined: Mon Mar 30, 2015 4:10 pm
languages_spoken: english, french
ODROIDs: odroid-w, 1x C0, 1x C1, 2x C1+, 1x C2, 1x XU4

Re: Building kernel fail

Unread postby rooted » Wed May 30, 2018 3:24 pm

I'm building now, I will let you know if I meet the same error.

*edit*
I cloned (--depth 1) and built without issue.

https://i.imgur.com/IZaGuUO.png

After rebooting

Code: Select all
 root@odroid:~# uname -a
Linux odroid 4.4.114 #1 SMP Wed May 30 01:32:32 CDT 2018 aarch64 GNU/Linux
User avatar
rooted
 
Posts: 5680
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english
ODROIDs: C1, C1+, C2
XU3 Lite, XU4
N1
VU7+
HiFi Shield 2
Smart Power (original)

Re: Building kernel fail

Unread postby jit » Fri Jun 01, 2018 6:15 am

thank you for the test. Obviously something on my side... I will try to investigate a bit more. Maybe the fact that I'm building on ArchLinux.
jit
 
Posts: 107
Joined: Mon Mar 30, 2015 4:10 pm
languages_spoken: english, french
ODROIDs: odroid-w, 1x C0, 1x C1, 2x C1+, 1x C2, 1x XU4

Re: Building kernel fail

Unread postby jit » Fri Jun 01, 2018 7:02 am

Ok it seems to be related to gcc 8 (8.1 in my case).
I can remove most errors by using the flag -Wstringop-overflow=0, but I still have to remove errors related to -Wattribute-alias (seems a default option in gcc 8)
jit
 
Posts: 107
Joined: Mon Mar 30, 2015 4:10 pm
languages_spoken: english, french
ODROIDs: odroid-w, 1x C0, 1x C1, 2x C1+, 1x C2, 1x XU4

Re: Building kernel fail

Unread postby jit » Mon Jun 04, 2018 3:23 am

Just for info, I found some patch that seem to eliminate most of error, but there is one remaining I'm not able to correct :
Code: Select all
include/linux/syscalls.h:195:2: warning: data definition has no type or storage class


Patches I found are here : https://patchwork.kernel.org/patch/10093317/
jit
 
Posts: 107
Joined: Mon Mar 30, 2015 4:10 pm
languages_spoken: english, french
ODROIDs: odroid-w, 1x C0, 1x C1, 2x C1+, 1x C2, 1x XU4


Return to Issues

Who is online

Users browsing this forum: No registered users and 2 guests