Building kernel fail

Post Reply
jit
Posts: 112
Joined: Mon Mar 30, 2015 4:10 pm
languages_spoken: english, french
ODROIDs: one odroid-w, two C0, one C1, two C1+, one C2, one XU4, one N1, four HC1
Contact:

Building kernel fail

Unread post by 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

User avatar
odroid
Site Admin
Posts: 29380
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: Building kernel fail

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

Did you build it natively?
viewtopic.php?f=150&t=30083#p215130

jit
Posts: 112
Joined: Mon Mar 30, 2015 4:10 pm
languages_spoken: english, french
ODROIDs: one odroid-w, two C0, one C1, two C1+, one C2, one XU4, one N1, four HC1
Contact:

Re: Building kernel fail

Unread post by 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.

User avatar
rooted
Posts: 6094
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Contact:

Re: Building kernel fail

Unread post by 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

jit
Posts: 112
Joined: Mon Mar 30, 2015 4:10 pm
languages_spoken: english, french
ODROIDs: one odroid-w, two C0, one C1, two C1+, one C2, one XU4, one N1, four HC1
Contact:

Re: Building kernel fail

Unread post by 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: 112
Joined: Mon Mar 30, 2015 4:10 pm
languages_spoken: english, french
ODROIDs: one odroid-w, two C0, one C1, two C1+, one C2, one XU4, one N1, four HC1
Contact:

Re: Building kernel fail

Unread post by 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: 112
Joined: Mon Mar 30, 2015 4:10 pm
languages_spoken: english, french
ODROIDs: one odroid-w, two C0, one C1, two C1+, one C2, one XU4, one N1, four HC1
Contact:

Re: Building kernel fail

Unread post by 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/

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest