Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When compiling trinity in latest rhel9, there's conflicts between netinet headers and linux-headers, which should be resolved, otherwise some use may be affected
Version-Release number of selected component (if applicable):
glibc-headers-2.33-13.el9.x86_64
rpm -qf /usr/include/linux/libc-compat.h
kernel-headers-5.13.0-0.rc3.25.el9.x86_64
How reproducible:
always
Steps to Reproduce:
1. git clone https://github.com/kernelslacker/trinity.git
2. ./configure
3. make -j $(nproc)
Actual results:
conflicts showed, and compile broken:
CC net/proto-irda.o
In file included from include/net.h:5,
from net/proto-ip-raw.c:2:
/usr/include/netinet/in.h:31:8: error: redefinition of ‘struct in_addr’
31 | struct in_addr
| ^~~~~~~
In file included from /usr/include/linux/icmp.h:23,
from net/proto-ip-raw.c:1:
/usr/include/linux/in.h:89:8: note: originally defined here
89 | struct in_addr {
| ^~~~~~~
In file included from /usr/include/netinet/in.h:37,
from include/net.h:5,
from net/proto-ip-raw.c:2:
/usr/include/bits/in.h:150:8: error: redefinition of ‘struct ip_mreqn’
150 | struct ip_mreqn
| ^~~~~~~~
In file included from /usr/include/linux/icmp.h:23,
from net/proto-ip-raw.c:1:
/usr/include/linux/in.h:178:8: note: originally defined here
178 | struct ip_mreqn {
| ^~~~~~~~
In file included from /usr/include/netinet/in.h:37,
from include/net.h:5,
from net/proto-ip-raw.c:2:
/usr/include/bits/in.h:158:8: error: redefinition of ‘struct in_pktinfo’
158 | struct in_pktinfo
Expected results:
UAPI
Additional info:
From /usr/include/linux/libc-compat.h :
*
* This fixes the situation where the linux headers are included *after* the
* libc headers. To fix the problem with the inclusion in the other order the
* userspace libc headers must be fixed like this:
*
* * For all definitions that conflict with kernel definitions wrap those
* defines in the following:
* #if !__UAPI_DEF_FOO
* ...
* #endif
*
* This prevents the redefinition of a construct already defined by the kernel.
I see the kernel patch made it into the tree?
commit e32ea44c7ae476f4c90e35ab0a29dc8ff082bc11
Author: Andreas Roeseler <andreas.a.roeseler>
Date: Thu Jun 3 16:22:11 2021 -0500
icmp: fix lib conflict with trinity
Including <linux/in.h> and <netinet/in.h> in the dependencies breaks
compilation of trinity due to multiple definitions. <linux/in.h> is only
used in <linux/icmp.h> to provide the definition of the struct in_addr,
but this can be substituted out by using the datatype __be32.
Signed-off-by: Andreas Roeseler <andreas.a.roeseler>
Signed-off-by: David S. Miller <davem>
Chunyu Hu, may we close this bug? Thanks.
(In reply to Florian Weimer from comment #5)
> I see the kernel patch made it into the tree?
>
> commit e32ea44c7ae476f4c90e35ab0a29dc8ff082bc11
> Author: Andreas Roeseler <andreas.a.roeseler>
> Date: Thu Jun 3 16:22:11 2021 -0500
>
> icmp: fix lib conflict with trinity
>
> Including <linux/in.h> and <netinet/in.h> in the dependencies breaks
> compilation of trinity due to multiple definitions. <linux/in.h> is only
> used in <linux/icmp.h> to provide the definition of the struct in_addr,
> but this can be substituted out by using the datatype __be32.
>
> Signed-off-by: Andreas Roeseler <andreas.a.roeseler>
> Signed-off-by: David S. Miller <davem>
>
> Chunyu Hu, may we close this bug? Thanks.
Thanks for info. Close this.