[lfs-support] Error compiling the kernel as a normal user.

Manuel Gonzalez Montoya manuel.gonzalez.montoya at gmail.com
Mon Oct 24 09:49:05 PDT 2016


I have always used root to compile/install when upgrading the kernel without a
problem, but today I tried the compilation part as a normal user and it failed
with the following error:

scripts/kconfig/conf  --silentoldconfig Kconfig
  SYSTBL  arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/entry/syscalls/../../include/generated/asm/syscalls_64.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_x32.h
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  WRAP    arch/x86/include/generated/asm/clkdev.h
  WRAP    arch/x86/include/generated/asm/cputime.h
  WRAP    arch/x86/include/generated/asm/dma-contiguous.h
  WRAP    arch/x86/include/generated/asm/early_ioremap.h
  WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
  WRAP    arch/x86/include/generated/asm/mm-arch-hooks.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CC      kernel/bounds.s
  CHK     include/generated/bounds.h
  UPD     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  UPD     include/generated/timeconst.h
  CC      arch/x86/kernel/asm-offsets.s
In file included from ./arch/x86/include/asm/unistd.h:23:0,
                 from ./arch/x86/include/asm/seccomp.h:4,
                 from ./include/linux/seccomp.h:11,
                 from ./include/linux/sched.h:43,
                 from ./include/linux/kasan.h:4,
                 from ./include/linux/slab.h:118,
                 from ./include/linux/crypto.h:24,
                 from arch/x86/kernel/asm-offsets.c:8:
./arch/x86/include/generated/uapi/asm/unistd_64.h:313:2: error:
invalid preprocessing directive #def
 #def
                                                                   ^~~
./arch/x86/include/generated/uapi/asm/unistd_64.h:313:5: warning: null
character(s) ignored
 #def

^
./arch/x86/include/generated/uapi/asm/unistd_64.h:1:0: error:
unterminated #ifndef
 #ifndef _ASM_X86_UNISTD_64_H

In file included from arch/x86/kernel/asm-offsets_64.c:9:0,
                 from arch/x86/kernel/asm-offsets.c:27:
./arch/x86/include/generated/asm/syscalls_64.h:372:26: warning: null
character(s) ignored
 #ifdef CONFIG_X86_X32_ABI
                          ^
./arch/x86/include/generated/asm/syscalls_64.h:372:0: error: unterminated #ifdef
 #ifdef CONFIG_X86_X32_ABI
In file included from arch/x86/kernel/asm-offsets_64.c:13:0,
                 from arch/x86/kernel/asm-offsets.c:27:
./arch/x86/include/generated/asm/syscalls_32.h:787:20: warning: null
character(s) ignored
 __SYSCALL_I386(336,
                    ^
In file included from arch/x86/kernel/asm-offsets_64.c:13:0,
                 from arch/x86/kernel/asm-offsets.c:27:
./arch/x86/include/generated/asm/syscalls_32.h:787:0: error:
unterminated argument list invoking macro "__SYSCALL_I386"
 __SYSCALL_I386(336,
                                                        CHK
include/generated/asm-offsets.h
  UPD     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
In file included from ./arch/x86/include/asm/unistd.h:23:0,
                 from <stdin>:2:
./arch/x86/include/generated/uapi/asm/unistd_64.h:313:2: error:
invalid preprocessing directive #def
 #def
                                                                   ^~~
./arch/x86/include/generated/uapi/asm/unistd_64.h:313:5: warning: null
character(s) ignored
 #def

^
./arch/x86/include/generated/uapi/asm/unistd_64.h:1:0: error:
unterminated #ifndef
 #ifndef _ASM_X86_UNISTD_64_H

<stdin>:1130:2: warning: #warning syscall getcpu not implemented [-Wcpp]
<stdin>:1217:2: warning: #warning syscall process_vm_readv not
implemented [-Wcpp]
<stdin>:1220:2: warning: #warning syscall process_vm_writev not
implemented [-Wcpp]
<stdin>:1223:2: warning: #warning syscall kcmp not implemented [-Wcpp]
<stdin>:1226:2: warning: #warning syscall finit_module not implemented [-Wcpp]
<stdin>:1229:2: warning: #warning syscall sched_setattr not implemented [-Wcpp]
<stdin>:1232:2: warning: #warning syscall sched_getattr not implemented [-Wcpp]
<stdin>:1235:2: warning: #warning syscall renameat2 not implemented [-Wcpp]
<stdin>:1238:2: warning: #warning syscall seccomp not implemented [-Wcpp]
<stdin>:1241:2: warning: #warning syscall getrandom not implemented [-Wcpp]
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
<stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
<stdin>:1250:2: warning: #warning syscall execveat not implemented [-Wcpp]
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
<stdin>:1301:2: warning: #warning syscall membarrier not implemented [-Wcpp]
<stdin>:1304:2: warning: #warning syscall mlock2 not implemented [-Wcpp]
<stdin>:1307:2: warning: #warning syscall copy_file_range not
implemented [-Wcpp]
<stdin>:1310:2: warning: #warning syscall preadv2 not implemented [-Wcpp]
<stdin>:1313:2: warning: #warning syscall pwritev2 not implemented [-Wcpp]
make[1]: *** [Kbuild:98: missing-syscalls] Error 1
make: *** [Makefile:1015: prepare0] Error 2


looking at the header files ./arch/x86/include/generated/asm/syscalls_64.h
./arch/x86/include/generated/asm/syscalls_32.h they cointain extraneos
characters at the end
it seems that they were not generated correctly.

Trying different kernel versions and the problem persist
As usual, in my case, using root the compilation finishes ok.

steps to reproduce:

wget -c https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.4.tar.xz
tar -xf linux-4.8.4.tar.xz
cd linux-4.8.4
make mrproper
cp /boot/config-4.8.1 .config
make oldconfig
make

What could be the problem ?.
any help is welcome.


More information about the lfs-support mailing list