Bug 2053 - iptables-1.4.12.2-r0: task do_compile: Failed: unknown type name __aligned_u64
Summary: iptables-1.4.12.2-r0: task do_compile: Failed: unknown type name __aligned_u64
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.2
Hardware: x86 Multiple
: Medium major
Target Milestone: 1.2 M4
Assignee: Dongxiao Xu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-03-03 03:04 UTC by Dexuan Cui
Modified: 2013-01-10 15:53 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dexuan Cui 2012-03-03 03:04:07 UTC
| In file included from libxt_pkttype.c:10:0:
|/home/dcui/yocto/p1/build/tmp/sysroots/crownbay/usr/include/linux/if_packet.h:176:2: error: unknown type name '__aligned_u64'
| make[2]: *** [libxt_pkttype.oo] Error 1
| make[2]: *** Waiting for unfinished jobs....
| make[2]: Leaving directory `/home/dcui/yocto/p1/build/tmp/work/core2-poky-linux/iptables-1.4.12.2-r0/iptables-1.4.12.2/extensions'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/home/dcui/yocto/p1/build/tmp/work/core2-poky-linux/iptables-1.4.12.2-r0/iptables-1.4.12.2'
| make: *** [all] Error 2
| ERROR: oe_runmake failed
NOTE: package iptables-1.4.12.2-r0: task do_compile: Failed

This seems be happening to BSP only (e.g. Crowbay).  qemux86 doesn’t have such an issue.

This seems related to linux-libc-headers:
It's linux-libc-headers_3.1 in the case of qemux86, but it’s linux-libc-headers-yocto-3.2+git in the case of crownbay: the latter introduced a new struct, like tpacket_hdr_v1,  in usr/include/linux/if_packet.h.
The new struct uses __aligned_u64.
Comment 1 Dexuan Cui 2012-03-03 04:39:22 UTC
some clues:

1) in iptables_1.4.12.2.bb, 
--with-kernel=${STAGING_INCDIR} should be
--with-kernel=${STAGING_INCDIR}/..
because iptable's configure would add a /include after ${STAGING_INCDIR}.

2) iptables has a linux/types, but hasn't linux/if_packet.h.
so looks  our sysroot's linux/if_packet.h. is found, but iptable's own linux/types.h is found!

3) iptables-1.4.12.2/extensions/GNUmakefile.in:

AM_CPPFLAGS     = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_builddir} -I${top_srcdir}/include ${kinclude_CPPFLAGS}
the -I order seems not ok: kinclude_CPPFLAGS (that means the dir in our sysroot) should come first and  ${top_builddir}/include should come secondly?

At present I haven't time to dig into the bug...
Comment 2 Dexuan Cui 2012-03-06 22:24:10 UTC
After some discussion in yocto@yoctoproject.org, we think the best fix can be not overriding PREFERRED_PROVIDER_linux-libc-headers in the meta-intel layer. Tom sent out a patch, so this bug should disappear once the patch is accepted:

http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/commit/?h=tzanussi/libc-
distro-change&id=d9132cc66316be45f44beeea6eba734bb3ab337d
Comment 3 Dexuan Cui 2012-03-08 03:02:43 UTC
(In reply to comment #2)
> After some discussion in yocto@yoctoproject.org, we think the best fix can be
> not overriding PREFERRED_PROVIDER_linux-libc-headers in the meta-intel layer.
> Tom sent out a patch, so this bug should disappear once the patch is accepted:
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/commit/?h=tzanussi/libc-
> distro-change&id=d9132cc66316be45f44beeea6eba734bb3ab337d

Tom's patch has been in meta-intel now and i can verify the bug doesn't appear  with the patch:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/commit/?id=d9132cc66316be45f44beeea6eba734bb3ab337d
Comment 4 Stoicescu Cornel 2012-10-24 09:14:15 UTC
I reproduced this on Denzil 1.2.1 with cross i686 toolchain on a x86_64 machine. Steps to reproduce:

1) Install toolchain in /opt (ex: /opt/poky/... )
2) Download iptables project and extract it (http://netfilter.org/projects/iptables/files/iptables-1.4.11.tar.bz2)
3)inside the ipdatles directory, run: libtoolize; ./autogen.sh; ./configure ${CONFIGURE_FLAGS}; make
4) notice same error as described

Branch: Denzil
Commit: 846b7c388738f382e83576e77b705aa547c1dd9b
Comment 5 Stoicescu Cornel 2013-01-10 15:43:31 UTC
As per recent decision regarding bug reopening, I am setting this back to verified and opening a new one.
Comment 6 Stoicescu Cornel 2013-01-10 15:53:44 UTC
This issue does not happen with a newer version of the iptables http://netfilter.org/projects/iptables/files/iptables-1.4.17.tar.bz2

branch: denzil
commit: 3456295898bf157e40ea1f8c335f0b7285d3d8a7

Closing this back to verified without opening a new bug.