FS#2817 - compiler complain 'asm/types.h' file not found when compile kernel on osx 10.15 #7615
Labels
flyspray
kernel
pull request/issue with Linux kernel related changes
release/19.07
pull request/issue targeted (also) for OpenWrt 19.07 release
douo:
Compile on macOS 10.15.3 (19D76)
uname -a
Darwin TioudeMBP.lan 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64 x86_64 i386 MacBookPro11,5 Darwin
gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
make target/linux/compile V=sc
make[1]: Entering directory
/Volumes/Coder/docker/openwrt/openwrt' make[2]: Entering directory
/Volumes/Coder/docker/openwrt/openwrt/target/linux'make[3]: Entering directory
/Volumes/Coder/docker/openwrt/openwrt/target/linux/x86' rm -f /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/localversion /Volumes/Coder/docker/openwrt/openwrt/scripts/kconfig.pl + + /Volumes/Coder/docker/openwrt/openwrt/target/linux/generic/config-4.14 /Volumes/Coder/docker/openwrt/openwrt/target/linux/x86/config-4.14 /Volumes/Coder/docker/openwrt/openwrt/target/linux/x86/64/config-4.14 > /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.target awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' /Volumes/Coder/docker/openwrt/openwrt/.config >> /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.target echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.target echo "# CONFIG_KALLSYMS_ALL is not set" >> /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.target echo "CONFIG_KALLSYMS_UNCOMPRESSED=y" >> /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.target /Volumes/Coder/docker/openwrt/openwrt/scripts/package-metadata.pl kconfig /Volumes/Coder/docker/openwrt/openwrt/tmp/.packageinfo /Volumes/Coder/docker/openwrt/openwrt/.config 4.14 > /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.override /Volumes/Coder/docker/openwrt/openwrt/scripts/kconfig.pl 'm+' '+' /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.target /dev/null /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.override > /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.set mv /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.set /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.old grep -v INITRAMFS /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.old > /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.set echo 'CONFIG_INITRAMFS_SOURCE=""' >> /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.set echo '# CONFIG_INITRAMFS_FORCE is not set' >> /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.set rm -rf /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/modules cmp -s /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.set /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.prev || { cp /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.set /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config; cp /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.set /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.prev; } export MAKEFLAGS= ; [ -d /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/user_headers ] || /Library/Developer/CommandLineTools/usr/bin/make -C /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167 HOSTCFLAGS="-O2 -I/Volumes/Coder/docker/openwrt/openwrt/staging_dir/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="x86_64-openwrt-linux-musl-" ARCH="x86" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Wed Jan 29 16:05:35 2020" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/Volumes/Coder/docker/openwrt/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V=1 cmd_syscalls= KERNELRELEASE=4.14.167 CC="x86_64-openwrt-linux-musl-gcc" INSTALL_HDR_PATH=/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/user_headers headers_install grep '=[ym]' /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.config.set | LC_ALL=C sort | mkhash md5 > /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.vermagic touch /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.configured rm -f /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/vmlinux /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/System.map /Library/Developer/CommandLineTools/usr/bin/make -C /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167 HOSTCFLAGS="-O2 -I/Volumes/Coder/docker/openwrt/openwrt/staging_dir/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" CROSS_COMPILE="x86_64-openwrt-linux-musl-" ARCH="x86" KBUILD_HAVE_NLS=no KBUILD_BUILD_USER="" KBUILD_BUILD_HOST="" KBUILD_BUILD_TIMESTAMP="Wed Jan 29 16:05:35 2020" KBUILD_BUILD_VERSION="0" HOST_LOADLIBES="-L/Volumes/Coder/docker/openwrt/openwrt/staging_dir/host/lib" CONFIG_SHELL="bash" V=1 cmd_syscalls= KERNELRELEASE=4.14.167 CC="x86_64-openwrt-linux-musl-gcc" modules make[4]: Entering directory
/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167'/Library/Developer/CommandLineTools/usr/bin/make -f ./scripts/Makefile.build obj=arch/x86/entry/syscalls all
/Library/Developer/CommandLineTools/usr/bin/make -f ./scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
/Library/Developer/CommandLineTools/usr/bin/make -f ./scripts/Makefile.build obj=arch/x86/tools relocs
set -e; : ' CHK include/config/kernel.release'; mkdir -p include/config/; echo "4.14.167$(bash ./scripts/setlocalversion .)" < include/config/auto.conf > include/config/kernel.release.tmp; if [ -r include/config/kernel.release ] && cmp -s include/config/kernel.release include/config/kernel.release.tmp; then rm -f include/config/kernel.release.tmp; else : ' UPD include/config/kernel.release'; mv -f include/config/kernel.release.tmp include/config/kernel.release; fi
/Library/Developer/CommandLineTools/usr/bin/make -f ./scripts/Makefile.asm-generic
src=uapi/asm obj=arch/x86/include/generated/uapi/asm
/Library/Developer/CommandLineTools/usr/bin/make -f ./scripts/Makefile.asm-generic
src=asm obj=arch/x86/include/generated/asm
set -e; : ' CHK include/generated/uapi/linux/version.h'; mkdir -p include/generated/uapi/linux/; (echo #define LINUX_VERSION_CODE 265895; echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';) < Makefile > include/generated/uapi/linux/version.h.tmp; if [ -r include/generated/uapi/linux/version.h ] && cmp -s include/generated/uapi/linux/version.h include/generated/uapi/linux/version.h.tmp; then rm -f include/generated/uapi/linux/version.h.tmp; else : ' UPD include/generated/uapi/linux/version.h'; mv -f include/generated/uapi/linux/version.h.tmp include/generated/uapi/linux/version.h; fi
rm -f include/linux/version.h
set -e; : ' CHK include/generated/utsrelease.h'; mkdir -p include/generated/; if [
echo -n "4.14.167" | wc -c
-gt 64 ]; then echo '"4.14.167" exceeds 64 characters' >&2; exit 1; fi; (echo #define UTS_RELEASE "4.14.167";) < include/config/kernel.release > include/generated/utsrelease.h.tmp; if [ -r include/generated/utsrelease.h ] && cmp -s include/generated/utsrelease.h include/generated/utsrelease.h.tmp; then rm -f include/generated/utsrelease.h.tmp; else : ' UPD include/generated/utsrelease.h'; mv -f include/generated/utsrelease.h.tmp include/generated/utsrelease.h; fimkdir -p .tmp_versions ; rm -f .tmp_versions/*
/Library/Developer/CommandLineTools/usr/bin/make -f ./scripts/Makefile.build obj=.
mkdir -p kernel/
set -e; : ' CHK include/generated/bounds.h'; mkdir -p include/generated/; (set -e; echo "#ifndef LINUX_BOUNDS_H"; echo "#define LINUX_BOUNDS_H"; echo "/"; echo " * DO NOT MODIFY."; echo " "; echo " * This file was generated by Kbuild"; echo " /"; echo ""; sed -ne 's:^[[:space:]].ascii[[:space:]]"(.)".:\1:; /^->/{s:->#(.):/* \1 /:; s:^->([^ ]) [$#]([^ ]) (.):#define \1 \2 / \3 /:; s:->::; p;}'; echo ""; echo "#endif" ) < kernel/bounds.s > include/generated/bounds.h.tmp; if [ -r include/generated/bounds.h ] && cmp -s include/generated/bounds.h include/generated/bounds.h.tmp; then rm -f include/generated/bounds.h.tmp; else : ' UPD include/generated/bounds.h'; mv -f include/generated/bounds.h.tmp include/generated/bounds.h; fi
set -e; : ' CHK include/generated/timeconst.h'; mkdir -p include/generated/; (echo 100 | bc -q kernel/time/timeconst.bc ) < kernel/time/timeconst.bc > include/generated/timeconst.h.tmp; if [ -r include/generated/timeconst.h ] && cmp -s include/generated/timeconst.h include/generated/timeconst.h.tmp; then rm -f include/generated/timeconst.h.tmp; else : ' UPD include/generated/timeconst.h'; mv -f include/generated/timeconst.h.tmp include/generated/timeconst.h; fi
mkdir -p arch/x86/kernel/
set -e; : ' CHK include/generated/asm-offsets.h'; mkdir -p include/generated/; (set -e; echo "#ifndef ASM_OFFSETS_H"; echo "#define ASM_OFFSETS_H"; echo "/"; echo " * DO NOT MODIFY."; echo " "; echo " * This file was generated by Kbuild"; echo " /"; echo ""; sed -ne 's:^[[:space:]].ascii[[:space:]]"(.)".:\1:; /^->/{s:->#(.):/ \1 /:; s:^->([^ ]) [$#]([^ ]) (.):#define \1 \2 / \3 */:; s:->::; p;}'; echo ""; echo "#endif" ) < arch/x86/kernel/asm-offsets.s > include/generated/asm-offsets.h.tmp; if [ -r include/generated/asm-offsets.h ] && cmp -s include/generated/asm-offsets.h include/generated/asm-offsets.h.tmp; then rm -f include/generated/asm-offsets.h.tmp; else : ' UPD include/generated/asm-offsets.h'; mv -f include/generated/asm-offsets.h.tmp include/generated/asm-offsets.h; fi
mkdir -p ./tools
/Library/Developer/CommandLineTools/usr/bin/make LDFLAGS= MAKEFLAGS=" " O=/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167 subdir=tools -C ./tools/ objtool
mkdir -p /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool && /Library/Developer/CommandLineTools/usr/bin/make O=/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167 subdir=tools/objtool --no-print-directory -C objtool
error: unknown warning option '-Wstrict-aliasing=3'; did you mean '-Wstring-plus-int'? [-Werror,-Wunknown-warning-option]
/Library/Developer/CommandLineTools/usr/bin/make -C /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/build CFLAGS= LDFLAGS= /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool/fixdep
/Library/Developer/CommandLineTools/usr/bin/make -f /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/build/Makefile.build dir=. obj=fixdep
/Library/Developer/CommandLineTools/usr/bin/make -C /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/lib/subcmd/ OUTPUT=/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool/
/Library/Developer/CommandLineTools/usr/bin/make -C /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/build CFLAGS= LDFLAGS= /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool/fixdep
/Library/Developer/CommandLineTools/usr/bin/make -f /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/build/Makefile.build dir=. obj=fixdep
gcc -Wp,-MD,/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool/.exec-cmd.o.d -Wp,-MT,/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool/exec-cmd.o -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -fno-strict-aliasing -ggdb3 -Wall -Wextra -std=gnu99 -fPIC -O3 -Werror -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/include/ -D"BUILD_STR(s)=#s" -c -o /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool/exec-cmd.o exec-cmd.c
In file included from exec-cmd.c:2:
In file included from /Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/include/linux/compiler.h:89:
/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/include/linux/types.h:10:10: fatal error: 'asm/types.h' file not found
#include <asm/types.h>
^~~~~~~~~~~~~
1 error generated.
mv: cannot stat '/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool/.exec-cmd.o.tmp': No such file or directory
make[8]: *** [/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool/exec-cmd.o] Error 1
make[7]: *** [/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool/libsubcmd-in.o] Error 2
make[6]: *** [/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/objtool/libsubcmd.a] Error 2
make[5]: *** [objtool] Error 2
make[4]: *** [tools/objtool] Error 2
make[4]: Leaving directory
/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167' make[3]: *** [/Volumes/Coder/docker/openwrt/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/.modules] Error 2 make[3]: Leaving directory
/Volumes/Coder/docker/openwrt/openwrt/target/linux/x86'make[2]: *** [compile] Error 2
make[2]: Leaving directory
/Volumes/Coder/docker/openwrt/openwrt/target/linux' time: target/linux/compile#1.48#1.67#3.81 make[1]: *** [target/linux/compile] Error 2 make[1]: Leaving directory
/Volumes/Coder/docker/openwrt/openwrt'make: *** [target/linux/compile] Error 2
tree build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/include/asm
build_dir/target-x86_64_musl/linux-x86_64/linux-4.14.167/tools/include/asm
├── alternative-asm.h
├── atomic.h
├── barrier.h
├── bug.h
├── export.h
└── sections.h
The text was updated successfully, but these errors were encountered: