Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 486864 - net-firewall/xtables-addons-2.1 - .../work/xtables-addons-2.1/extensions/pknock/xt_pknock.c:194:41: error: dereferencing pointer to incomplete type
Summary: net-firewall/xtables-addons-2.1 - .../work/xtables-addons-2.1/extensions/pkno...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreis Vinogradovs ( slepnoga )
Depends on: 488016
  Show dependency tree
Reported: 2013-10-03 11:14 UTC by Matti Nykyri
Modified: 2014-06-27 07:40 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

Build.log net-firewall/xtables-addons-2.1 (net-firewall:xtables-addons-2.1:20131003-104637.log,23.19 KB, text/plain)
2013-10-03 11:16 UTC, Matti Nykyri
Build.log net-firewall/xtables-addons-2.2 (net-firewall:xtables-addons-2.2:20131003-104913.log,23.22 KB, text/plain)
2013-10-03 11:17 UTC, Matti Nykyri
Environment: net-firewall/xtables-addons-2.1 (environment-2.1,126.49 KB, text/plain)
2013-10-03 11:17 UTC, Matti Nykyri
Environment: net-firewall/xtables-addons-2.2 (environment-2.2,126.50 KB, text/plain)
2013-10-03 11:18 UTC, Matti Nykyri
Patch to fix error as it is done upstream in version 2.3 (xtables-addons-2.1-pknock.patch,1.76 KB, patch)
2013-10-06 16:53 UTC, Matti Nykyri
Details | Diff
New ebuild for v2.1 that uses the previous patch (xtables-addons-2.1-r1.ebuild,5.02 KB, text/plain)
2013-10-06 16:54 UTC, Matti Nykyri
And an ebuild also for version 2.2 (xtables-addons-2.2-r1.ebuild,5.02 KB, text/plain)
2013-10-06 16:55 UTC, Matti Nykyri

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Nykyri 2013-10-03 11:14:43 UTC
xtables_addons_pknock port knocking extension fails to compile with multiple errors on net-firewall/xtables-addons-2.1 & net-firewall/xtables-addons-2.2. Problem is fixed on upstream in version net-firewall/xtables-addons-2.3, which compiles without errors.

On 2.1 & 2.2:

/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c: In function ‘pknock_seq_start’:
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c:194:41: error: dereferencing pointer to incomplete type
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c: In function ‘pknock_seq_next’:
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c:214:41: error: dereferencing pointer to incomplete type
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c: In function ‘pknock_seq_show’:
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c:247:41: error: dereferencing pointer to incomplete type
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c: In function ‘pknock_proc_open’:
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c:298:3: error: implicit declaration of function ‘PDE’ [-Werror=implicit-function-declaration]
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c:298:15: warning: assignment makes pointer from integer without a cast [enabled by default]
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c: In function ‘add_rule’:
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c:481:2: error: implicit declaration of function ‘create_proc_entry’ [-Werror=implicit-function-declaration]
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c:481:20: warning: assignment makes pointer from integer without a cast [enabled by default]
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c:485:19: error: dereferencing pointer to incomplete type
/var/tmp/portage/net-firewall/xtables-addons-2.2/work/xtables-addons-2.2/extensions/pknock/xt_pknock.c:486:19: error: dereferencing pointer to incomplete type
cc1: some warnings being treated as errors

Reproducible: Always

Steps to Reproduce:
1. Set use flag xtables_addons_pknock
2. Compile

Actual Results:  
Fails due to errors

Expected Results:  
Should compile without errors. This is fixed in net-firewall/xtables-addons-2.3

emerge --info:

Portage 2.2.1 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.15-r3, 3.10.7-gentoo-r1-roi x86_64)
                         System Settings
