Nixpkgs: Mesos broken due to dependency on libnl-3

Created on 27 Jan 2017  ยท  8Comments  ยท  Source: NixOS/nixpkgs

https://hydra.nixos.org/build/47090295

checking for nl_has_capability in -lnl-3... no
configure: error: cannot find libnl-3
-------------------------------------------------------------------
We need libnl-3 for building network isolator!

Please install libnl3 (version 3.2.26 or higher):
https://github.com/thom311/libnl/releases
-------------------------------------------------------------------

cc: @cstrahan @kamilchm

bug

All 8 comments

I think this started failing when we updated to libnl-3.2.29 (/cc @fpletz @grahamc).

In 3.2.28, nl_has_capability was defined here: include/libnl3/netlink/utils.h

$ diff -u /nix/store/yj6pgszfh1gzwv18qv5lj475y6c6lnqy-libnl-3.2.28-dev/include/libnl3/netlink/utils.h /nix/store/ljgwlylp1rsxnmvlk4m3k2hj5kn743ih-libnl-3.2.29-dev/include/libnl3/netlink/utils.h
--- /nix/store/yj6pgszfh1gzwv18qv5lj475y6c6lnqy-libnl-3.2.28-dev/include/libnl3/netlink/utils.h 1969-12-31 19:00:01.000000000 -0500
+++ /nix/store/ljgwlylp1rsxnmvlk4m3k2hj5kn743ih-libnl-3.2.29-dev/include/libnl3/netlink/utils.h 1969-12-31 19:00:01.000000000 -0500
@@ -79,156 +79,6 @@
 extern void    nl_dump(struct nl_dump_params *, const char *, ...);
 extern void    nl_dump_line(struct nl_dump_params *, const char *, ...);

