* [Powertop] [Powertop ]compiling issue and running issue
@ 2012-10-31 14:11 Austin Zhang
0 siblings, 0 replies; 9+ messages in thread
From: Austin Zhang @ 2012-10-31 14:11 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]
Hi,
I am trying to compile powertop on my box: ubuntu 12.04, X86-64.
(1)compiling issue
Here, my system didn’t install libnl-1, but I installed libnl2 (under
/usr/lib) and libnl-3 (under /lib).
Then when ‘./configure’, I got:
checking for LIBNL... no
configure: error: Package requirements (libnl-1) were not met:
No package 'libnl-1' found
so seemed the below logic in configure.ac doesn’t work
……
has_libnl_ver=0
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], [
AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
has_libnl_ver=2], [
PKG_CHECK_MODULES([LIBNL], [libnl-1],
[has_libnl_ver=1], [])])])])
……
Then I uninstalled libnl-3, only leave libnl2 there, but no change, the
has_libnl_ver still is 1;
So I did some hacks, to set has_libnl_ver=2 (so got HAVE_LIBNL20 defined),
and remark above logic, then after got Makefile, I manully add -lnl and
-lnl-genl into ./src/Makefile, then I got one powertop linked against my
libnl-2.
But obviously, it is not a good idea to do as this. So is anyone
encountering similar issue there if only have libnl2 or libnl-3, the
original configure.ac in fact doesn’t work?
(2)running issue
With above got powertop (linked against libnl2), after launched the
powertop, I cannot switch to other menus (Idle stats/Freq stats/Device
stats/Tunable), I can only stay at ‘overview’ menu, direction arrows only
move the screen a little left/right.
Is that one known issue?
Thanks.
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 3018 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Powertop] [Powertop ]compiling issue and running issue
@ 2012-10-31 14:16 Sergey Senozhatsky
0 siblings, 0 replies; 9+ messages in thread
From: Sergey Senozhatsky @ 2012-10-31 14:16 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
On (10/31/12 22:11), Austin Zhang wrote:
>
1) requires investigation
> (2)running issue
>
> With above got powertop (linked against libnl2), after launched the
> powertop, I cannot switch to other menus (Idle stats/Freq stats/Device
> stats/Tunable), I can only stay at �overview� menu, direction arrows only
> move the screen a little left/right.
>
2) use TAB button for navigation, arrows -- to move view-port.
-ss
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Powertop] [Powertop ]compiling issue and running issue
@ 2012-10-31 15:24 Arjan van de Ven
0 siblings, 0 replies; 9+ messages in thread
From: Arjan van de Ven @ 2012-10-31 15:24 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
On 10/31/2012 7:11 AM, Austin Zhang wrote:
> Hi,
>
> I am trying to compile powertop on my box: ubuntu 12.04, X86-64.
>
> (1)compiling issue
>
> Here, my system didn’t install libnl-1, but I installed libnl2 (under /usr/lib) and libnl-3 (under /lib).
on a 64 bit system, that should have been /usr/lib64 and /lib64
otherwise you got 32 bit libraries ;-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Powertop] [Powertop ]compiling issue and running issue
@ 2012-10-31 16:18 Austin Zhang
0 siblings, 0 replies; 9+ messages in thread
From: Austin Zhang @ 2012-10-31 16:18 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]
thanks for your reply. In case I confused people, I list it as:
austin(a)austin-Studio:~$ uname -a
Linux austin-Studio 3.0.0-15-generic #26-Ubuntu SMP Fri Jan 20 17:23:00 UTC
2012 x86_64 x86_64 x86_64 GNU/Linux
austin(a)austin-Studio:~$ dpkg -L libnl2
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libnl2
/usr/share/doc/libnl2/copyright
/usr/share/doc/libnl2/changelog.Debian.gz
/usr/lib
/usr/lib/libnl-cli.so.2.0.0
/usr/lib/libnl-route.so.2.0.0
/usr/lib/libnl-genl.so.2.0.0
/usr/lib/libnl-nf.so.2.0.0
/usr/lib/libnl.so.2.0.0
/usr/lib/libnl-route.so.2
/usr/lib/libnl-cli.so.2
/usr/lib/libnl-genl.so.2
/usr/lib/libnl.so.2
/usr/lib/libnl-nf.so.2
austin(a)austin-Studio:~$ dpkg -L libnl3
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libnl3
/usr/share/doc/libnl3/README.Debian
/usr/share/doc/libnl3/copyright
/usr/share/doc/libnl3/changelog.Debian.gz
/usr/lib
/usr/lib/libnl-cli.so.3.0.0
/usr/lib/libnl-genl.so.3.0.0
/usr/lib/libnl-nf.so.3.0.0
/usr/lib/libnl-route.so.3.0.0
/usr/lib/libnl.so.3.0.0
/usr/lib/libnl-cli.so.3
/usr/lib/libnl-genl.so.3
/usr/lib/libnl-nf.so.3
/usr/lib/libnl-route.so.3
/usr/lib/libnl.so.3
austin(a)austin-Studio:~$
2012/10/31 Arjan van de Ven <arjan(a)linux.intel.com>
> On 10/31/2012 7:11 AM, Austin Zhang wrote:
> > Hi,
> >
> > I am trying to compile powertop on my box: ubuntu 12.04, X86-64.
> >
> > (1)compiling issue
> >
> > Here, my system didn’t install libnl-1, but I installed libnl2 (under
> /usr/lib) and libnl-3 (under /lib).
>
>
> on a 64 bit system, that should have been /usr/lib64 and /lib64
> otherwise you got 32 bit libraries ;-)
>
>
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 2686 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Powertop] [Powertop ]compiling issue and running issue
@ 2012-10-31 16:25 Austin Zhang
0 siblings, 0 replies; 9+ messages in thread
From: Austin Zhang @ 2012-10-31 16:25 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 2878 bytes --]
In another box with i686 installed, it also encounted into similar issue
(cannot link against libnl2)
root(a)h-desktop:~# dpkg -L libnl2
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libnl2
/usr/share/doc/libnl2/copyright
/usr/share/doc/libnl2/changelog.Debian.gz
/usr/lib
/usr/lib/libnl-cli.so.2.0.0
/usr/lib/libnl-genl.so.2.0.0
/usr/lib/libnl-nf.so.2.0.0
/usr/lib/libnl-route.so.2.0.0
/usr/lib/libnl.so.2.0.0
/usr/lib/libnl-cli.so.2
/usr/lib/libnl-genl.so.2
/usr/lib/libnl-nf.so.2
/usr/lib/libnl-route.so.2
/usr/lib/libnl.so.2
root(a)h-desktop:~# dpkg -L libnl-3-200
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libnl-3-200
/usr/share/doc/libnl-3-200/copyright
/usr/share/doc/libnl-3-200/README.Debian
/usr/share/doc/libnl-3-200/changelog.Debian.gz
/lib
/lib/libnl-3.so.200.3.0
/etc
/etc/libnl-3
/etc/libnl-3/classid
/etc/libnl-3/pktloc
/lib/libnl-3.so.200
root(a)h-desktop:~# uname -a
Linux h-desktop 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC
2011 i686 i686 i386 GNU/Linux
2012/11/1 Austin Zhang <zhang.austin(a)gmail.com>
> thanks for your reply. In case I confused people, I list it as:
>
> austin(a)austin-Studio:~$ uname -a
>
> Linux austin-Studio 3.0.0-15-generic #26-Ubuntu SMP Fri Jan 20 17:23:00
> UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> austin(a)austin-Studio:~$ dpkg -L libnl2
>
> /.
> /usr
> /usr/share
> /usr/share/doc
> /usr/share/doc/libnl2
> /usr/share/doc/libnl2/copyright
> /usr/share/doc/libnl2/changelog.Debian.gz
> /usr/lib
> /usr/lib/libnl-cli.so.2.0.0
> /usr/lib/libnl-route.so.2.0.0
> /usr/lib/libnl-genl.so.2.0.0
> /usr/lib/libnl-nf.so.2.0.0
> /usr/lib/libnl.so.2.0.0
> /usr/lib/libnl-route.so.2
> /usr/lib/libnl-cli.so.2
> /usr/lib/libnl-genl.so.2
> /usr/lib/libnl.so.2
> /usr/lib/libnl-nf.so.2
> austin(a)austin-Studio:~$ dpkg -L libnl3
>
> /.
> /usr
> /usr/share
> /usr/share/doc
> /usr/share/doc/libnl3
> /usr/share/doc/libnl3/README.Debian
> /usr/share/doc/libnl3/copyright
> /usr/share/doc/libnl3/changelog.Debian.gz
> /usr/lib
> /usr/lib/libnl-cli.so.3.0.0
> /usr/lib/libnl-genl.so.3.0.0
> /usr/lib/libnl-nf.so.3.0.0
> /usr/lib/libnl-route.so.3.0.0
> /usr/lib/libnl.so.3.0.0
> /usr/lib/libnl-cli.so.3
> /usr/lib/libnl-genl.so.3
> /usr/lib/libnl-nf.so.3
> /usr/lib/libnl-route.so.3
> /usr/lib/libnl.so.3
> austin(a)austin-Studio:~$
>
>
> 2012/10/31 Arjan van de Ven <arjan(a)linux.intel.com>
>
>> On 10/31/2012 7:11 AM, Austin Zhang wrote:
>> > Hi,
>> >
>> > I am trying to compile powertop on my box: ubuntu 12.04, X86-64.
>> >
>> > (1)compiling issue
>> >
>> > Here, my system didn’t install libnl-1, but I installed libnl2 (under
>> /usr/lib) and libnl-3 (under /lib).
>>
>>
>> on a 64 bit system, that should have been /usr/lib64 and /lib64
>> otherwise you got 32 bit libraries ;-)
>>
>>
>
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 4583 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Powertop] [Powertop ]compiling issue and running issue
@ 2012-10-31 16:31 Austin Zhang
0 siblings, 0 replies; 9+ messages in thread
From: Austin Zhang @ 2012-10-31 16:31 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 3454 bytes --]
>In another box with i686 installed, it also encounted into similar issue
(cannot link against libnl2)
Sorry for above mistake, what I means is : 'cannot finish ./configure when
I just have nl2', not 'cannot link against libnl2', if have manually hack
to get that Makefile, it can compile and link against nl2 as the 1st
message description.
thanks.
2012/11/1 Austin Zhang <zhang.austin(a)gmail.com>
> In another box with i686 installed, it also encounted into similar issue
> (cannot link against libnl2)
>
> root(a)h-desktop:~# dpkg -L libnl2
>
>
> /.
> /usr
> /usr/share
> /usr/share/doc
> /usr/share/doc/libnl2
> /usr/share/doc/libnl2/copyright
> /usr/share/doc/libnl2/changelog.Debian.gz
> /usr/lib
> /usr/lib/libnl-cli.so.2.0.0
> /usr/lib/libnl-genl.so.2.0.0
> /usr/lib/libnl-nf.so.2.0.0
> /usr/lib/libnl-route.so.2.0.0
> /usr/lib/libnl.so.2.0.0
> /usr/lib/libnl-cli.so.2
> /usr/lib/libnl-genl.so.2
> /usr/lib/libnl-nf.so.2
> /usr/lib/libnl-route.so.2
> /usr/lib/libnl.so.2
> root(a)h-desktop:~# dpkg -L libnl-3-200
> /.
> /usr
> /usr/share
> /usr/share/doc
> /usr/share/doc/libnl-3-200
> /usr/share/doc/libnl-3-200/copyright
> /usr/share/doc/libnl-3-200/README.Debian
> /usr/share/doc/libnl-3-200/changelog.Debian.gz
> /lib
> /lib/libnl-3.so.200.3.0
> /etc
> /etc/libnl-3
> /etc/libnl-3/classid
> /etc/libnl-3/pktloc
> /lib/libnl-3.so.200
> root(a)h-desktop:~# uname -a
> Linux h-desktop 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC
> 2011 i686 i686 i386 GNU/Linux
>
>
> 2012/11/1 Austin Zhang <zhang.austin(a)gmail.com>
>
>> thanks for your reply. In case I confused people, I list it as:
>>
>> austin(a)austin-Studio:~$ uname -a
>>
>> Linux austin-Studio 3.0.0-15-generic #26-Ubuntu SMP Fri Jan 20 17:23:00
>> UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
>> austin(a)austin-Studio:~$ dpkg -L libnl2
>>
>> /.
>> /usr
>> /usr/share
>> /usr/share/doc
>> /usr/share/doc/libnl2
>> /usr/share/doc/libnl2/copyright
>> /usr/share/doc/libnl2/changelog.Debian.gz
>> /usr/lib
>> /usr/lib/libnl-cli.so.2.0.0
>> /usr/lib/libnl-route.so.2.0.0
>> /usr/lib/libnl-genl.so.2.0.0
>> /usr/lib/libnl-nf.so.2.0.0
>> /usr/lib/libnl.so.2.0.0
>> /usr/lib/libnl-route.so.2
>> /usr/lib/libnl-cli.so.2
>> /usr/lib/libnl-genl.so.2
>> /usr/lib/libnl.so.2
>> /usr/lib/libnl-nf.so.2
>> austin(a)austin-Studio:~$ dpkg -L libnl3
>>
>> /.
>> /usr
>> /usr/share
>> /usr/share/doc
>> /usr/share/doc/libnl3
>> /usr/share/doc/libnl3/README.Debian
>> /usr/share/doc/libnl3/copyright
>> /usr/share/doc/libnl3/changelog.Debian.gz
>> /usr/lib
>> /usr/lib/libnl-cli.so.3.0.0
>> /usr/lib/libnl-genl.so.3.0.0
>> /usr/lib/libnl-nf.so.3.0.0
>> /usr/lib/libnl-route.so.3.0.0
>> /usr/lib/libnl.so.3.0.0
>> /usr/lib/libnl-cli.so.3
>> /usr/lib/libnl-genl.so.3
>> /usr/lib/libnl-nf.so.3
>> /usr/lib/libnl-route.so.3
>> /usr/lib/libnl.so.3
>> austin(a)austin-Studio:~$
>>
>>
>> 2012/10/31 Arjan van de Ven <arjan(a)linux.intel.com>
>>
>>> On 10/31/2012 7:11 AM, Austin Zhang wrote:
>>> > Hi,
>>> >
>>> > I am trying to compile powertop on my box: ubuntu 12.04, X86-64.
>>> >
>>> > (1)compiling issue
>>> >
>>> > Here, my system didn’t install libnl-1, but I installed libnl2 (under
>>> /usr/lib) and libnl-3 (under /lib).
>>>
>>>
>>> on a 64 bit system, that should have been /usr/lib64 and /lib64
>>> otherwise you got 32 bit libraries ;-)
>>>
>>>
>>
>
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 5654 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Powertop] [Powertop ]compiling issue and running issue
@ 2012-10-31 21:03 Patrick McCarty
0 siblings, 0 replies; 9+ messages in thread
From: Patrick McCarty @ 2012-10-31 21:03 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]
On Wed, Oct 31, 2012 at 10:11:13PM +0800, Austin Zhang wrote:
> Hi,
>
> I am trying to compile powertop on my box: ubuntu 12.04, X86-64.
>
> (1)compiling issue
>
> Here, my system didn’t install libnl-1, but I installed libnl2 (under /usr/lib)
> and libnl-3 (under /lib).
>
> Then when ‘./configure’, I got:
>
> checking for LIBNL... no
>
> configure: error: Package requirements (libnl-1) were not met:
>
> No package 'libnl-1' found
>
> so seemed the below logic in configure.ac doesn’t work
>
> ……
>
> has_libnl_ver=0
>
> 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], [
>
> AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
>
> has_libnl_ver=2], [
>
> PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=
> 1], [])])])])
>
> ……
Based on the file lists you sent in a followup post, it appears that
Ubuntu uses a different naming convention for these libraries, so
AC_SEARCH_LIBS will not find the function it needs in either libnl-3 or
libnl-genl-3, since they don't exist.
Is there a -devel package you can install that provides a pkgconfig
file for libnl-3?
-Patrick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Powertop] [Powertop ]compiling issue and running issue
@ 2012-11-01 4:23 Austin Zhang
0 siblings, 0 replies; 9+ messages in thread
From: Austin Zhang @ 2012-11-01 4:23 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 3055 bytes --]
Patrick, thanks for your reply.
Yes, I already installed that dev pkg.
austin(a)austin-Studio:~/powertop/powertop-tset$ dpkg -L libnl3-dev | grep
pkgconfig
/usr/lib/pkgconfig
/usr/lib/pkgconfig/libnl-3.0.pc
austin(a)austin-Studio:~/powertop/powertop-tset$ cat
/usr/lib/pkgconfig/libnl-3.0.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libnl
Description: Convenience library for netlink sockets
Version: 3.0
Libs: -L${libdir} -lnl -lnl-route -lnl-nf -lnl-genl -lnl-cli
Cflags: -I${includedir}
austin(a)austin-Studio:~/powertop/powertop-tset$
And I also tried to uninstall libnl3-dev, and re-install libnl2-dev, same
issue.
PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [ <=== when with
libnl-3.0.pc, the logic should fall into the following has_libnl_ver=3, but
seemed not;
has_libnl_ver=3], [
AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [ <=== I also
change the nl3 to nl, and remove nl-genl-3, but it cannot find
nl_socket_alloc, because this function is from bl2 and 3, so it seemed the
system doesn't try to find this function from /usr/lib/libnl.so at all,
has_libnl_ver=3], [
AC_SEARCH_LIBS([nl_socket_alloc], [nl], [ <===same case
like above
has_libnl_ver=2], [
PKG_CHECK_MODULES([LIBNL], [libnl-1],
[has_libnl_ver=1], [])])])]) <=== finally, fall into here, but because I
don't have libnl v1, so fail to work.
2012/11/1 Patrick McCarty <patrick.mccarty(a)linux.intel.com>
> On Wed, Oct 31, 2012 at 10:11:13PM +0800, Austin Zhang wrote:
> > Hi,
> >
> > I am trying to compile powertop on my box: ubuntu 12.04, X86-64.
> >
> > (1)compiling issue
> >
> > Here, my system didn’t install libnl-1, but I installed libnl2 (under
> /usr/lib)
> > and libnl-3 (under /lib).
> >
> > Then when ‘./configure’, I got:
> >
> > checking for LIBNL... no
> >
> > configure: error: Package requirements (libnl-1) were not met:
> >
> > No package 'libnl-1' found
> >
> > so seemed the below logic in configure.ac doesn’t work
> >
> > ……
> >
> > has_libnl_ver=0
> >
> > 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], [
> >
> > AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
> >
> > has_libnl_ver=2], [
> >
> > PKG_CHECK_MODULES([LIBNL], [libnl-1],
> [has_libnl_ver=
> > 1], [])])])])
> >
> > ……
>
> Based on the file lists you sent in a followup post, it appears that
> Ubuntu uses a different naming convention for these libraries, so
> AC_SEARCH_LIBS will not find the function it needs in either libnl-3 or
> libnl-genl-3, since they don't exist.
>
> Is there a -devel package you can install that provides a pkgconfig
> file for libnl-3?
>
> -Patrick
>
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 4014 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Powertop] [Powertop ]compiling issue and running issue
@ 2012-11-01 17:14 Austin Zhang
0 siblings, 0 replies; 9+ messages in thread
From: Austin Zhang @ 2012-11-01 17:14 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 4372 bytes --]
simple patch to fix this issue (also as attachment):
commit 2150b9b784489f7a5b0b8d51a1de675504e6e1bd
Author: Austin Zhang <zhang.austin(a)gmail.com>
Date: Fri Nov 2 01:04:49 2012 +0800
Change library search condition for libnl2/3
So that we can compile in system with libnl2 or/and libnl3.
Signed-off-by: Austin Zhang <zhang.austin(a)gmail.com>
diff --git a/configure.ac b/configure.ac
index b8c183f..ccc0ec5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,11 +54,11 @@ PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[
has_libnl_ver=0
-PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [
+PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [
has_libnl_ver=3], [
AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [
has_libnl_ver=3], [
- AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
+ PKG_CHECK_MODULES([LIBNL], [libnl-2.0], [
has_libnl_ver=2], [
PKG_CHECK_MODULES([LIBNL], [libnl-1],
[has_libnl_ver=1], [])])])])
if (test "$has_libnl_ver" -eq 0); then
2012/11/1 Austin Zhang <zhang.austin(a)gmail.com>
> Patrick, thanks for your reply.
>
> Yes, I already installed that dev pkg.
>
> austin(a)austin-Studio:~/powertop/powertop-tset$ dpkg -L libnl3-dev | grep
> pkgconfig
> /usr/lib/pkgconfig
> /usr/lib/pkgconfig/libnl-3.0.pc
> austin(a)austin-Studio:~/powertop/powertop-tset$ cat
> /usr/lib/pkgconfig/libnl-3.0.pc
> prefix=/usr
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
>
> Name: libnl
> Description: Convenience library for netlink sockets
> Version: 3.0
> Libs: -L${libdir} -lnl -lnl-route -lnl-nf -lnl-genl -lnl-cli
> Cflags: -I${includedir}
> austin(a)austin-Studio:~/powertop/powertop-tset$
>
> And I also tried to uninstall libnl3-dev, and re-install libnl2-dev, same
> issue.
>
> PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [ <=== when with
> libnl-3.0.pc, the logic should fall into the following has_libnl_ver=3, but
> seemed not;
> has_libnl_ver=3], [
> AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [ <=== I also
> change the nl3 to nl, and remove nl-genl-3, but it cannot find
> nl_socket_alloc, because this function is from bl2 and 3, so it seemed the
> system doesn't try to find this function from /usr/lib/libnl.so at all,
> has_libnl_ver=3], [
> AC_SEARCH_LIBS([nl_socket_alloc], [nl], [ <===same case
> like above
> has_libnl_ver=2], [
> PKG_CHECK_MODULES([LIBNL], [libnl-1],
> [has_libnl_ver=1], [])])])]) <=== finally, fall into here, but because I
> don't have libnl v1, so fail to work.
>
>
>
>
> 2012/11/1 Patrick McCarty <patrick.mccarty(a)linux.intel.com>
>
>> On Wed, Oct 31, 2012 at 10:11:13PM +0800, Austin Zhang wrote:
>> > Hi,
>> >
>> > I am trying to compile powertop on my box: ubuntu 12.04, X86-64.
>> >
>> > (1)compiling issue
>> >
>> > Here, my system didn’t install libnl-1, but I installed libnl2 (under
>> /usr/lib)
>> > and libnl-3 (under /lib).
>> >
>> > Then when ‘./configure’, I got:
>> >
>> > checking for LIBNL... no
>> >
>> > configure: error: Package requirements (libnl-1) were not met:
>> >
>> > No package 'libnl-1' found
>> >
>> > so seemed the below logic in configure.ac doesn’t work
>> >
>> > ……
>> >
>> > has_libnl_ver=0
>> >
>> > 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], [
>> >
>> > AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
>> >
>> > has_libnl_ver=2], [
>> >
>> > PKG_CHECK_MODULES([LIBNL], [libnl-1],
>> [has_libnl_ver=
>> > 1], [])])])])
>> >
>> > ……
>>
>> Based on the file lists you sent in a followup post, it appears that
>> Ubuntu uses a different naming convention for these libraries, so
>> AC_SEARCH_LIBS will not find the function it needs in either libnl-3 or
>> libnl-genl-3, since they don't exist.
>>
>> Is there a -devel package you can install that provides a pkgconfig
>> file for libnl-3?
>>
>> -Patrick
>>
>
>
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 6041 bytes --]
[-- Attachment #3: 0001-Change-library-search-condition-for-libnl2-3.patch --]
[-- Type: application/octet-stream, Size: 1057 bytes --]
From df7c329f1a9467ad98aa9ad7d1a45085ebfe1ae7 Mon Sep 17 00:00:00 2001
From: Austin Zhang <zhang.austin@gmail.com>
Date: Fri, 2 Nov 2012 01:04:49 +0800
Subject: [PATCH] Change library search condition for libnl2/3
So that we can compile in system with libnl2 or/and libnl3.
Signed-off-by: Austin Zhang <zhang.austin@gmail.com>
---
configure.ac | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index b8c183f..ccc0ec5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,11 +54,11 @@ PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[
has_libnl_ver=0
-PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [
+PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [
has_libnl_ver=3], [
AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [
has_libnl_ver=3], [
- AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
+ PKG_CHECK_MODULES([LIBNL], [libnl-2.0], [
has_libnl_ver=2], [
PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [])])])])
if (test "$has_libnl_ver" -eq 0); then
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-11-01 17:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 15:24 [Powertop] [Powertop ]compiling issue and running issue Arjan van de Ven
-- strict thread matches above, loose matches on Subject: below --
2012-11-01 17:14 Austin Zhang
2012-11-01 4:23 Austin Zhang
2012-10-31 21:03 Patrick McCarty
2012-10-31 16:31 Austin Zhang
2012-10-31 16:25 Austin Zhang
2012-10-31 16:18 Austin Zhang
2012-10-31 14:16 Sergey Senozhatsky
2012-10-31 14:11 Austin Zhang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.