System uname: Linux-3.10.7-gentoo-r1-roi-x86_64-AMD_Athlon-tm-_64_Processor_3800+-with-gentoo-2.2
KiB Mem:     3076816 total,    744888 free
KiB Swap:   16777212 total,  16752944 free
Timestamp of tree: Tue, 01 Oct 2013 13:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r2, 3.2.5-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo savonet
CFLAGS="-march=k8 -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind /var/yp/Makefile"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="3dnow X a52 aac acl acpi alsa amarok amd64 apm arts avahi avi berkdb bineditor bitmap-fonts bittorrent bluetooth bootsplash branding bzip2 cairo calendar caps cdda cddb cdio cdr celt chroot clamav clamd cli consolekit cracklib crypt crypto_libgcrypt crypto_openssl css cups cxx dbus dc1394 dcc declarative dga dirac directfb dlloader dmi dolby-record-switch dri dts dv dvb dvbplayer dvd dvdr dvdread dx eds emacs emacs-w3 emboss encode esd ethereal examples exif faad fam fbcon fbsplash ffmpeg fi firefox flac font-server fortran ftp ftruncate g3dvl gd gdbm gif gimp glut gmp gpm gs gsm gstreamer gtk gzip h323 hal http httpd iconv id3tag ieee1394 imap ipv6 isdnlog j2ee jai java javacomm javascript jbig jce jcs jmx joystick jpeg jpeg2k jumpplay kde kipi kontact lcms ldap libclamav libg++ libnotify linuxthreads-tls live lm_sensors mad maildir matroska mcal messages mikmod mime ming mmx mmxext mng modules mozilla mp3 mp4 mp4live mpeg mpeg2 mplayer msn mudflap multilib mysql nagios-ntp nagios-ssh nas ncurses network new-login nforce2 nfs nls nntp nptl nptlonly nsplugin ntfs nvidia nvtv objc objc++ office ogg on-the-fly-crypt openal opengl openmp pam pango pcre pdf pdflib perl perlsuid phonon php plasma pmu png policykit postgres ppds pppd python qt qt3support qt4 qtscript quicktime quotas readline reflection rtc rtsp samba schroedinger scp sdl sdl-image semantic-desktop session sftp shout sip skins sockets speex spell spl sqlite sse sse2 ssl startup-notification stream svg tcpd themes theora threads tiff transcode truetype truetype-fonts twolame type1-fonts udev udisks unicode upower usb v4l v4l2 vcd vdpau vfat vlm vorbis widescreen win32codecs wma wxwidgets wxwindows x264 xcb xcomposite xfs xine xinerama xml xorg xosd xscreensaver xv xvid xvmc zlib zrtp" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US fi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia vga vesa fbdev" XTABLES_ADDONS="geoip pknock"
Comment 1 Matti Nykyri 2013-10-03 11:16:40 UTC
Created attachment 360022 [details]
Build.log net-firewall/xtables-addons-2.1
Comment 2 Matti Nykyri 2013-10-03 11:17:05 UTC
Created attachment 360024 [details]
Build.log net-firewall/xtables-addons-2.2
Comment 3 Matti Nykyri 2013-10-03 11:17:43 UTC
Created attachment 360026 [details]
Environment: net-firewall/xtables-addons-2.1
Comment 4 Matti Nykyri 2013-10-03 11:18:04 UTC
Created attachment 360028 [details]
Environment: net-firewall/xtables-addons-2.2
Comment 5 Matti Nykyri 2013-10-03 11:21:14 UTC
emerge -pqv \=net-firewall/xtables-addons-2.1:

[ebuild     U ] net-firewall/xtables-addons-2.1 [1.45] USE="modules" XTABLES_ADDONS="geoip pknock -account -chaos -condition -delude -dhcpmac -dnetmap -echo -fuzzy -gradm -iface -ipmark -ipp2p -ipv4options -length2 -logmark -lscan -psd -quota2 -rawnat -steal -sysrq -tarpit" 

emerge -pqv \=net-firewall/xtables-addons-2.2:

[ebuild     U ] net-firewall/xtables-addons-2.2 [1.45] USE="modules" XTABLES_ADDONS="geoip pknock -account -chaos -condition -delude -dhcpmac -dnetmap -echo -fuzzy -gradm -iface -ipmark -ipp2p -ipv4options -length2 -logmark -lscan -psd -quota2 -rawnat -steal -sysrq -tarpit"
Comment 6 Matti Nykyri 2013-10-06 16:53:06 UTC
Created attachment 360248 [details, diff]
Patch to fix error as it is done upstream in version 2.3
Comment 7 Matti Nykyri 2013-10-06 16:54:34 UTC
Created attachment 360250 [details]
New ebuild for v2.1 that uses the previous patch
Comment 8 Matti Nykyri 2013-10-06 16:55:22 UTC
Created attachment 360252 [details]
And an ebuild also for version 2.2
Comment 9 Matti Nykyri 2013-10-06 16:57:44 UTC
With this patch both versions 2.1 and 2.2 compile for me without any errors.
Comment 10 Maxim Koltsov gentoo-dev 2013-10-14 14:11:15 UTC
2.2 will be deleted after 2.3 goes stable
Comment 11 Matti Nykyri 2013-10-15 13:44:48 UTC
<=net-firewall/xtables-addons-2.2 supports kernel versions <3.10. 

From kernel versions >=3.10 at least >=net-firewall/xtables-addons-2.3 is needed!

See the link (commits in June for 3.10 kernel):
Comment 12 Andreis Vinogradovs ( slepnoga ) 2013-11-04 08:06:13 UTC
(In reply to Matti Nykyri from comment #11)
> <=net-firewall/xtables-addons-2.2 supports kernel versions <3.10. 
> From kernel versions >=3.10 at least >=net-firewall/xtables-addons-2.3 is
> needed!
> See the link (commits in June for 3.10 kernel):

I can not confirm the accuracy of this statement.
Comment 13 Matti Nykyri 2013-11-04 11:31:29 UTC
xtables-addons-2.1 depends on kernel functions PDE and create_proc_entry (defined in linux/proc_fs.h).

PDE is made internal to procfs in kernel on 2013-05-01 ( This commit is published with 3.10 kernel. 3.9.11 [EOL] does not contain this commit.

create_proc_entry is killed from kernel on 2013-04-09 ( This commit is published with 3.10 kernel. 3.9.11 [EOL] does not contain this commit.

xtables-addons-2.3 replases function PDE with PDE_DATA (PDE_DATA is only present in 3.10 kernels In xtables-addons create_proc_entry is replased with proc_create_data function.
Comment 14 Andreis Vinogradovs ( slepnoga ) 2014-06-26 18:45:40 UTC
please test new version
Comment 15 Matti Nykyri 2014-06-26 20:08:44 UTC
With kernels >=3.10:

2.3, 2.4, 2.5 all compile ok for me
Comment 16 Maxim Koltsov gentoo-dev 2014-06-27 07:40:08 UTC
Well, 2.3 is stable and works for you, so this bag can be closed.