Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 551606 - net-firewall/iptables-1.4.21-r1 fails to compile on armv7a-hardened-musl
Summary: net-firewall/iptables-1.4.21-r1 fails to compile on armv7a-hardened-musl
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2015-06-09 22:28 UTC by Michael Jones
Modified: 2016-10-06 22:27 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jones 2015-06-09 22:28:11 UTC
This bug should be made a blocker of : https://bugs.gentoo.org/show_bug.cgi?id=430702

And assigned to blueness@gentoo.org


zcat build.log.gz 
In file included from ../include/libiptc/libiptc.h:12:0,
                 from libip4tc.c:29:
../include/linux/netfilter_ipv4/ip_tables.h:76:2: error: unknown type name ‘u_int16_t’
../include/linux/netfilter_ipv4/ip_tables.h:79:2: error: unknown type name ‘u_int8_t’
../include/linux/netfilter_ipv4/ip_tables.h:81:2: error: unknown type name ‘u_int8_t’
../include/linux/netfilter_ipv4/ip_tables.h:109:2: error: unknown type name ‘u_int16_t’
../include/linux/netfilter_ipv4/ip_tables.h:111:2: error: unknown type name ‘u_int16_t’
../include/linux/netfilter_ipv4/ip_tables.h:144:2: error: unknown type name ‘u_int8_t’
../include/linux/netfilter_ipv4/ip_tables.h:145:2: error: unknown type name ‘u_int8_t’
../include/linux/netfilter_ipv4/ip_tables.h:146:2: error: unknown type name ‘u_int8_t’
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:14:8: error: redefinition of ‘struct in_addr’
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in.h:79:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:16:8: error: redefinition of ‘struct sockaddr_in’
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in.h:217:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:24:8: error: redefinition of ‘struct in6_addr’
In file included from ../include/libiptc/ipt_kernel_headers.h:25:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in6.h:32:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:36:8: error: redefinition of ‘struct sockaddr_in6’
In file included from ../include/libiptc/ipt_kernel_headers.h:25:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in6.h:49:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:45:8: error: redefinition of ‘struct ipv6_mreq’
In file included from ../include/libiptc/ipt_kernel_headers.h:25:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in6.h:59:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:248:8: error: redefinition of ‘struct ip_mreq’
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in.h:157:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:254:8: error: redefinition of ‘struct ip_mreqn’
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in.h:162:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:261:8: error: redefinition of ‘struct ip_mreq_source’
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in.h:168:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:267:8: error: redefinition of ‘struct ip_msfilter’
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in.h:174:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:278:8: error: redefinition of ‘struct group_req’
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in.h:186:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:283:8: error: redefinition of ‘struct group_source_req’
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in.h:191:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:289:8: error: redefinition of ‘struct group_filter’
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in.h:197:8: note: originally defined here
In file included from ../include/xtables.h:15:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/netinet/in.h:300:8: error: redefinition of ‘struct in_pktinfo’
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/in.h:209:8: note: originally defined here
In file included from ../include/xtables.h:16:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/net/if.h:65:8: error: redefinition of ‘struct ifmap’
In file included from ../include/libiptc/ipt_kernel_headers.h:20:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/if.h:169:8: note: originally defined here
In file included from ../include/xtables.h:16:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/net/if.h:77:8: error: redefinition of ‘struct ifreq’
In file included from ../include/libiptc/ipt_kernel_headers.h:20:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/if.h:203:8: note: originally defined here
In file included from ../include/xtables.h:16:0,
                 from libiptc.c:37,
                 from libip4tc.c:113:
/usr/include/net/if.h:117:8: error: redefinition of ‘struct ifconf’
In file included from ../include/libiptc/ipt_kernel_headers.h:20:0,
                 from ../include/libiptc/libiptc.h:6,
                 from libip4tc.c:29:
/usr/include/linux/if.h:252:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in.h:26:3: error: expected identifier before numeric constant
/usr/include/linux/in.h:79:8: error: redefinition of ‘struct in_addr’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:14:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in.h:157:8: error: redefinition of ‘struct ip_mreq’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:248:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in.h:162:8: error: redefinition of ‘struct ip_mreqn’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:254:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in.h:168:8: error: redefinition of ‘struct ip_mreq_source’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:261:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in.h:174:8: error: redefinition of ‘struct ip_msfilter’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:267:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in.h:186:8: error: redefinition of ‘struct group_req’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:278:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in.h:191:8: error: redefinition of ‘struct group_source_req’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:283:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in.h:197:8: error: redefinition of ‘struct group_filter’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:289:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in.h:209:8: error: redefinition of ‘struct in_pktinfo’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:300:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:19:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in.h:217:8: error: redefinition of ‘struct sockaddr_in’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:16:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:25:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in6.h:32:8: error: redefinition of ‘struct in6_addr’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:24:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:25:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in6.h:49:8: error: redefinition of ‘struct sockaddr_in6’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:36:8: note: originally defined here
In file included from ../include/libiptc/ipt_kernel_headers.h:25:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/in6.h:59:8: error: redefinition of ‘struct ipv6_mreq’
In file included from /usr/include/arpa/inet.h:9:0,
                 from libip6tc.c:20:
