Skip to contentSkip to conversation

Fix trying to use libnl-2.0 when only libnl-3.0 is installed

PATCH In review Vinicius Costa Gomes 5 participants 7 messages May 12, 2012 – May 14, 2012

lore
Share & tools
lore

Vinicius Costa Gomes

author
#0 lore raw

PATCH 1/1 Fix trying to use libnl-2.0 when only libnl-3.0 is installed

From: Vinicius Costa Gomes <vinicius.gomes(a)openbossa.org>

When using libnl-3.0 we need to link with libnl-genl also, if not, we get a lot of undefined symbols.

---
 configure.ac |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index 2d56684..3579b6e 100644
@@ -56,7 +56,7 @@ PKG_CHECK_MODULES([LIBZ], [zlib],[],[
 
 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], [
+	AC_SEARCH_LIBS([nl_socket_alloc], [libnl-2.0], [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], [], [])])
 	], [])
Signature · 1 line
1.7.10.1
#1 lore raw
Quoted 13 lines · Vinicius Costa Gomes

From: Vinicius Costa Gomes <vinicius.gomes(a)openbossa.org>

When using libnl-3.0 we need to link with libnl-genl also, if not, we get a lot of undefined symbols.

---
 configure.ac |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +0 -0
index 2d56684..3579b6e 100644

configure.ac PKG_CHECK_MODULES([LIBZ], [zlib],[],[ · line 59

Quoted 5 lines
configure.ac +1 -1
@@ -56,7 +56,7 @@ PKG_CHECK_MODULES([LIBZ], [zlib],[],[
 
 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], [
+       AC_SEARCH_LIBS([nl_socket_alloc], [libnl-2.0], [has_libnl_ver=2], [

are you sure you want the linker to check for -llibnl-2.0? that means it's going to try to find a "liblibnl-2.0.so" (note the double "lib" here).

Auke

#2 lore raw
Quoted 28 lines · Auke-jan H

On Sat, May 12, 2012 at 8:50 AM, Vinicius Costa Gomes <vcgomes(a)gmail.com <mailto:vcgomes(a)gmail.com>> wrote:

    From: Vinicius Costa Gomes <vinicius.gomes(a)openbossa.org
    <mailto:vinicius.gomes(a)openbossa.org>>

    When using libnl-3.0 we need to link with libnl-genl also, if not, we
    get a lot of undefined symbols.
    ---
     configure.ac <http://configure.ac> |    2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/configure.ac <http://configure.ac> b/configure.ac
    <http://configure.ac>
    index 2d56684..3579b6e 100644
    --- a/configure.ac <http://configure.ac>
    +++ b/configure.ac <http://configure.ac>
    @@ -56,7 +56,7 @@ PKG_CHECK_MODULES([LIBZ], [zlib],[],[

     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], [
    +       AC_SEARCH_LIBS([nl_socket_alloc], [libnl-2.0],
    [has_libnl_ver=2], [
Quoted 5 lines

are you sure you want the linker to check for -llibnl-2.0? that means it's going to try to find a "liblibnl-2.0.so <http://liblibnl-2.0.so>"
(note the double "lib" here).

Auke

this autoconf stuff is giving me a headache

maybe we should ask the libnl guys if they have some snippet that they recommend.... after all I doubt we're the only ones dealing with their library.

#3 lore raw
Quoted 14 lines · Arjan van de Ven
Quoted 10 lines

When using libnl-3.0 we need to link with libnl-genl also, if not, we get a lot of undefined symbols.
---
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], [
+ AC_SEARCH_LIBS([nl_socket_alloc], [libnl-2.0],
[has_libnl_ver=2], [

Quoted 3 lines

are you sure you want the linker to check for -llibnl-2.0? that means it's going to try to find a "liblibnl-2.0.so <http://liblibnl-2.0.so>"
(note the double "lib" here).

Quoted 5 lines

this autoconf stuff is giving me a headache

maybe we should ask the libnl guys if they have some snippet that they recommend.... after all I doubt we're the only ones dealing with their library.

libnl2 always has nl_socket_alloc, does it not? Why check for it?

(Why even bother with libnl1 and libnl2 anyway? They are obsolete.)

#4 lore raw
Quoted 2 lines

(Why even bother with libnl1 and libnl2 anyway? They are obsolete.)

as long as latest Fedora, Debian and Ubuntu have the current one, I wouldn't mind just ditching support for the old ones...

#5 lore raw
Quoted 4 lines · Arjan van de Ven
Quoted 2 lines

(Why even bother with libnl1 and libnl2 anyway? They are obsolete.)

as long as latest Fedora, Debian and Ubuntu have the current one

They do

#6 lore raw
Quoted 5 lines · Jan Engelhardt
Quoted 2 lines · Arjan van de Ven
Quoted 1 line

(Why even bother with libnl1 and libnl2 anyway? They are obsolete.)

as long as latest Fedora, Debian and Ubuntu have the current one

They do

Can't ditch the old ones as they are still used by older distributions.

Quoted 4 lines

_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop