Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] Fix linking with libnl-3
@ 2011-11-08  8:09 Gilles Espinasse
  2011-11-08  8:20 ` Johannes Berg
  2011-11-08 21:17 ` Gilles Espinasse
  0 siblings, 2 replies; 3+ messages in thread
From: Gilles Espinasse @ 2011-11-08  8:09 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Gilles Espinasse

iw3.2 fail to link libnl-3.2.2 with this error
/usr/bin/ld: cannot find -lnl-genl

Contrary to previous libnl version, on v3 there is a dedicated libnl-genl-3.0.pc file
Simply use that.

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
---
 Makefile |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 8443ee6..fb46324 100644
--- a/Makefile
+++ b/Makefile
@@ -36,10 +36,11 @@ LIBS += -lnl-genl
 NLLIBNAME = libnl-2.0
 endif
 
+# libnl-3 has a separate libnl-genl-3.0.pc
 ifeq ($(NL3FOUND),Y)
 CFLAGS += -DCONFIG_LIBNL30
-LIBS += -lnl-genl
-NLLIBNAME = libnl-3.0
+LIBS =
+NLLIBNAME = libnl-genl-3.0
 endif
 
 ifeq ($(NLLIBNAME),)
-- 
1.5.6.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix linking with libnl-3
  2011-11-08  8:09 [PATCH] Fix linking with libnl-3 Gilles Espinasse
@ 2011-11-08  8:20 ` Johannes Berg
  2011-11-08 21:17 ` Gilles Espinasse
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2011-11-08  8:20 UTC (permalink / raw)
  To: Gilles Espinasse; +Cc: linux-wireless

On Tue, 2011-11-08 at 09:09 +0100, Gilles Espinasse wrote:
> iw3.2 fail to link libnl-3.2.2 with this error
> /usr/bin/ld: cannot find -lnl-genl
> 
> Contrary to previous libnl version, on v3 there is a dedicated libnl-genl-3.0.pc file
> Simply use that.

Applied, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix linking with libnl-3
  2011-11-08  8:09 [PATCH] Fix linking with libnl-3 Gilles Espinasse
  2011-11-08  8:20 ` Johannes Berg
@ 2011-11-08 21:17 ` Gilles Espinasse
  1 sibling, 0 replies; 3+ messages in thread
From: Gilles Espinasse @ 2011-11-08 21:17 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless


----- Original Message ----- 
From: "Gilles Espinasse" <g.esp@free.fr>
To: <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>; "Gilles Espinasse" <g.esp@free.fr>
Sent: Tuesday, November 08, 2011 9:09 AM
Subject: [PATCH] Fix linking with libnl-3


> iw3.2 fail to link libnl-3.2.2 with this error
> /usr/bin/ld: cannot find -lnl-genl
>
> Contrary to previous libnl version, on v3 there is a dedicated
libnl-genl-3.0.pc file
> Simply use that.
>
> Signed-off-by: Gilles Espinasse <g.esp@free.fr>
> ---
>  Makefile |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 8443ee6..fb46324 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -36,10 +36,11 @@ LIBS += -lnl-genl
>  NLLIBNAME = libnl-2.0
>  endif
>
> +# libnl-3 has a separate libnl-genl-3.0.pc
>  ifeq ($(NL3FOUND),Y)
>  CFLAGS += -DCONFIG_LIBNL30
> -LIBS += -lnl-genl
> -NLLIBNAME = libnl-3.0
> +LIBS =
> +NLLIBNAME = libnl-genl-3.0
>  endif
>
>  ifeq ($(NLLIBNAME),)
> -- 
> 1.5.6.5
>
I had a bit of doubt and checked libnl-3.0, libnl-3.1, libnl-3.2.0
While the patch perfectly work for libnl-3.2.0..3.2.2 :
- it break libnl-3.0 where previous code would have work (no
libnl-genl-3.0.pc)
- libnl-3.1 had a libnl-genl-3.1.pc, so Makefile is broken with previous and
new code

Unsure there is a need to support 3.0 and 3.1 when three 3.2.<x> versions
exist?

Gilles


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-08 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08  8:09 [PATCH] Fix linking with libnl-3 Gilles Espinasse
2011-11-08  8:20 ` Johannes Berg
2011-11-08 21:17 ` Gilles Espinasse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox