Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646464 - net-misc/connman-1.35-r1 - In file included from /usr/include/linux/if_bridge.h:19:0, from src/tethering.c:39: /usr/include/linux/in6.h:33:8: error: redefinition of 'struct in6_addr'
Summary: net-misc/connman-1.35-r1 - In file included from /usr/include/linux/if_bridge...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Yixun Lan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-03 06:26 UTC by Martin Väth
Modified: 2018-04-22 18:21 UTC (History)
0 users

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


Attachments
Patch to fix inclusion order (connman-tethering.patch,408 bytes, patch)
2018-02-03 06:26 UTC, Martin Väth
Details | Diff
emerge-info.txt (emerge-info.txt,15.84 KB, text/plain)
2018-03-26 18:52 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,61.46 KB, text/plain)
2018-03-26 18:52 UTC, Toralf Förster
Details
environment (environment,64.44 KB, text/plain)
2018-03-26 18:52 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,11.73 KB, application/x-bzip)
2018-03-26 18:52 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,7.74 KB, application/x-bzip)
2018-03-26 18:52 UTC, Toralf Förster
Details
net-misc:connman-1.35-r1:20180326-184554.log (net-misc:connman-1.35-r1:20180326-184554.log,64.27 KB, text/plain)
2018-03-26 18:52 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,23.25 KB, application/x-bzip)
2018-03-26 18:52 UTC, Toralf Förster
Details
connman-1.35-r2.ebuild (connman-1.35-r2.ebuild,2.50 KB, text/plain)
2018-03-26 20:30 UTC, Jeff Kowalczyk
Details
connman-1.35-include-ifbridge-before-netinet.patch (connman-1.35-include-ifbridge-before-netinet.patch,259 bytes, text/plain)
2018-03-26 20:32 UTC, Jeff Kowalczyk
Details
connman-1.35-r2.ebuild.patch (connman-1.35-r2.ebuild.patch,387 bytes, patch)
2018-03-26 20:33 UTC, Jeff Kowalczyk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2018-02-03 06:26:23 UTC
Created attachment 517634 [details, diff]
Patch to fix inclusion order

With sys-kernel/linux-headers-4.15 and sys-libs/glibc-2.25-r9,
compilation of net-misc/connman-1.35-r1 fails with the following error message:

In file included from /usr/include/linux/if_bridge.h:19:0,
                 from src/tethering.c:39:
/usr/include/linux/in6.h:33:8: error: redefinition of 'struct in6_addr'
 struct in6_addr {
        ^~~~~~~~
In file included from src/tethering.c:38:0:
/usr/include/netinet/in.h:211:8: note: originally defined here
 struct in6_addr
        ^~~~~~~~
In file included from /usr/include/linux/if_bridge.h:19:0,
                 from src/tethering.c:39:
/usr/include/linux/in6.h:50:8: error: redefinition of 'struct sockaddr_in6'
 struct sockaddr_in6 {
        ^~~~~~~~~~~~
In file included from src/tethering.c:38:0:
/usr/include/netinet/in.h:252:8: note: originally defined here
 struct sockaddr_in6
        ^~~~~~~~~~~~
In file included from /usr/include/linux/if_bridge.h:19:0,
                 from src/tethering.c:39:
/usr/include/linux/in6.h:60:8: error: redefinition of 'struct ipv6_mreq'
 struct ipv6_mreq {
        ^~~~~~~~~
In file included from src/tethering.c:38:0:
/usr/include/netinet/in.h:288:8: note: originally defined here
 struct ipv6_mreq
        ^~~~~~~~~

The reason appears to be that linux/if_bridge.h must be included _before_ netinet/in.h
At least, exchanging the order of these two includes fixes the compilation.
A corresponding patch is attached.
Comment 1 Toralf Förster gentoo-dev 2018-03-26 18:52:22 UTC
got at the unstable amd64 chroot image 17.0-desktop-plasma_20180324-222611 this : /.../in6.h:33:8: error: redefinition of struct in6_addr
Comment 2 Toralf Förster gentoo-dev 2018-03-26 18:52:25 UTC
Created attachment 525602 [details]
emerge-info.txt
Comment 3 Toralf Förster gentoo-dev 2018-03-26 18:52:28 UTC
Created attachment 525604 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-03-26 18:52:31 UTC
Created attachment 525606 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-03-26 18:52:34 UTC
Created attachment 525608 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-03-26 18:52:37 UTC
Created attachment 525610 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2018-03-26 18:52:39 UTC
Created attachment 525612 [details]
net-misc:connman-1.35-r1:20180326-184554.log
Comment 8 Toralf Förster gentoo-dev 2018-03-26 18:52:42 UTC
Created attachment 525614 [details]
temp.tbz2
Comment 9 Jeff Kowalczyk 2018-03-26 20:29:27 UTC
Martin Väth's patch worked for me to fix compilation, and the resulting connman-1.35 build is working well on my system.

Attaching connman-1.35-r2.ebuild with Martin's patch integrated, minor changes to the diff header required to get it to apply.
Comment 10 Jeff Kowalczyk 2018-03-26 20:30:07 UTC
Created attachment 525620 [details]
connman-1.35-r2.ebuild
Comment 11 Jeff Kowalczyk 2018-03-26 20:32:07 UTC
Created attachment 525622 [details]
connman-1.35-include-ifbridge-before-netinet.patch

Martin's patch with minor changes to diff header.
Comment 12 Jeff Kowalczyk 2018-03-26 20:33:34 UTC
Created attachment 525624 [details, diff]
connman-1.35-r2.ebuild.patch

connman-1.35-r2.ebuild.patch is a diff to portage tree connman-1.35-r1.ebuild.
Only change is inclusion of Martin's patch. Fixes compilation error.
Comment 13 Larry the Git Cow gentoo-dev 2018-04-22 18:21:12 UTC
The bug has been closed via the following commit(s):

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

commit a093754f351397ff2794e337fd823fecd8b64144
Author:     Maxim Koltsov <maksbotan@gentoo.org>
AuthorDate: 2018-04-22 18:19:16 +0000
Commit:     Maxim Koltsov <maksbotan@gentoo.org>
CommitDate: 2018-04-22 18:21:00 +0000

    net-misc/connman: fix compilation
    
    Closes: https://bugs.gentoo.org/646464
    Package-Manager: Portage-2.3.24, Repoman-2.3.6

 net-misc/connman/connman-1.35-r1.ebuild                      |  1 +
 .../files/connman-1.35-include-ifbridge-before-netinet.patch | 12 ++++++++++++
 2 files changed, 13 insertions(+)