Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 846377 - net-firewall/iptables-1.8.8-r2 build failure with musl: f_ether.h:115:8: error: redefinition of 'struct ethhdr'
Summary: net-firewall/iptables-1.8.8-r2 build failure with musl: f_ether.h:115:8: erro...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
: 846545 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-05-18 21:54 UTC by Carlos
Modified: 2022-05-28 02:52 UTC (History)
2 users (show)

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


Attachments
emerge --info output (emerge-info.txt,9.01 KB, text/plain)
2022-05-18 21:56 UTC, Carlos
Details
build.log (build.log,18.10 KB, text/x-log)
2022-05-18 21:58 UTC, Carlos
Details
possible fix (musl-move-include.patch,826 bytes, patch)
2022-05-18 22:00 UTC, Carlos
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos 2022-05-18 21:54:35 UTC
Clang complains about redefined structures when building iptables-1.8.8 on musl.

Reproducible: Always

Steps to Reproduce:
Build iptables-1.8.8 or iptables-1.8.8-r1 with clang on a musl system.
Actual Results:  
In file included from xtables.c:2248:
In file included from /usr/include/netinet/ether.h:8:
/usr/include/netinet/if_ether.h:115:8: error: redefinition of 'ethhdr'
struct ethhdr {
       ^
/usr/include/linux/if_ether.h:169:8: note: previous definition is here
struct ethhdr {
       ^
1 warning and 1 error generated.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-18 21:55:18 UTC
Please include the full build.log and emerge --info.
Comment 2 Carlos 2022-05-18 21:56:16 UTC
Created attachment 779456 [details]
emerge --info output
Comment 3 Carlos 2022-05-18 21:58:04 UTC
Created attachment 779459 [details]
build.log
Comment 4 Carlos 2022-05-18 22:00:40 UTC
Created attachment 779462 [details, diff]
possible fix

Moving this include so it's at the top (before linux/if_ether.h) fixes the build failure.

Signed-off-by: Carlos Eduardo (carana2099@gmail.com)
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-05-20 12:33:15 UTC
*** Bug 846545 has been marked as a duplicate of this bug. ***
Comment 6 Agostino Sarubbo gentoo-dev 2022-05-24 13:30:19 UTC
tinderbox_musl has reproduced this issue with version 1.8.8-r2 - Updating summary.
Comment 7 Larry the Git Cow gentoo-dev 2022-05-28 02:52:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56a695955754b0947cc12f99da838eab57f939de

commit 56a695955754b0947cc12f99da838eab57f939de
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-05-28 02:52:03 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-05-28 02:52:21 +0000

    net-firewall/iptables: fix musl build
    
    Closes: https://bugs.gentoo.org/846377
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/iptables-1.8.8-musl-headers.patch        | 59 ++++++++++++++++++++++
 .../files/iptables-1.8.8-out-of-tree-build.patch   | 26 ++++++++++
 net-firewall/iptables/iptables-1.8.8-r2.ebuild     |  2 +
 3 files changed, 87 insertions(+)