Skip to contentSkip to conversation

xtables 1.31 compilation errors

DISCUSSION Mr Dash Four 2 participants 8 messages Dec 11, 2010 – Dec 12, 2010 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

When trying to build the above from source I get the following error:

gcc -Wp,-MMD,./.libxt_gradm.oo.d,-MT,libxt_gradm.oo -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes -Winline -pipe -I../include -I/home/zeek/rpmbuild/BUILD/xtables-addons-1.31/extensions -DPIC -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=core2 -o libxt_gradm.oo -c libxt_gradm.c;
libxt_gradm.c:84: warning: implicit declaration of function 'ALIGN' libxt_gradm.c:84: error: initializer element is not constant libxt_gradm.c:84: error: (near initialization for 'gradm_mt_reg.size') libxt_gradm.c:85: error: initializer element is not constant libxt_gradm.c:85: error: (near initialization for 'gradm_mt_reg.userspacesize') make[3]: *** [libxt_gradm.oo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/zeek/rpmbuild/BUILD/xtables-addons-1.31/extensions' make[2]: *** [user-all-local] Error 2
make[2]: Leaving directory `/home/zeek/rpmbuild/BUILD/xtables-addons-1.31/extensions' make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zeek/rpmbuild/BUILD/xtables-addons-1.31'

Any ideas? From what I remember there was a similar problem with a couple of files in 1.30!

#1 lore raw
Quoted 15 lines · Mr Dash Four

When trying to build the above from source I get the following error:

gcc -Wp,-MMD,./.libxt_gradm.oo.d,-MT,libxt_gradm.oo -D_LARGEFILE_SOURCE=1

(quoted diff) +0 -6
-D_LARGE_FILES -D_FILE_OFFSET_BITS=64     -D_REENTRANT -Wall -Waggregate-return
-Wmissing-declarations     -Wmissing-prototypes -Wredundant-decls -Wshadow
-Wstrict-prototypes     -Winline -pipe     -I../include
-I/home/zeek/rpmbuild/BUILD/xtables-addons-1.31/extensions -DPIC -fPIC -O2 -g
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=core2 -o libxt_gradm.oo -c libxt_gradm.c;

libxt_gradm.c:84: warning: implicit declaration of function 'ALIGN' libxt_gradm.c:84: error: initializer element is not constant libxt_gradm.c:84: error: (near initialization for 'gradm_mt_reg.size') libxt_gradm.c:85: error: initializer element is not constant libxt_gradm.c:85: error: (near initialization for 'gradm_mt_reg.userspacesize')

Quoted 2 lines

Any ideas? From what I remember there was a similar problem with a couple of files in 1.30!

Hooray. Another victim to ALIGN. The problem is not xtables-addons, though. (Please complain to your distro if they have not updated linux-glibc-devel yet.)
Further info:
http://www.google.de/search?q=ALIGN+xtables+kernel
http://bugs.gentoo.org/325257

#2 lore raw
Quoted 5 lines
Quoted 4 lines

Any ideas? From what I remember there was a similar problem with a couple of files in 1.30!

Quoted 7 lines

Hooray. Another victim to ALIGN. The problem is not xtables-addons, though. (Please complain to your distro if they have not updated linux-glibc-devel yet.)
Further info:
http://www.google.de/search?q=ALIGN+xtables+kernel
http://bugs.gentoo.org/325257

Erm, I am not sure! I have no problems compiling 1.30 and XT_ALIGN is used there. For reference:

uname -r = 2.6.34.7-61.fc13.x86_64
rpm -q glibc-devel = 2.12.1-4 (for both x86_64 and i686 as I am doing cross compilation a lot)

So, is there something wrong with the above versions, which needs to be fixed?

#3 lore raw
Quoted 8 lines
Quoted 8 lines

Hooray. Another victim to ALIGN. The problem is not xtables-addons, though. (Please complain to your distro if they have not updated linux-glibc-devel yet.)
Further info:
http://www.google.de/search?q=ALIGN+xtables+kernel
http://bugs.gentoo.org/325257

Quoted 6 lines

Erm, I am not sure! I have no problems compiling 1.30 and XT_ALIGN is used there. For reference:

uname -r = 2.6.34.7-61.fc13.x86_64
rpm -q glibc-devel = 2.12.1-4 (for both x86_64 and i686 as I am doing cross compilation a lot)

So, is there something wrong with the above versions, which needs to be fixed?

Further to the above: The 'problematic' line, which SHOULD be included in libxt_gradm.c is:
#include "compat_user.h" (it actually states in the header file "linux-glibc-devel 2.6.34 header screwup", so at least someone admits to a screw up for once!)

With this however, the problems are NOT fixed, I am getting this further down the line:

ipset_iphash.c: In function ‘iphash_create_init’:
ipset_iphash.c:42: error: ‘IP_NF_SET_HASHSIZE’ undeclared (first use in this function) ipset_iphash.c:42: error: (Each undeclared identifier is reported only once ipset_iphash.c:42: error: for each function it appears in.)
make[5]: *** [libipset_iphash.oo] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory `/home/zeek/rpmbuild/BUILD/xtables-addons-1.31/extensions/ipset' make[4]: *** [user-all-local] Error 2
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory `/home/zeek/rpmbuild/BUILD/xtables-addons-1.31/extensions/ipset'

#4 lore raw
Quoted 6 lines

Further to the above: The 'problematic' line, which SHOULD be included in libxt_gradm.c is:
#include "compat_user.h" (it actually states in the header file "linux-glibc-devel 2.6.34 header screwup", so at least someone admits to a screw up for once!)

With this however, the problems are NOT fixed, I am getting this further down the line:

Quoted 10 lines

ipset_iphash.c: In function ‘iphash_create_init’:
ipset_iphash.c:42: error: ‘IP_NF_SET_HASHSIZE’ undeclared (first use in this function) ipset_iphash.c:42: error: (Each undeclared identifier is reported only once ipset_iphash.c:42: error: for each function it appears in.)
make[5]: *** [libipset_iphash.oo] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory `/home/zeek/rpmbuild/BUILD/xtables-addons-1.31/extensions/ipset' make[4]: *** [user-all-local] Error 2
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory `/home/zeek/rpmbuild/BUILD/xtables-addons-1.31/extensions/ipset'

...Also, IP_NF_SET_HASHSIZE is in ipset_ipportiphash.c, ipset_ipporthash.c and ipset_nethash.c, in neither of which IP_NF_SET_HASHSIZE is defined, apparently!

There is a definition of CONFIG_IP_NF_SET_HASHSIZE in ip_set.h which is set to 1024.

In 1.30 the value of 1024 is directly used, instead of IP_NF_SET_HASHSIZE (which SHOULD have been CONFIG_IP_NF_SET_HASHSIZE!), so someone (Jozsef?) needs to fix this.

I am amazed nobody checks these things - how do you compile this code people?

#5 lore raw
Quoted 10 lines · Mr Dash Four
Quoted 6 lines

ipset_iphash.c: In function ‘iphash_create_init’:
ipset_iphash.c:42: error: ‘IP_NF_SET_HASHSIZE’ undeclared (first use in this function)
ipset_iphash.c:42: error: (Each undeclared identifier is reported only once ipset_iphash.c:42: error: for each function it appears in.)

In 1.30 the value of 1024 is directly used, instead of IP_NF_SET_HASHSIZE (which SHOULD have been CONFIG_IP_NF_SET_HASHSIZE!), so someone (Jozsef?) needs to fix this.

Don't point fingers when you don't know who to blame. This is not something Jozsef caused.

Quoted 2 lines

I am amazed nobody checks these things - how do you compile this code people?

Releases are checked for whether the kernel modules compile with all kernel versions. Userspace compilation testing is limited to what I run. The rest is done happily by people more familiar with specific choices of distros. That is how the ecosystem works, and it usually works.

[Not to mention again that the IP_NF_SET_HASHSIZE issue does not appear in a released tarball. So while everybody tries to avoid git states that do not compile — it's a hindrance for git-bisect too — slips do happen.]

Of course, there are also commercial support options available if you prefer more QA.

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Of course, there are also commercial support options available if you prefer more QA.

Quoted 8 lines
Quoted 4 lines

So, in order to get xtables to at least compile I have to get a commercial support?! Really?! I dread the day you take over from Patrick McHardy then - I really do!

You mix up the Xtables core with Xtables-addons. The latter had the compile issue, but Patrick has nothing to do with Xtables-addons.

You know exactly what I meant, so don't try to wriggle out of it.

Quoted 6 lines

N.B.: To bring you up to date with the beer-free software: if someone feels a project needs more attention, they are to invest in it. If they do not come forward with patches, the public assumes they have other capabilities, and so, as a running gag, money spending is proposed.

Save your beer-free-software teachings for someone else - you are in no position to try and educate me!

I've spotted 2 bugs in the current git tree of xtables (one of which was in the *released* version of ipset) and I asked for help on how to resolve them. In the meantime I did find a solution, which I posted earlier.

You tried to send me down blind alleys and basically acting smart a**e instead of providing a solution - the aforementioned bug with ALIGN wasn't something new to you - you already knew what the problem was and, most importantly, how to fix it, though you did not consider it necessary to let me know that, but to point me to google search and some obscure bug submission on gentoo instead.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Releases are checked for whether the kernel modules compile with all kernel versions. Userspace compilation testing is limited to what I run. The rest is done happily by people more familiar with specific choices of distros. That is how the ecosystem works, and it usually works.

Quoted 8 lines
Quoted 5 lines

The key word being 'usually' I presume, eh? Don't tell me you were able to compile this code, because I won't believe you. I have downloaded xtables with the *released* version of ipset (which happens to be 4.5)

I was meaning: a _released_ version _of xtables-addons_.

The bug with IP_NF_SET_HASHSIZE was in the released version if ipset and not xtables and that is what I meant with my previous post.

Quoted 3 lines

Yes, I know about the current git HEAD state. Happened to slip on compiling state 5bcdf7f. Big deal — Errare humanum est.

I have no issue with errors being present in the git source tree - no software is ever perfect. I, however, have issues with you asking for 'commercial support' (i.e. begging for money) in order to get a code which simply compiles and also sending me down blind alleys when you knew how to fix the problem I requested help for.

Quoted 2 lines

Fixed now..

So, wouldn't it have been easier for you to just point out how to fix this as soon as I posted about this bug, instead of harping on about commercial support, google search, gentoo bug submission and the difference between xtables and xtables-addons?!

#9 lore raw
In reply to Mr Dash Four
Quoted 6 lines · Mr Dash Four

Further to the above: The 'problematic' line, which SHOULD be included in libxt_gradm.c is:
#include "compat_user.h" (it actually states in the header file "linux-glibc-devel 2.6.34 header screwup", so at least someone admits to a screw up for once!)

The screwup is on behalf of a79ff731a1b277d0e92d9453bdf374e04cec717a. Me, I am just adding workarounds to xt-a.

Quoted 6 lines

With this however, the problems are NOT fixed, I am getting this further down the line:

ipset_iphash.c: In function ‘iphash_create_init’:
ipset_iphash.c:42: error: ‘IP_NF_SET_HASHSIZE’ undeclared (first use in this function)

This is a different one, and not in 1.31, just git master - and will be fixed soon.