Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453736 - net-misc/networkmanager-0.9.6.4 with dev-libs/libnl-3.2.20 - nm-netlink-monitor.c:41:32: fatal error: netlink/object-api.h: No such file or directory
Summary: net-misc/networkmanager-0.9.6.4 with dev-libs/libnl-3.2.20 - nm-netlink-monit...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
: 453766 453912 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-23 21:51 UTC by Harris Landgarten
Modified: 2013-01-25 03:51 UTC (History)
12 users (show)

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


Attachments
build.log (build.log,363.58 KB, text/plain)
2013-01-24 02:09 UTC, Ben Kohler
Details
emerge --info (emerge-info.log,5.05 KB, text/plain)
2013-01-24 03:21 UTC, Ben Kohler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harris Landgarten 2013-01-23 21:51:01 UTC
It looks like libnl renamed /usr/include/libnl3/netlink/object-api.h to object.h

workaround to allow building ln -s /usr/include/libnl3/netlink/object.h /usr/include/libnl3/netlink/object-api.h

That fixes the build problem but I don't use the package so I cannot test it to see if it works.
Comment 1 Lukas Elsner 2013-01-23 22:47:50 UTC
confirm
Comment 2 Ben Kohler gentoo-dev 2013-01-24 02:09:27 UTC
Created attachment 336684 [details]
build.log

Probably broken by this change here:

https://github.com/tgraf/libnl/commit/f20bbe1f07fcff1509425884f5ed72ca8d5fb6ab

"Their API is marked unstable in the documentation and nobody
is using them so far."

That said, net-misc/networkmanager-0.9.6.4 does appear to build and run fine here if I simply "touch /usr/include/libnl3/netlink/object-api.h".
Comment 3 Mark R. Pariente 2013-01-24 02:50:59 UTC
Confirm that the ln workaround mentioned in the first comment allows the compile to succeed. NetworkManager compiled this way works fine.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-24 02:57:33 UTC
I thought I fixed all of the problems. Upstream already fixed some of the issues and appears to have rerolled the release, but it wasn't enough, I guess. It's package.masked for now.
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-01-24 03:12:48 UTC
I cannot reproduce the problem :/

networkmanager-0.9.6.4 builds fine against libnl-3.2.20 on my machine with the same use flags as in the log attached in comment #0.

If you are experiencing this problem, please post your emerge --info. Maybe the failure only manifests when using certain flags or a specific gcc version.
Comment 6 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-01-24 03:13:47 UTC
(In reply to comment #5)
> attached in comment #0.

should be: as attached in comment #2
Comment 7 Ben Kohler gentoo-dev 2013-01-24 03:21:55 UTC
Created attachment 336690 [details]
emerge --info
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-01-24 03:35:54 UTC
Found a way to reproduce.

Failure does not appear if libnl-1.1-r3 and libnl-3.2.20 are installed at the same time; but if only libnl-3.2.20 is installed, networkmanager-0.9.6.4 does indeed fail to build.
Comment 9 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-01-24 04:39:09 UTC
Fixed in cvs without a revision bump; patch submitted upstream at https://bugzilla.gnome.org/show_bug.cgi?id=692423

Jeroen, feel free to unmask libnl-3.2.20 now :)

+  24 Jan 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
+  -networkmanager-0.9.4.0-r5.ebuild, -networkmanager-0.9.4.0-r7.ebuild,
+  -networkmanager-0.9.6.0.ebuild,
+  -files/networkmanager-0.9.6.0-cached-ipv6-routes-1.patch,
+  -files/networkmanager-0.9.6.0-cached-ipv6-routes-2.patch,
+  networkmanager-0.9.6.4.ebuild,
+  +files/networkmanager-0.9.6.4-object-api.h.patch:
+  Fix build failure with libnl-3.2.20 (bug #453736, thanks to Harris
+  Landgarten, Ben Kohler et al.); drop old.
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-24 11:50:54 UTC
*** Bug 453766 has been marked as a duplicate of this bug. ***
Comment 11 Pavel Šimerda 2013-01-24 19:39:25 UTC
Please be careful with this patch, as it breaks NetworkManager with libnl < 3.2.20!

See comments in:

https://bugzilla.gnome.org/show_bug.cgi?id=692423
Comment 12 Pavel Šimerda 2013-01-24 19:45:52 UTC
NM commit in master that fixes that:

commit ff15a5e8fbe2e8e7199d84c96d4b2f3c60cb8550
Author: Pavel Šimerda <psimerda@redhat.com>
Date:   Thu Jan 24 20:40:25 2013 +0100

    netlink: workaround to build against libnl3 < 3.2.20
    
    Commit 418a428 fixed building against libnl3 >= 3.2.20 but due to a bug
    in libnl it also prevents building against libnl3 < 3.2.20.
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=692423

diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c
index 5bbf500..4d0b0c5 100644
--- a/src/nm-netlink-monitor.c
+++ b/src/nm-netlink-monitor.c
@@ -38,6 +38,10 @@
 #include <linux/if.h>
 #include <linux/unistd.h>
 #include <unistd.h>
+#include <netlink/version.h>
+#if LIBNL_VER_NUM == LIBNL_VER (3, 2) && LIBNL_VER_MIC < 20
+#include <netlink/object-api.h>
+#endif
 #include <netlink/object.h>
 #include <netlink/route/addr.h>
 #include <netlink/route/rtnl.h>
Comment 13 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-01-25 03:50:27 UTC
(In reply to comment #12)

Pavel, thanks for catching my mistake. Unfortunately, we can't apply your patch in portage since it's incompatible with libnl-1.1 and USE=wimax :/

Since the new libnl-3.2.21 release installs a minimal variant of object-api.h for compatibility, I am simply going to remove my patch from the networkmanager-0.9.6.4 ebuild.

+  25 Jan 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
+  networkmanager-0.9.6.4.ebuild,
+  -files/networkmanager-0.9.6.4-object-api.h.patch:
+  Remove the patch, since it apparently causes problems when building against
+  older libnl:3 releases (thanks to Pavel Šimerda). Instead, simply mark
+  networkmanager as incompatible with =libnl-3.2.20, since libnl-3.2.21
+  installs object-api.h again.
Comment 14 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-01-25 03:51:47 UTC
*** Bug 453912 has been marked as a duplicate of this bug. ***