-enum {
-       NL_CAPABILITY_NONE,
-
-       /**
-        * rtnl_route_build_msg() no longer guesses the route scope
-        * if explicitly set to RT_SCOPE_NOWHERE.
-        * @ingroup utils
-        */
-       NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE         = 1,
-#define NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPE
-
-       /**
-        * rtnl_link_veth_get_peer() now returns a reference that is owned by the
-        * caller and must be released by the caller with rtnl_link_put().
-        */
-       NL_CAPABILITY_ROUTE_LINK_VETH_GET_PEER_OWN_REFERENCE = 2,
-#define NL_CAPABILITY_ROUTE_LINK_VETH_GET_PEER_OWN_REFERENCE NL_CAPABILITY_ROUTE_LINK_VETH_GET_PEER_OWN_REFERENCE
-
-       /**
-        * rtnl_u32_add_action() and rtnl_basic_add_action() now grab a reference to act
-        * caller are free to release its own
-        */
-       NL_CAPABILITY_ROUTE_LINK_CLS_ADD_ACT_OWN_REFERENCE = 3,
-#define NL_CAPABILITY_ROUTE_LINK_CLS_ADD_ACT_OWN_REFERENCE NL_CAPABILITY_ROUTE_LINK_CLS_ADD_ACT_OWN_REFERENCE
-
-       /**
-        * Indicate that the local port is unspecified until the user accesses
-        * it (via nl_socket_get_local_port()) or until nl_connect(). More importantly,
-        * if the port is left unspecified, nl_connect() will retry generating another
-        * port when bind() fails with ADDRINUSE.
-        */
-       NL_CAPABILITY_NL_CONNECT_RETRY_GENERATE_PORT_ON_ADDRINUSE = 4,
-#define NL_CAPABILITY_NL_CONNECT_RETRY_GENERATE_PORT_ON_ADDRINUSE NL_CAPABILITY_NL_CONNECT_RETRY_GENERATE_PORT_ON_ADDRINUSE
-
-       /**
-        * Indicate that rtnl_link_get_kernel() fails with -NLE_OPNOTSUPP in case
-        * of older kernals not supporting lookup by ifname. This changes behavior
-        * from returning -NLE_INVAL to return -NLE_OPNOTSUPP.
-        */
-       NL_CAPABILITY_ROUTE_LINK_GET_KERNEL_FAIL_OPNOTSUPP = 5,
-#define NL_CAPABILITY_ROUTE_LINK_GET_KERNEL_FAIL_OPNOTSUPP NL_CAPABILITY_ROUTE_LINK_GET_KERNEL_FAIL_OPNOTSUPP
-
-       /**
-        * Also consider the a_cacheinfo field (ADDR_ATTR_CACHEINFO) that contains the
-        * address timestamps and expiry when comparing struct rtnl_addr objects with
-        * nl_object_diff().
-        */
-       NL_CAPABILITY_ROUTE_ADDR_COMPARE_CACHEINFO = 6,
-#define NL_CAPABILITY_ROUTE_ADDR_COMPARE_CACHEINFO NL_CAPABILITY_ROUTE_ADDR_COMPARE_CACHEINFO
-
-       /**
-        * The library version is libnl3 3.2.26 or newer. This capability should never be backported.
-        */
-       NL_CAPABILITY_VERSION_3_2_26 = 7,
-#define NL_CAPABILITY_VERSION_3_2_26 NL_CAPABILITY_VERSION_3_2_26
-
-       /**
-        * nl_recv() fails with NLE_MSG_TRUNC if a message got truncated
-        * with NL_MSG_PEEK disabled. Previously, the failed message was wrongly
-        * discarded and the next message received.
-        */
-       NL_CAPABILITY_NL_RECV_FAIL_TRUNC_NO_PEEK = 8,
-#define NL_CAPABILITY_NL_RECV_FAIL_TRUNC_NO_PEEK NL_CAPABILITY_NL_RECV_FAIL_TRUNC_NO_PEEK
-
-       /**
-        * rtnl_link_build_change_request() and rtnl_link_change() would set ifi.ifi_flags but leave
-        * ifi.ifi_change at zero. This was later fixed to set ifi.ifi_change to the flags that are actually
-        * set in changes.
-        */
-       NL_CAPABILITY_LINK_BUILD_CHANGE_REQUEST_SET_CHANGE = 9,
-#define NL_CAPABILITY_LINK_BUILD_CHANGE_REQUEST_SET_CHANGE NL_CAPABILITY_LINK_BUILD_CHANGE_REQUEST_SET_CHANGE
-
-       /**
-        * Between 3.2.14 (64fcb47a36ec12d7e7f00605f6a8952ce985dd08) and 3.2.22 (8571f58f23763d8db7365d02c9b27832ad3d7005),
-        * rtnl_neigh_get() behaved differently and only returned objects with family AF_UNSPEC.
-        * This capability indicates, that the function was fixed. The absense of the capability,
-        * doesn't indicate however which behavior the function will have. So beware. */
-       NL_CAPABILITY_RTNL_NEIGH_GET_FILTER_AF_UNSPEC_FIX = 10,
-#define NL_CAPABILITY_RTNL_NEIGH_GET_FILTER_AF_UNSPEC_FIX NL_CAPABILITY_RTNL_NEIGH_GET_FILTER_AF_UNSPEC_FIX
-
-       /**
-        * The library version is libnl3 3.2.27 or newer. This capability should never be backported.
-        */
-       NL_CAPABILITY_VERSION_3_2_27 = 11,
-#define NL_CAPABILITY_VERSION_3_2_27 NL_CAPABILITY_VERSION_3_2_27
-
-       /**
-        * Properly serialize vlan protocol IFLA_VLAN_PROTOCOL.
-        */
-       NL_CAPABILITY_RTNL_LINK_VLAN_PROTOCOL_SERIALZE = 12,
-#define NL_CAPABILITY_RTNL_LINK_VLAN_PROTOCOL_SERIALZE NL_CAPABILITY_RTNL_LINK_VLAN_PROTOCOL_SERIALZE
-
-       /**
-        * Properly read gre REMOTE port.
-        */
-       NL_CAPABILITY_RTNL_LINK_PARSE_GRE_REMOTE = 13,
-#define NL_CAPABILITY_RTNL_LINK_PARSE_GRE_REMOTE NL_CAPABILITY_RTNL_LINK_PARSE_GRE_REMOTE
-
-       /**
-        * Don't skip over vlan ingress-map entries with "to" field zero when serializing
-        * a netlink message. Previously such entires would be ignored which inhibits the
-        * user from clearing ingress map entries.
-        */
-       NL_CAPABILITY_RTNL_LINK_VLAN_INGRESS_MAP_CLEAR = 14,
-#define NL_CAPABILITY_RTNL_LINK_VLAN_INGRESS_MAP_CLEAR NL_CAPABILITY_RTNL_LINK_VLAN_INGRESS_MAP_CLEAR
-
-       /**
-        * Consider vxlan link info for nl_object_diff().
-        */
-       NL_CAPABILITY_RTNL_LINK_VXLAN_IO_COMPARE = 15,
-#define NL_CAPABILITY_RTNL_LINK_VXLAN_IO_COMPARE NL_CAPABILITY_RTNL_LINK_VXLAN_IO_COMPARE
-
-       /**
-        * Support 64 bit attributes for nl_object_diff().
-        */
-       NL_CAPABILITY_NL_OBJECT_DIFF64 = 16,
-#define NL_CAPABILITY_NL_OBJECT_DIFF64 NL_CAPABILITY_NL_OBJECT_DIFF64
-
-       /**
-        * Support omitting @key argument to xfrmnl_sa_get_*_params() to check
-        * for required buffer size for key.
-        */
-       NL_CAPABILITY_XFRM_SA_KEY_SIZE = 17,
-#define NL_CAPABILITY_XFRM_SA_KEY_SIZE NL_CAPABILITY_XFRM_SA_KEY_SIZE
-
-       /**
-        * Properly handle nl_object_identity() for AF_INET and AF_INET6 addresses
-        * and properly handle the peer/IFA_ADDRESS for IPv4 addresses.
-        */
-       NL_CAPABILITY_RTNL_ADDR_PEER_FIX = 18,
-#define NL_CAPABILITY_RTNL_ADDR_PEER_FIX NL_CAPABILITY_RTNL_ADDR_PEER_FIX
-
-       /**
-        * The library version is libnl3 3.2.28 or newer. This capability should never be backported.
-        */
-       NL_CAPABILITY_VERSION_3_2_28 = 19,
-#define NL_CAPABILITY_VERSION_3_2_28 NL_CAPABILITY_VERSION_3_2_28
-
-       __NL_CAPABILITY_MAX,
-       NL_CAPABILITY_MAX = (__NL_CAPABILITY_MAX - 1),
-#define NL_CAPABILITY_MAX NL_CAPABILITY_MAX
-
-       /**
-        * The range 0x7000 to 0x7FFF is reserved for private capabilities. Upstream libnl3 will
-        * not register capabilities in this range. However, instead of adding private capabilities,
-        * better register their number with upstream libnl3. */
-#define NL_CAPABILITY_IS_USER_RESERVED(cap)    ( ((cap) & ~0x0FFF) == 0x7000 )
-};
-int nl_has_capability (int capability);
-
 #ifdef __cplusplus
 }
 #endif

