Bug 579120

Summary: xtables-addons 1.24 compilation fails with gcc 4.4.3-14.fc14
Product: [Fedora] Fedora Reporter: Chen Lei <supercyper1>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: anton, dougsland, gansalmon, itamar, jakub, jonathan, kernel-maint, udovdh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-26 17:47:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chen Lei 2010-04-02 18:13:18 UTC
Description of problem:

build  fails in koji
See http://koji.fedoraproject.org/koji/taskinfo?taskID=2090658

Version-Release number of selected component (if applicable):

gcc 4.4.3-14.fc14

How reproducible:

build SRPM in koji

Actual results:

libxt_dhcpmac.c:89: warning: implicit declaration of function 'ALIGN'
libxt_dhcpmac.c:89: error: initializer element is not constant
libxt_dhcpmac.c:89: error: (near initialization for 'dhcpmac_mt_reg.size')
libxt_dhcpmac.c:90: error: initializer element is not constant
libxt_dhcpmac.c:90: error: (near initialization for 'dhcpmac_mt_reg.userspacesize')
libxt_DHCPMAC.c:88: warning: implicit declaration of function 'ALIGN'
libxt_DHCPMAC.c:88: error: initializer element is not constant
libxt_DHCPMAC.c:88: error: (near initialization for 'dhcpmac_tg_reg.size')
libxt_DHCPMAC.c:89: error: initializer element is not constant
libxt_DHCPMAC.c:89: error: (near initialization for 'dhcpmac_tg_reg.userspacesize')
make[3]: *** [libxt_DHCPMAC.oo] Error 1
make[3]: *** Waiting for unfinished jobs....
libxt_CHAOS.c:99: warning: implicit declaration of function 'ALIGN'
libxt_CHAOS.c:99: error: initializer element is not constant
libxt_CHAOS.c:99: error: (near initialization for 'chaos_tg_reg.size')
libxt_CHAOS.c:100: error: initializer element is not constant
libxt_CHAOS.c:100: error: (near initialization for 'chaos_tg_reg.userspacesize')

Expected results: Successful compilation

Additional info:
source files for xtables-addons
See http://xtables-addons.git.sf.net/git/gitweb.cgi?p=xtables-addons/xtables-addons;a=tree;f=extensions;h=77d675279295b459f1422c43049384a8c8674452;hb=HEAD

compilation succeed in F11-F13 
See http://koji.fedoraproject.org/koji/taskinfo?taskID=2087528

Comment 1 Jakub Jelinek 2010-04-03 06:59:12 UTC
This has nothing to do with gcc, but with a change in kernel-headers.
/usr/include/linux/netfilter/x_tables.h e.g. in F12 contained:
#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1))  \
                        & ~(__alignof__(struct _xt_align)-1))
but now it contains:
#define XT_ALIGN(s) ALIGN((s), __alignof__(struct _xt_align))
ALIGN macro isn't defined anywhere (it is probably defined for __KERNEL__ purposes only).  And, certainly defining such a generic name in userspace would be a very bad idea.

Comment 2 Chen Lei 2010-04-03 11:49:54 UTC
(In reply to comment #1)
> This has nothing to do with gcc, but with a change in kernel-headers.
> /usr/include/linux/netfilter/x_tables.h e.g. in F12 contained:
> #define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1))  \
>                         & ~(__alignof__(struct _xt_align)-1))
> but now it contains:
> #define XT_ALIGN(s) ALIGN((s), __alignof__(struct _xt_align))
> ALIGN macro isn't defined anywhere (it is probably defined for __KERNEL__
> purposes only).  And, certainly defining such a generic name in userspace would
> be a very bad idea.    

Thanks a lot, Jakub!

Comment 3 Bug Zapper 2010-07-30 11:14:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 udo 2010-12-22 16:26:14 UTC
Why do I see this happen in Fedora 13?
# rpm -qf  /usr/include/linux/netfilter/x_tables.h 
kernel-headers-2.6.34.7-63.fc13.i686

Comment 5 Josh Boyer 2011-08-26 17:47:35 UTC
This is fixed in the latest f14 kernel.