/usr/include/netinet/in.h:45:8: note: originally defined here
In file included from ../include/libiptc/libip6tc.h:12:0,
                 from libip6tc.c:30:
../include/linux/netfilter_ipv6/ip6_tables.h:76:2: error: unknown type name ‘u_int16_t’
../include/linux/netfilter_ipv6/ip6_tables.h:78:2: error: unknown type name ‘u_int8_t’
../include/linux/netfilter_ipv6/ip6_tables.h:81:2: error: unknown type name ‘u_int8_t’
../include/linux/netfilter_ipv6/ip6_tables.h:83:2: error: unknown type name ‘u_int8_t’
../include/linux/netfilter_ipv6/ip6_tables.h:113:2: error: unknown type name ‘u_int16_t’
../include/linux/netfilter_ipv6/ip6_tables.h:115:2: error: unknown type name ‘u_int16_t’
../include/linux/netfilter_ipv6/ip6_tables.h:181:2: error: unknown type name ‘u_int8_t’
../include/linux/netfilter_ipv6/ip6_tables.h:182:2: error: unknown type name ‘u_int8_t’
../include/linux/netfilter_ipv6/ip6_tables.h:183:2: error: unknown type name ‘u_int8_t’
In file included from ../include/xtables.h:16:0,
                 from libiptc.c:37,
                 from libip6tc.c:111:
/usr/include/net/if.h:65:8: error: redefinition of ‘struct ifmap’
In file included from ../include/libiptc/ipt_kernel_headers.h:20:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/if.h:169:8: note: originally defined here
In file included from ../include/xtables.h:16:0,
                 from libiptc.c:37,
                 from libip6tc.c:111:
/usr/include/net/if.h:77:8: error: redefinition of ‘struct ifreq’
In file included from ../include/libiptc/ipt_kernel_headers.h:20:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/if.h:203:8: note: originally defined here
In file included from ../include/xtables.h:16:0,
                 from libiptc.c:37,
                 from libip6tc.c:111:
/usr/include/net/if.h:117:8: error: redefinition of ‘struct ifconf’
In file included from ../include/libiptc/ipt_kernel_headers.h:20:0,
                 from ../include/libiptc/libip6tc.h:6,
                 from libip6tc.c:30:
/usr/include/linux/if.h:252:8: note: originally defined here
In file included from libip6tc.c:111:0:
libiptc.c: In function ‘ip6tc_init’:
libiptc.c:1318:35: error: ‘IPPROTO_RAW’ undeclared (first use in this function)
libiptc.c:1318:35: note: each undeclared identifier is reported only once for each function it appears in
libiptc.c:1331:25: error: ‘IPPROTO_IPV6’ undeclared (first use in this function)
libiptc.c: In function ‘ip6tc_commit’:
libiptc.c:2599:35: error: ‘IPPROTO_IPV6’ undeclared (first use in this function)
Makefile:396: recipe for target 'libip4tc.lo' failed
make[2]: *** [libip4tc.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:396: recipe for target 'libip6tc.lo' failed
make[2]: *** [libip6tc.lo] Error 1
make[2]: Leaving directory '/var/tmp/portage/net-firewall/iptables-1.4.21-r1/work/iptables-1.4.21/libiptc'
Makefile:356: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-firewall/iptables-1.4.21-r1/work/iptables-1.4.21'
Makefile:283: recipe for target 'all' failed
make: *** [all] Error 2

Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2015-06-10 11:38:12 UTC
The following patch is a glob of individual patches:

https://gitweb.gentoo.org/proj/hardened-dev.git/tree/net-firewall/iptables/files/iptables-1.4.21-musl.patch?h=musl


We need to isolate and upstream the following:

1) The missing <errno.h> and <sys/types.h> includes.

2) The defined(__GLIBC__) ... else ... assumption which leads to libc5 includes that are totally wrong.

3) The missing TCPOPT_* and IPPROTO_HOPOPTS decls.  We need to see if these are spec-ed in POSIX, XOPEN or SUSv3/4.
Comment 2 Felix Janda 2015-06-12 18:23:54 UTC
Fixed in upstream git (I think) but there has not been made a release since then.
Comment 3 Felix Janda 2015-06-16 20:26:57 UTC
Actually, only 2) is fixed in current git.

Sent some more patches upstream.
Comment 4 Felix Janda 2016-10-06 22:27:16 UTC
net-firewall/iptables-1.6.0-r1 seems to build fine on musl.