Comments (8)
I'm getting a similar failure:
In file included from ../libnl-3.3.0/include/linux-private/linux/ipv6.h:5:0,
from ../libnl-3.3.0/include/netlink-private/netlink.h:54,
from ../libnl-3.3.0/lib/nl.c:28:
../libnl-3.3.0/include/linux-private/linux/in6.h:32:8: error: redefinition of 'struct in6_addr'
struct in6_addr {
^~~~~~~~
In file included from TOPDIR/tmp/work/i586-poky-linux-musl/libnl/1_3.3.0-r0/recipe-sysroot/usr/include/arpa/inet.h:9:0,
from ../libnl-3.3.0/include/netlink-private/netlink.h:32,
from ../libnl-3.3.0/lib/nl.c:28:
TOPDIR/tmp/work/i586-poky-linux-musl/libnl/1_3.3.0-r0/recipe-sysroot/usr/include/netinet/in.h:23:8: note: originally defined here
struct in6_addr {
^~~~~~~~
from libnl.
on plain Ubuntu 12.04.5 I was unable to reproduce this. Seems you are using musl.
Note, that nowadays glibc and kernel headers are synchronized so that you can include in.h from glibc/kernel in either order.
I think this is a libc/kernel bug.
Since it doesn't happen for me, I dunno how to work around it. Patches welcome though.
from libnl.
This problem seems to be described in the musl-libc wiki. A workaround is removing the #include <linux/in6.h>
from include/linux-private/linux/ipv6.h
and include/linux-private/linux/if_bridge.h
.
The change that caused it is probably 6c7f421, although I haven't tested this theory. The relevant changes in the "sanitized" headers seem to be sabotage-linux/kernel-headers@3cd5b95.
I'm not really sure what a proper fix would be - any thoughts?
from libnl.
Thanks for looking into this, @hobbitalastair, your information was very useful.
Looks like the gentoo-musl folks discussed this a bit (gentoo/musl#32), and the the patch from their tree seems to resolve this issue for me on 3.3.0 at least.
I'm not sure if this is suitable for inclusion in the project or not but hope this helps!
from libnl.
Since linux commit c0bace7984, included in 4.15, kernel and musl headers work much better together.
I think all that is necessary to resolve this is to sync the kernel headers to newer versions. I had a go at updating to v4.19 headers (the current longterm version) in my branch master...michaelforney:linux-headers. This fixes the build with musl, and will allow all musl-based distributions to drop the patches they've been carrying.
I did hit a couple snags:
TCF_META_ID_SK_ROUTE_CAPS
is renamed to__TCF_META_ID_SK_ROUTE_CAPS
, with the comment "unimplemented but in ABI already".- The header
linux/ip_mp_alg.h
does not seem to exist (did it ever? I can't find a trace of it in the linux git repository). However, the last reference to the constants it provides was removed in 535e831. - The
IF_CARRIER_DOWN
andIF_CARRIER_UP
constants don't exist inlinux/if.h
. Again, I can't find traces of them in the linux git repository, so I just replaced them with their values, 0 and 1.
from libnl.
The discussion about supported libcs seems mostly distinct from supported compilers...
Re: our kernel headers in include/linux-private
. I think we should just regularly re-import them all from the latest kernel release (with a mindless script). These headers (and kernel's user-space API) are anyway supposed to be backward compatible, so this should cause no problems (in theory :) ).
Patch welcome, or I'll do it one of these days.
- preferably pick the kernel headers from a real release (not from master branch)
- preferably import them in a fully automated manner without manual modifications.
from libnl.
The discussion about supported libcs seems mostly distinct from supported compilers...
Yes, this is a separate issue. Didn't mean for it to get confused with the discussion for my previous pull request.
Patch welcome, or I'll do it one of these days.
- preferably pick the kernel headers from a real release (not from master branch)
- preferably import them in a fully automated manner without manual modifications.
This is what I did in the branch I mentioned above. I turned it into pull request #222.
from libnl.
The discussion about supported libcs seems mostly distinct from supported compilers...
Yes, this is a separate issue. Didn't mean for it to get confused with the discussion for my previous pull request.
I actually confused it, that why this comment of mine makes no sense :)
I think with #222 merged, this can be closed as fixed. Or are there some missing issues? If so, please reopen. Thanks.
from libnl.
Related Issues (20)
- Cross Compilation Steps HOT 1
- CMakeLists.txt for libnl ? HOT 1
- support for nexthops HOT 4
- CVE-2022-20385 HOT 7
- Implement LWTUNNEL_ENCAP_SEG6_LOCAL
- Remove affected routes from cache on interface down? HOT 1
- TC action stats are not updated HOT 1
- The delete command does not take effect.
- xfrm lib missing the set/get for if_id
- Warnings about missing symbol when building with mold linker HOT 11
- Get all SP policies
- Zero counter IPCTNL_MSG_CT_GET_CTRZERO while listing does not work HOT 2
- Build failed HOT 2
- Is the comment for nl_nh_group_info correct? HOT 2
- InvalidFree and InvalidRead in Valgrind when linked against libnl HOT 3
- libnl-3.8.0 fails checks HOT 6
- need help with rtnl_route_add without gateway but a subnet HOT 3
- need help about rtnl_route_nh_set_via HOT 1
- support linux altname
- error: storage size of 'tm_buf' isn't known due to missing #include <time.h> HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libnl.