xtables-addons-common fails to install

Bug #1779272 reported by Paul Hirst
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

Trying to install xtables-addons-common on a clean raspbian 2018-06-27 install on a Pi3:

root@lab-pi:~# uname -a
Linux lab-pi 4.14.50-v7+ #1122 SMP Tue Jun 19 12:26:26 BST 2018 armv7l GNU/Linux
root@lab-pi:~# dpkg -s libc6 | grep ^Version
Version: 2.24-11+deb9u3

root@lab-pi:~# apt-get install xtables-addons-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  cpp-4.6 gcc-4.6 linux-headers-3.6-trunk-common linux-headers-3.6-trunk-rpi linux-kbuild-3.6 xtables-addons-dkms
Suggested packages:
  gcc-4.6-locales libmudflap0-4.6-dev gcc-4.6-doc libgcc1-dbg libgomp1-dbg libquadmath-dbg libmudflap0-dbg libcloog-ppl1 | libcloog-ppl0 libppl-c4 libppl12
  | libppl9 binutils-gold libtext-csv-xs-perl
The following NEW packages will be installed:
  cpp-4.6 gcc-4.6 linux-headers-3.6-trunk-common linux-headers-3.6-trunk-rpi linux-kbuild-3.6 xtables-addons-common xtables-addons-dkms
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.2 MB/13.6 MB of archives.
After this operation, 51.2 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrors.ocf.berkeley.edu/raspbian/raspbian stretch/main armhf cpp-4.6 armhf 4.6.4-5+rpi1 [4,145 kB]
Get:2 http://mirrors.ocf.berkeley.edu/raspbian/raspbian stretch/main armhf gcc-4.6 armhf 4.6.4-5+rpi1 [4,363 kB]
Get:3 http://mirrors.ocf.berkeley.edu/raspbian/raspbian stretch/main armhf linux-headers-3.6-trunk-common armhf 3.6.9-1~experimental.1+rpi7 [4,189 kB]
Get:4 http://mirrors.ocf.berkeley.edu/raspbian/raspbian stretch/main armhf linux-kbuild-3.6 armhf 3.6-1~experimental.1+rpi2+b2 [136 kB]
Get:5 http://mirrors.ocf.berkeley.edu/raspbian/raspbian stretch/main armhf linux-headers-3.6-trunk-rpi armhf 3.6.9-1~experimental.1+rpi7 [414 kB]
Fetched 13.2 MB in 9s (1,446 kB/s)
Selecting previously unselected package cpp-4.6.
(Reading database ... 115505 files and directories currently installed.)
Preparing to unpack .../0-cpp-4.6_4.6.4-5+rpi1_armhf.deb ...
Unpacking cpp-4.6 (4.6.4-5+rpi1) ...
Selecting previously unselected package gcc-4.6.
Preparing to unpack .../1-gcc-4.6_4.6.4-5+rpi1_armhf.deb ...
Unpacking gcc-4.6 (4.6.4-5+rpi1) ...
Selecting previously unselected package linux-headers-3.6-trunk-common.
Preparing to unpack .../2-linux-headers-3.6-trunk-common_3.6.9-1~experimental.1+rpi7_armhf.deb ...
Unpacking linux-headers-3.6-trunk-common (3.6.9-1~experimental.1+rpi7) ...
Selecting previously unselected package linux-kbuild-3.6.
Preparing to unpack .../3-linux-kbuild-3.6_3.6-1~experimental.1+rpi2+b2_armhf.deb ...
Unpacking linux-kbuild-3.6 (3.6-1~experimental.1+rpi2+b2) ...
Selecting previously unselected package linux-headers-3.6-trunk-rpi.
Preparing to unpack .../4-linux-headers-3.6-trunk-rpi_3.6.9-1~experimental.1+rpi7_armhf.deb ...
Unpacking linux-headers-3.6-trunk-rpi (3.6.9-1~experimental.1+rpi7) ...
Selecting previously unselected package xtables-addons-common.
Preparing to unpack .../5-xtables-addons-common_2.12-0.1_armhf.deb ...
Unpacking xtables-addons-common (2.12-0.1) ...
Selecting previously unselected package xtables-addons-dkms.
Preparing to unpack .../6-xtables-addons-dkms_2.12-0.1_all.deb ...
Unpacking xtables-addons-dkms (2.12-0.1) ...
Setting up cpp-4.6 (4.6.4-5+rpi1) ...
Setting up linux-headers-3.6-trunk-common (3.6.9-1~experimental.1+rpi7) ...
Setting up xtables-addons-common (2.12-0.1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up xtables-addons-dkms (2.12-0.1) ...
Loading new xtables-addons-2.12 DKMS files...
It is likely that 4.14.50-v7+ belongs to a chroot's host
Building for 3.6-trunk-rpi, 4.14.50+ and 4.14.50-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.
root@lab-pi:~#

In /var/lib/dkms/xtables-addons/2.12/build/make.log I see:
DKMS make.log for xtables-addons-2.12 for kernel 3.6-trunk-rpi (armv7l)
...
/var/lib/dkms/xtables-addons/2.12/build/extensions/compat_xtables.h:12:3: warning: #warning Kernels below 3.7 not supported. [-Wcpp]
In file included from /var/lib/dkms/xtables-addons/2.12/build/extensions/xt_DNETMAP.c:37:0:
/var/lib/dkms/xtables-addons/2.12/build/extensions/xt_DNETMAP.h:16:22: error: field ‘prefix’ has incomplete type

and it fails. But why is it trying to build against kernel 3.6 headers? Well xtables-addons-common seems to be pulling in linux-headers-3.6-trunk-common linux-headers-3.6-trunk-rpi linux-kbuild-3.6 whereas of course I'm running 4.14.50-v7+ #1122.

So, OK, I start over, but this time I manually apt-get install raspberrypi-kernel-headers first which does appear to get me the correct kernel headers.

This helps, but still fails:

root@lab-pi:~# apt-get install xtables-addons-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  dkms xtables-addons-dkms
Suggested packages:
  python3-apport menu libtext-csv-xs-perl
The following NEW packages will be installed:
  dkms xtables-addons-common xtables-addons-dkms
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 415 kB of archives.
After this operation, 2,146 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrors.ocf.berkeley.edu/raspbian/raspbian stretch/main armhf dkms all 2.3-2 [74.8 kB]
Get:2 http://mirrors.ocf.berkeley.edu/raspbian/raspbian stretch/main armhf xtables-addons-common armhf 2.12-0.1 [55.9 kB]
Get:3 http://mirrors.ocf.berkeley.edu/raspbian/raspbian stretch/main armhf xtables-addons-dkms all 2.12-0.1 [284 kB]
Fetched 415 kB in 1s (209 kB/s)
Selecting previously unselected package dkms.
(Reading database ... 147827 files and directories currently installed.)
Preparing to unpack .../archives/dkms_2.3-2_all.deb ...
Unpacking dkms (2.3-2) ...
Selecting previously unselected package xtables-addons-common.
Preparing to unpack .../xtables-addons-common_2.12-0.1_armhf.deb ...
Unpacking xtables-addons-common (2.12-0.1) ...
Selecting previously unselected package xtables-addons-dkms.
Preparing to unpack .../xtables-addons-dkms_2.12-0.1_all.deb ...
Unpacking xtables-addons-dkms (2.12-0.1) ...
Setting up xtables-addons-common (2.12-0.1) ...
Setting up dkms (2.3-2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up xtables-addons-dkms (2.12-0.1) ...
Loading new xtables-addons-2.12 DKMS files...
It is likely that 4.14.50-v7+ belongs to a chroot's host
Building for 4.14.50+ and 4.14.50-v7+
Building initial module for 4.14.50+
Error! Build of xt_ACCOUNT.ko failed for: 4.14.50+ (armv7l)
Consult the make.log in the build directory
/var/lib/dkms/xtables-addons/2.12/build/ for more information.
Processing triggers for man-db (2.7.6.1-2) ...
root@lab-pi:~#

In /var/lib/dkms/xtables-addons/2.12/build/make.log :

---
  gcc -Wp,-MD,/var/lib/dkms/xtables-addons/2.12/build/extensions/.xt_TARPIT.o.d -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabihf/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 ./i
nclude/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implici
t-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -fno-ipa-sra -mabi=aapcs-linux
 -mno-thumb-interwork -mfpu=vfp -funwind-tables -marm -D__LINUX_ARM_ARCH__=6 -march=armv6k -mtune=arm1136j-s -msoft-float -Uarm -fno-delete-null-pointer-checks -Wn
o-frame-address -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -Wno-unused-cons
t-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overfl
ow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatib
le-pointer-types -Werror=designated-init -DMODULE -DKBUILD_BASENAME='"xt_TARPIT"' -DKBUILD_MODNAME='"xt_TARPIT"' -c -o /var/lib/dkms/xtables-addons/2.12/build/e
xtensions/.tmp_xt_TARPIT.o /var/lib/dkms/xtables-addons/2.12/build/extensions/xt_TARPIT.c
/var/lib/dkms/xtables-addons/2.12/build/extensions/xt_LOGMARK.c: In function ‘logmark_tg’:
/var/lib/dkms/xtables-addons/2.12/build/extensions/xt_LOGMARK.c:90:11: error: implicit declaration of function ‘nf_ct_is_untracked’ [-Werror=implicit-function-decl
aration]
  else if (nf_ct_is_untracked(ct))
           ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:334: recipe for target '/var/lib/dkms/xtables-addons/2.12/build/extensions/xt_LOGMARK.o' failed
---

and sure enough, it appears that nf_ct_is_untracked() was indeed removed from the kernel recently and this is accounted for in more recent versions of xtables-addons: http://patchwork.ozlabs.org/patch/762136/

So in summary, seems like the solution is moving to a newer version of xtables-addons, and fixing the dependency to be the correct kernel headers.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.