Also (potentially) suspect:

$ diff -u <(tree /nix/store/yj6pgszfh1gzwv18qv5lj475y6c6lnqy-libnl-3.2.28-dev) <(tree /nix/store/ljgwlylp1rsxnmvlk4m3k2hj5kn743ih-libnl-3.2.29-dev)
--- /proc/self/fd/11    2017-01-27 17:24:03.513478434 -0500
+++ /proc/self/fd/12    2017-01-27 17:24:03.513478434 -0500
@@ -1,4 +1,4 @@
-/nix/store/yj6pgszfh1gzwv18qv5lj475y6c6lnqy-libnl-3.2.28-dev
+/nix/store/ljgwlylp1rsxnmvlk4m3k2hj5kn743ih-libnl-3.2.29-dev
 โ”œโ”€โ”€ include
 โ”‚ย ย  โ””โ”€โ”€ libnl3
 โ”‚ย ย      โ””โ”€โ”€ netlink
@@ -55,10 +55,6 @@
 โ”‚ย ย          โ”œโ”€โ”€ object-api.h
 โ”‚ย ย          โ”œโ”€โ”€ object.h
 โ”‚ย ย          โ”œโ”€โ”€ route
-โ”‚ย ย          โ”‚ย ย  โ”œโ”€โ”€ act
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ mirred.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ skbedit.h
-โ”‚ย ย          โ”‚ย ย  โ”œโ”€โ”€ action.h
 โ”‚ย ย          โ”‚ย ย  โ”œโ”€โ”€ addr.h
 โ”‚ย ย          โ”‚ย ย  โ”œโ”€โ”€ class.h
 โ”‚ย ย          โ”‚ย ย  โ”œโ”€โ”€ classifier.h
