Hi,
I have been trying to build vmlinux on Ubuntu 16.04 and also on Ubuntu 18.04 for kernel version 4.15.0-60-generic, with the relevant headers and latest sources.
However, I am getting this error:
root@suresh-ub1804-415:/usr/src/linux-source-4.15.0/linux-source-4.15.0# make modules_prepare
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
security/Kconfig:393:warning: defaults for choice values not supported
security/Kconfig:397:warning: defaults for choice values not supported
security/Kconfig:401:warning: defaults for choice values not supported
security/Kconfig:405:warning: defaults for choice values not supported
security/Kconfig:409:warning: defaults for choice values not supported
SYSTBL arch/x86/include/generated/asm/syscalls_32.h
SYSHDR arch/x86/include/generated/asm/unistd_32_ia32.h
SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h
SYSTBL arch/x86/include/generated/asm/syscalls_64.h
HYPERCALLS arch/x86/include/generated/asm/xen-hypercalls.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h
HOSTCC scripts/basic/bin2c
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/uapi/asm/bpf_perf_event.h
WRAP arch/x86/include/generated/asm/clkdev.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 arch/x86/purgatory/purgatory.o
AS arch/x86/purgatory/stack.o
AS arch/x86/purgatory/setup-x86_64.o
CC arch/x86/purgatory/sha256.o
AS arch/x86/purgatory/entry64.o
CC arch/x86/purgatory/string.o
LD arch/x86/purgatory/purgatory.ro
BIN2C arch/x86/purgatory/kexec-purgatory.c
CHK include/generated/timeconst.h
UPD include/generated/timeconst.h
CC kernel/bounds.s
CHK include/generated/bounds.h
UPD include/generated/bounds.h
GEN scripts/gdb/linux/constants.py
CC arch/x86/kernel/asm-offsets.s
CHK include/generated/asm-offsets.h
UPD include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
DESCEND objtool
HOSTCC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/fixdep.o
HOSTLD /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/fixdep-in.o
LINK /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/fixdep
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/exec-cmd.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/help.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/pager.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/parse-options.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/run-command.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/sigchain.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/subcmd-config.o
LD /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/libsubcmd-in.o
AR /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/libsubcmd.a
GEN /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/arch/x86/lib/inat-tables.c
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/arch/x86/decode.o
LD /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/arch/x86/objtool-in.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/builtin-check.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/builtin-orc.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/check.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/orc_gen.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/orc_dump.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/elf.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/special.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/objtool.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/libstring.o
CC /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/str_error_r.o
LD /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/objtool-in.o
LINK /usr/src/linux-source-4.15.0/linux-source-4.15.0/tools/objtool/objtool
HOSTCC scripts/genksyms/genksyms.o
SHIPPED scripts/genksyms/parse.tab.c
HOSTCC scripts/genksyms/parse.tab.o
SHIPPED scripts/genksyms/lex.lex.c
SHIPPED scripts/genksyms/parse.tab.h
HOSTCC scripts/genksyms/lex.lex.o
In file included from scripts/genksyms/lex.lex.c_shipped:1908:0:
scripts/genksyms/keywords.c:27:16: error: ‘BUILTIN_INT_KEYW’ undeclared here (not in a function); did you mean ‘INLINE_KEYW’?
{ "__int128", BUILTIN_INT_KEYW },
^~~~~~~~~~~~~~~~
INLINE_KEYW
scripts/Makefile.host:107: recipe for target 'scripts/genksyms/lex.lex.o' failed
make[2]: *** [scripts/genksyms/lex.lex.o] Error 1
scripts/Makefile.build:604: recipe for target 'scripts/genksyms' failed
make[1]: *** [scripts/genksyms] Error 2
Makefile:599: recipe for target 'scripts' failed
make: *** [scripts] Error 2
I have not done any other changes. Just installed the kernel-image, installed the headers and installed the kernel sources from UBuntu repository.
Can you please look into this.
regards,
Suresh