Folks,
I am trying to build cryptodev module.
I found that trying to build almost any kernel module fails.
I believe something wrong with kernel sources. I installed linux-headers-4.17.2-kirkwood-tld-1_1.0_armel.deb with dpkg, looks like that is not enough.
m-a prepare worked fine, but building module fails, probably due to wrongly installed kernel sources...
Can somebody advice what to do in such situation?
ayosher
I am trying to build cryptodev module.
I found that trying to build almost any kernel module fails.
I believe something wrong with kernel sources. I installed linux-headers-4.17.2-kirkwood-tld-1_1.0_armel.deb with dpkg, looks like that is not enough.
m-a prepare worked fine, but building module fails, probably due to wrongly installed kernel sources...
root@pogoplug:/home/cryptodev/cryptodev-linux# make V=1 make -C /lib/modules/4.17.2-kirkwood-tld-1/build M=/home/cryptodev/cryptodev-linux modules make[1]: Entering directory '/usr/src/linux-headers-4.17.2-kirkwood-tld-1' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/cryptodev/cryptodev-linux/.tmp_versions ; rm -f /home/cryptodev/cryptodev-linux/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/cryptodev/cryptodev-linux (cat /dev/null; echo kernel//home/cryptodev/cryptodev-linux/cryptodev.ko;) > /home/cryptodev/cryptodev-linux/modules.order gcc -Wp,-MD,/home/cryptodev/cryptodev-linux/.ioctl.o.d -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/6/include -I./arch/arm/include -I./arch/arm/include/generated -I./include -I./arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -DCONFIG_CC_STACKPROTECTOR -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -fno-dwarf2-cfi-asm -fno-ipa-sra -mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp -funwind-tables -marm -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=xscale -msoft-float -Uarm -fno-delete-null-pointer-checks -Wno-frame-address -Os -Wno-maybe-uninitialized --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-var-tracking-assignments -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -I/home/cryptodev/cryptodev-linux -DMODULE -DKBUILD_BASENAME='"ioctl"' -DKBUILD_MODNAME='"cryptodev"' -c -o /home/cryptodev/cryptodev-linux/.tmp_ioctl.o /home/cryptodev/cryptodev-linux/ioctl.c In file included from ./include/linux/netfilter.h:8:0, from ./include/linux/netfilter/nf_conntrack_tuple_common.h:6, from ./include/linux/netfilter/nf_conntrack_dccp.h:29, from ./include/net/netns/conntrack.h:11, from ./include/net/net_namespace.h:27, from ./include/linux/netdevice.h:42, from ./include/linux/rtnetlink.h:7, from /home/cryptodev/cryptodev-linux/ioctl.c:47: ./include/linux/if.h:28:54: fatal error: sys/socket.h: No such file or directory #include <sys/socket.h> /* for struct sockaddr. */ ^ compilation terminated. scripts/Makefile.build:312: recipe for target '/home/cryptodev/cryptodev-linux/ioctl.o' failed make[2]: *** [/home/cryptodev/cryptodev-linux/ioctl.o] Error 1 Makefile:1571: recipe for target '_module_/home/cryptodev/cryptodev-linux' failed make[1]: *** [_module_/home/cryptodev/cryptodev-linux] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.17.2-kirkwood-tld-1' Makefile:27: recipe for target 'build' failed make: *** [build] Error 2
Can somebody advice what to do in such situation?
ayosher