@@ -79,21 +75,10 @@
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ bonding.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ bridge.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ can.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ inet6.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ inet.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ info-api.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ ip6tnl.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ ipgre.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ ipip.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ ipvlan.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ ipvti.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ macsec.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ macvlan.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ macvtap.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ sit.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ veth.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ vlan.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ vrf.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ vxlan.h
 โ”‚ย ย          โ”‚ย ย  โ”œโ”€โ”€ link.h
 โ”‚ย ย          โ”‚ย ย  โ”œโ”€โ”€ neighbour.h
@@ -104,8 +89,6 @@
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ cbq.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ dsmark.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ fifo.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ fq_codel.h
-โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ hfsc.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ htb.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ netem.h
 โ”‚ย ย          โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ plug.h
@@ -122,24 +105,15 @@
 โ”‚ย ย          โ”œโ”€โ”€ socket.h
 โ”‚ย ย          โ”œโ”€โ”€ types.h
 โ”‚ย ย          โ”œโ”€โ”€ utils.h
-โ”‚ย ย          โ”œโ”€โ”€ version.h
-โ”‚ย ย          โ””โ”€โ”€ xfrm
-โ”‚ย ย              โ”œโ”€โ”€ ae.h
-โ”‚ย ย              โ”œโ”€โ”€ lifetime.h
-โ”‚ย ย              โ”œโ”€โ”€ sa.h
-โ”‚ย ย              โ”œโ”€โ”€ selector.h
-โ”‚ย ย              โ”œโ”€โ”€ sp.h
-โ”‚ย ย              โ””โ”€โ”€ template.h
+โ”‚ย ย          โ””โ”€โ”€ version.h
 โ”œโ”€โ”€ lib
 โ”‚ย ย  โ””โ”€โ”€ pkgconfig
 โ”‚ย ย      โ”œโ”€โ”€ libnl-3.0.pc
 โ”‚ย ย      โ”œโ”€โ”€ libnl-cli-3.0.pc
 โ”‚ย ย      โ”œโ”€โ”€ libnl-genl-3.0.pc
-โ”‚ย ย      โ”œโ”€โ”€ libnl-idiag-3.0.pc
 โ”‚ย ย      โ”œโ”€โ”€ libnl-nf-3.0.pc
-โ”‚ย ย      โ”œโ”€โ”€ libnl-route-3.0.pc
-โ”‚ย ย      โ””โ”€โ”€ libnl-xfrm-3.0.pc
+โ”‚ย ย      โ””โ”€โ”€ libnl-route-3.0.pc
 โ””โ”€โ”€ nix-support
     โ””โ”€โ”€ propagated-native-build-inputs

-18 directories, 124 files
+16 directories, 100 files

Looks like the nl update was accidentally a downgrade.

I'll prepare a patch for libnl.

Yeah, just noticed, hehe. Thanks!

Oops, ignore the first PR, picked the wrong branch.

Sorry, y'all...! :o

I can't blame you for a typo, we're all human ๐Ÿ˜„

Was this page helpful?
0 / 5 - 0 ratings

Related issues

copumpkin picture copumpkin  ยท  3Comments

tomberek picture tomberek  ยท  3Comments

ob7 picture ob7  ยท  3Comments

grahamc picture grahamc  ยท  3Comments

yawnt picture yawnt  ยท  3Comments