Patchwork build: use updated libnl3 header paths

login
register
mail settings
Submitter Dan Williams
Date Aug. 13, 2012, 10:38 p.m.
Message ID <1344897481.21212.39.camel@dcbw.foobar.com>
Download mbox | patch
Permalink /patch/177140/
State Accepted
Commit e7ecddf33a446072effbc85a27a078a8e582c89e
Headers show

Comments

Dan Williams - Aug. 13, 2012, 10:38 p.m.
libnl3's headers live in /usr/include/libnl3 for some time now.

Signed-hostap: Dan Williams <dcbw@redhat.com>
---
 src/drivers/drivers.mak | 2 +-
 src/drivers/drivers.mk  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Jouni Malinen - Aug. 15, 2012, 5:49 p.m.
On Mon, Aug 13, 2012 at 05:38:01PM -0500, Dan Williams wrote:
> libnl3's headers live in /usr/include/libnl3 for some time now.

This does not make the build work in my test setup (Ubuntu 12.04 with
libnl-3-dev, i.e., libnl 3.2.3), but I've pretty much given up on being
able to use libnl cleanly, so I applied this since it should not too
much harm either.
Dan Williams - Aug. 15, 2012, 7:22 p.m.
On Wed, 2012-08-15 at 20:49 +0300, Jouni Malinen wrote:
> On Mon, Aug 13, 2012 at 05:38:01PM -0500, Dan Williams wrote:
> > libnl3's headers live in /usr/include/libnl3 for some time now.
> 
> This does not make the build work in my test setup (Ubuntu 12.04 with
> libnl-3-dev, i.e., libnl 3.2.3), but I've pretty much given up on being
> able to use libnl cleanly, so I applied this since it should not too
> much harm either.

Hmm; do the headers get installed in /usr/include/libnl3 for you?  That
change (226b3875) was made on 2011-09-13 and should have been included
in anything after libnl version 3.1.

I've got 3.2.7 here and everything appears to build well for me as long
as you set CONFIG_LIBNL32=y in the config.  What specific issues are you
seeing?

Dan
Jouni Malinen - Aug. 15, 2012, 8:45 p.m.
On Wed, Aug 15, 2012 at 02:22:47PM -0500, Dan Williams wrote:
> Hmm; do the headers get installed in /usr/include/libnl3 for you?  That
> change (226b3875) was made on 2011-09-13 and should have been included
> in anything after libnl version 3.1.

They do and it is not the compilation part that fails in the build.

> I've got 3.2.7 here and everything appears to build well for me as long
> as you set CONFIG_LIBNL32=y in the config.  What specific issues are you
> seeing?

libnl 3.2.3 works for me, too, when I install it myself. The problem
comes from the Ubuntu packages that are too confusing for me
apparently.. ;-)

/usr/bin/ld.bfd.real: cannot find -lnl-genl-3
collect2: ld returned 1 exit status

So it is now necessary to install both libnl-3-dev and libnl-genl-3-dev
to get the needed files.. libnl-genl-3-dev just adds a libnl-genl-3.so
symlink while the actual library is in libnl-genl-3-200 and header files
in libnl-3-dev..
Sven Neumann - Aug. 16, 2012, 6:59 a.m.
On Mon, 2012-08-13 at 17:38 -0500, Dan Williams wrote:
> libnl3's headers live in /usr/include/libnl3 for some time now.

This fixes the build for me (on Ubuntu 12.04 with libnl-genl-3-dev
installed). I was already wondering why I haven't been able to compile a
recent git checkout.


Thanks,
Sven

Patch

diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak
index 0a05b6d..c7a98d3 100644
--- a/src/drivers/drivers.mak
+++ b/src/drivers/drivers.mak
@@ -30,7 +30,7 @@  NEED_RFKILL=y
 ifdef CONFIG_LIBNL32
   DRV_LIBS += -lnl-3
   DRV_LIBS += -lnl-genl-3
-  DRV_CFLAGS += -DCONFIG_LIBNL20
+  DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
 else
   ifdef CONFIG_LIBNL_TINY
     DRV_LIBS += -lnl-tiny
diff --git a/src/drivers/drivers.mk b/src/drivers/drivers.mk
index 9e75a91..23fcbb7 100644
--- a/src/drivers/drivers.mk
+++ b/src/drivers/drivers.mk
@@ -30,7 +30,7 @@  NEED_RFKILL=y
 ifdef CONFIG_LIBNL32
   DRV_LIBS += -lnl-3
   DRV_LIBS += -lnl-genl-3
-  DRV_CFLAGS += -DCONFIG_LIBNL20
+  DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
 else
   ifdef CONFIG_LIBNL_TINY
     DRV_LIBS += -lnl-tiny