Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 643382 - net-misc/quagga: failed to compile if >=sys-kernel/linux-headers-4.11 emerged
Summary: net-misc/quagga: failed to compile if >=sys-kernel/linux-headers-4.11 emerged
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
: 645924 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-01-04 10:14 UTC by Xiami
Modified: 2018-02-24 07:43 UTC (History)
4 users (show)

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


Attachments
patch for including netinet/in.h earlier in zebra.h (quagga-1.2.2-NETINET_IN_H.patch,671 bytes, patch)
2018-01-22 11:51 UTC, Sandino Araico Sanchez
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xiami 2018-01-04 10:14:13 UTC
After emerged latest stable sys-kernel/linux-headers (4.13), I failed to re-emerge net-misc/quagga (a rebuild initiated by readline update).

gcc outputs a lot of things like "error: redeclaration of enumerator 'IPPROTO_IP'".

Starting from linux-4.11 [commit bcb41c6bced1ee778d23c53a6b4807fb08cf5540], linux/mroute.h includes linux/in.h , that finally makes gcc roar.

1) lib/zebra.h includes sys/capability.h first, then includes netinet/in.h .
2) In sys/capability.h, it includes linux/xattr.h, and that includes linux/libc-compat.h .
3) Since at that time netinet/in.h is not included yet, _NETINET_IN_H is not defined, causing libc-compat.h set __UAPI_DEF_IN_IPPROTO to 1.
4) Then, a include of netinet/in.h defines IPPROTO_IP. Later a include of linux/mroute.h(in pimd/pimd.h) includes linux/in.h.
5) Because __UAPI_DEF_IN_IPPROTO is set to non zero, IPPROTO_IP is redeclared.

I had also sent a mail to maintainers [at] quagga.net about this, recommending including netinet/in.h earlier in zebra.h.
Comment 1 Opportunist 2018-01-05 05:58:30 UTC
Confirm on amd64
Comment 2 Jonas Stein gentoo-dev 2018-01-07 15:42:32 UTC
Thank you for the report. Please *attach* the logfiles,
https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
and reopen this ticket (Status:unconfirmed).
Comment 3 Sandino Araico Sanchez 2018-01-22 11:51:31 UTC
Created attachment 515828 [details, diff]
patch for including netinet/in.h earlier in zebra.h

Requested patch including netinet/in.h earlier in zebra.h

net-misc/quagga compiles with sys-kernel/linux-headers-4.13.
Comment 4 Xiami 2018-02-24 02:41:22 UTC
Fixed at http://git.savannah.gnu.org/cgit/quagga.git/commit/?id=fed50218deeaef4d996d25c45b1aa56fe5e337c4

First release containing the fix is 1.2.4
Comment 5 Rolf Eike Beer archtester 2018-02-24 07:43:13 UTC
This also sounds like a problem worth reporting to the kernel mailing list so they can fix their headers.
Comment 6 Rolf Eike Beer archtester 2018-02-24 07:43:41 UTC
*** Bug 645924 has been marked as a duplicate of this bug. ***