0

I'm on Raspian Stretch and an RPi2. I'm trying to install xtables-addons-dkms. This was the output of apt-get on my first attempt:

Setting up xtables-addons-dkms (2.12-0.1) ...
Loading new xtables-addons-2.12 DKMS files...
It is likely that 4.14.79-v7+ belongs to a chroot's host
Building for 3.6-trunk-rpi, 4.14.79+ and 4.14.79-v7+
Building initial module for 3.6-trunk-rpi
Error!  Build of xt_ACCOUNT.ko failed for: 3.6-trunk-rpi (armv7l)
Consult the make.log in the build directory
/var/lib/dkms/xtables-addons/2.12/build/ for more information.
Setting up gcc-4.6 (4.6.4-5+rpi1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up linux-kbuild-3.6 (3.6-1~experimental.1+rpi2+b2) ...
Setting up linux-headers-3.6-trunk-rpi (3.6.9-1~experimental.1+rpi7) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.6-trunk-rpi
Error!  Build of xt_ACCOUNT.ko failed for: 3.6-trunk-rpi (armv7l)
Consult the make.log in the build directory
/var/lib/dkms/xtables-addons/2.12/build/ for more information.

linux-headers-3.6-trunk-rpi was pulled in automatically by apt-get. I'm not sure why as my kernel version is 4.14.79-v7+ going by uname -r. I've tried removing those headers and installing the raspberrypi-kernel-headers package. That at least seemed to install the correct headers for my kernel into /usr/src. However I still get similar errors:

Unpacking raspberrypi-kernel-headers (1.20181112-1) ...
Setting up raspberrypi-kernel-headers (1.20181112-1) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.14.79+
Error!  Build of xt_ACCOUNT.ko failed for: 4.14.79+ (armv7l)
Consult the make.log in the build directory
/var/lib/dkms/xtables-addons/2.12/build/ for more information.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.14.79-v7+
Error!  Build of xt_ACCOUNT.ko failed for: 4.14.79-v7+ (armv7l)
Consult the make.log in the build directory
/var/lib/dkms/xtables-addons/2.12/build/ for more information.

As the errors advise I consulted the make log and there's just a range of errors in there, the first one being:

make: Entering directory '/usr/src/linux-headers-4.14.79-v7+'
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.";      \

Edit: I have tried running the make oldconfig && make prepare command advised above (and as suggested by @MatsK). However it fails with this output:

  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
make[1]: *** No rule to make target 'arch/arm/tools/syscall.tbl', needed by 'arch/arm/include/generated/uapi/asm/unistd-common.h'.  Stop.
arch/arm/Makefile:319: recipe for target 'archheaders' failed
make: *** [archheaders] Error 2

There were also a couple of compiler errors in the make log e.g.

/var/lib/dkms/xtables-addons/2.12/build/extensions/xt_LOGMARK.c:90:11: error: implicit-function-declaration]
  else if (nf_ct_is_untracked(ct))
           ^~~~~~~~~~~~~~~~~~

And some other similar ones about implicit function declarations, not sure how important these are.

Any ideas as to what I might need to do to fix this?

  • Have you done what is recommended Run 'make oldconfig && make prepare' on kernel src to fix it. in the make log ? – MatsK Feb 15 at 2:30
  • @MatsK I just tried it, I get this: HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --oldconfig Kconfig # # configuration written to .config # scripts/kconfig/conf --silentoldconfig Kconfig make[1]: *** No rule to make target 'arch/arm/tools/syscall.tbl', needed by 'arch/arm/include/generated/uapi/asm/unistd-common.h'. Stop. arch/arm/Makefile:319: recipe for target 'archheaders' failed make: *** [archheaders] Error 2 – leveller Feb 15 at 2:40
  • Please add it to the question, the output is unreadable in the comment field. – MatsK Feb 15 at 2:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.