Source: suricata Version: 1:4.1.4-4 Severity: serious Tags: patch upstream ftbfs Justification: fails to build from source (but built successfully in the past)
suricata fails to build with recent kernel versions: | gcc -DHAVE_CONFIG_H -I. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/lib/mips-linux-gnu/htp/include -I/usr/include/nspr -I/usr/include/nspr -I/usr/include/nss -I/usr/include/nspr -I/usr/include/nss -I/usr/include/luajit-2.1 -I/usr/include -Wextra -Werror-implicit-function-declaration -fstack-protector -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -I/usr/include -DLOCAL_STATE_DIR=\"/var\" -std=gnu99 -Wall -Wno-unused-parameter -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wwrite-strings -Wbad-function-cast -Wformat-security -Wno-format-nonliteral -Wmissing-format-attribute -funsigned-char -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o source-af-packet.o source-af-packet.c | source-af-packet.c: In function ‘AFPRead’: | source-af-packet.c:646:28: error: ‘SIOCGSTAMP’ undeclared (first use in this function); did you mean ‘SIOCGRARP’? | if (ioctl(ptv->socket, SIOCGSTAMP, &p->ts) == -1) { | ^~~~~~~~~~ | SIOCGRARP | source-af-packet.c:646:28: note: each undeclared identifier is reported only once for each function it appears in | source-af-packet.c: In function ‘AFPReadAndDiscard’: | source-af-packet.c:1308:28: error: ‘SIOCGSTAMP’ undeclared (first use in this function); did you mean ‘SIOCGRARP’? | if (ioctl(ptv->socket, SIOCGSTAMP, &ts) == -1) { | ^~~~~~~~~~ | SIOCGRARP | make[4]: *** [Makefile:2129: source-af-packet.o] Error 1 | make[4]: *** Waiting for unfinished jobs.... | make[4]: Leaving directory '/<<PKGBUILDDIR>>/src' | make[3]: *** [Makefile:499: all-recursive] Error 1 | make[3]: Leaving directory '/<<PKGBUILDDIR>>' | make[2]: *** [Makefile:425: all] Error 2 | make[2]: Leaving directory '/<<PKGBUILDDIR>>' | dh_auto_build: make -j2 returned exit code 2 | make[1]: *** [debian/rules:57: override_dh_auto_build] Error 255 | make[1]: Leaving directory '/<<PKGBUILDDIR>>' | make: *** [debian/rules:79: build-arch] Error 2 | dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit status 2 A full build log is available there: https://buildd.debian.org/status/fetch.php?pkg=suricata&arch=mips&ver=1%3A4.1.4-4&stamp=1565301229&raw=0 or there: https://tests.reproducible-builds.org/debian/rbuild/unstable/amd64/suricata_4.1.4-4.rbuild.log.gz The issue is due to the following change in the kernel headers, that has been merged in kernel 5.2: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0768e17073dc527ccd18ed5f96ce85f9985e9115 Upstream has published a fix here: https://github.com/OISF/suricata/blob/master/src/source-af-packet.c