Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 382471

Summary: >sys-power/powertop-1.9 Fails to build with >libnl-1
Product: Gentoo Linux Reporter: Tomáš Chvátal (RETIRED) <scarabeus>
Component: New packagesAssignee: Mobile Herd (OBSOLETE) <mobile+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: kai.huuhko, pinkbyte
Priority: Normal Keywords: PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 342461    
Attachments: build.log
build.log

Description Tomáš Chvátal (RETIRED) gentoo-dev 2011-09-10 08:47:00 UTC
Created attachment 286043 [details]
build.log

As per summary the package in the description fails to build with libnl-2 and libnl-3.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-10-27 16:21:45 UTC
--- ChangeLog   2011-08-25 13:59:57.000000000 +0200
+++ ChangeLog.new       2011-10-27 18:20:46.000000000 +0200
@@ -2,6 +2,10 @@
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
 # $Header: /var/cvsroot/gentoo-x86/sys-power/powertop/ChangeLog,v 1.46 2011/08/23 22:14:16 vapier Exp $

+  27 Oct 2011; Jeroen Roovers <jer@gentoo.org> powertop-1.97-r1.ebuild,
+  powertop-1.98.ebuild:
+  Fix libnl dependency (bug #382471).
+

I haven't touched the 9999 ebuild.
Comment 2 Kai Huuhko 2012-02-09 02:50:05 UTC
Created attachment 301333 [details]
build.log

emerge =sys-power/powertop-1.98 fails

Both libnl1 and libnl3 are installed.
Comment 3 Sergey Popov gentoo-dev 2012-06-19 07:40:23 UTC
powertop 2.0(which is in tree now) builds successfully with libnl-3.2.7 and libnl-1.1. But when they installed both - it links against libnl-1.1.
Comment 4 Tomáš Chvátal (RETIRED) gentoo-dev 2012-06-19 07:53:18 UTC
That is caused by the check in the configure.ac

has_libnl_ver=0
PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [
	AC_SEARCH_LIBS([nl_socket_alloc], [nl], [has_libnl_ver=2], [
		     PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [has_libnl_ver=3],
				       [AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [has_libnl_ver=3], [], [])])
	], [])
])
if (test "$has_libnl_ver" -eq 0); then
	AC_MSG_ERROR(libnl is required but not found)
fi
if (test "$has_libnl_ver" -gt 1); then
	AC_DEFINE([HAVE_LIBNL20], [1], [Define if you have libnl-2.0 or higher])
fi

The order should be done other way around, i ommited libnl-2 which no distro actually used.

PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [
    AC_DEFINE([HAVE_LIBNL20], [1], [Define if you have libnl-2.0 or higher])
], [
    PKG_CHECK_MODULES([LIBNL], [libnl-1])
])
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-08 10:19:49 UTC
(In reply to comment #3)
> powertop 2.0(which is in tree now) builds successfully with libnl-3.2.7 and
> libnl-1.1. But when they installed both - it links against libnl-1.1.

It seems like the original bug is fixed. You should really file a new bug report about the incorrect 1.1 preference, so that we can finally resolve the libnl:3 tracker bug.