problem compiling Hostap against the latest libnl... (prototypes don't match)

Frantisek Rysanek Frantisek.Rysanek
Sun Feb 21 13:31:40 PST 2010


Dear Mr. Malinen,

first and foremost, thanks a lot for your personal effort - referring 
both to the hostap package and to your kind response to me :-)

Just to give you a bit of my background:
I'm essentially building wireless support from scratch / from source 
for 
my own mini-distro. My goal is to get AP and STA modes with WPA2-PSK.
No further fancy features (for the moment).
Based on watching the LKML from a distance, I got the impression that 

Atheros a/b/g chipsets might be the right way to go - vanilla Linux 
seems to contain a fully open-source driver for that family of chips
(ath5k). So I went to linuxwireless.org, took my dive into the docs 
and started downloading the required user-space tools (source 
tarballs).

On 21 Feb 2010 at 9:27, Jouni Malinen wrote:
>
> Do you have any particular reason for using the current snapshot of
> libnl instead of a proper release? 
>
reason #1: there doesn't seem to be a proper release. The homepage of 
libnl refers me to the GIT repo. There don't seem to be any releases,
just an older development snapshot called 1.0-pre6. I've seen 1.1 
mentioned in some README or .config, but such a tarball or GIT tag is 
nowhere to be found... The snapshot that I'm using is two months old -
 doesn't sound like a road under construction, maybe it's as close to 
the "latest release" as it gets :-)

reason #2: the Linux wireless subsystem has recently been undergoing 
quite some development. I'd like to use the ath5k in a "progressive", 
future-proof way. The most recent development seems to be the 
transition from the "Wireless Extensions" to "nl80211" for a 
configuration interface. Which is a fairly fresh addition to the 
libnl :-/

I didn't go into such detail as to dissect how much the version (age) 
of libnl has to match the latest developments of the nl80211 - 
whether there are some shared headers that are evolving quickly, 
or if perhaps the libnl is just a thin generic "access shim" to the 
nl80211, and thus the recent developments in nl80211 (kernel space) 
don't really require the latest libnl (user-space library)...

I've noticed recent patches or ToDo items to nl80211 at linux-
wireless, along the lines of "add/port this cfg function to nl80211".
I'm somewhat soothed by the general practice of extending interfaces 
in a backwards-compatible way (items are only added at the end of any 
structs / enums) - though I know that sometimes this is impossible.

Speaking of release numbers, "the one stable release" that I'm 
working against is Linux 2.6.33 (latest is rc8). I need to start 
*somewhere*, and this looks like a good place to start at the moment.
I expect to later replace this with 2.6.33.something (bugfix release) 
- but I hope that the build processes and configs for all the implied 
user-space tools will stay the same.

I'm working with the vanilla (upstream) version of the linux-wireless 
drivers (ath5k et al). I don't bother to see what's boiling in the 
developers' repositories and what patches have made it into linux-
next. Vanilla is my reference / my target.

I was wondering if I should just use the "wext" driver, instead of 
"nl802.11". The "wext" interface should be stable. I just have some 
doubt how long that interface to Linux Wireless will stay fully 
functional (before it gets stale / broken).

As for the latest snapshot of hostap, that's a tad different.
If I want proper nl80211 support including the latest developments 
from the kernel side, I need a fresh version of the hostap.
I really first tried compiling 0.6.10, then 0.7.1, and only then I 
tried the snapshot - which didn't compile either. 
Now I know why, owing to your polite "RTFM reminder" :-)

I don't need all the recent fancy features of the bleeding edge 
hostap (authentication against GSM credential databases and whatnot), 
I really only need some relatively basic functionality. 
And, I need compatibility with the recent libnl.
Hostap 0.6.10 doesn't compile against libnl 2.0. Hostap 0.7.1 does => 
hostap 0.7.1 may well be the right choice for me :-)
The Hostap development snapshot compiles too, but I would indeed 
prefer a release.

> libnl snapshot has number of changes
> that are not backwards compatible and there does not seem to be any easy
> way of handling them cleanly. 
>
understood :-)

> In addition, it is unclear what kind of
> API might be in place once the next version of libnl is released and
> until that happens, I would recommend using the latest released version
> of libnl. 
>
ah well. I need to put something together right now :-(
I need to start working somewhere, at this point in time.

Other than that, I perfectly understand your argument, 
normally I tend to behave precisely that way. Such as, I'd been 
eagerly waiting for OpenVPN 2.1 to get released, before deploying it 
on my firewall. Working with release candidates means you have to go 
through the "deployment process" over and over again...

On the other hand, in my mini-distro, I have several tools that are 
only available as source code, are always under construction, but 
generally the SCM repo contains code that compiles just fine and 
actually works just fine - so why not use it. There are projects that 
release seldom, but the CVS code works fine, despite being 
"always on the move".

The Linux wireless drivers and the accompanying tools are a tad more 
difficult to keep in sync (software coming from several parties).
I'm aware that working with snapshots of several software packages 
inevitably brings discrepancies. In my situation however, I believe 
some amount of beta-testing won't harm me, and will be useful to the 
authors. The recent developments in linux-wireless sound all too 
exciting for me to just sit and wait till the dust settles. 
Will it ever settle? :-)

> Anyway, if you really do want to use the current snapshot, you
> can try to enable support for this in hostapd or wpa_supplicant build by
> adding CONFIG_LIBNL20=y to the build configuration file (.config).
> 
damn, I must've seen this mentioned somewhere in the README's, 
I must've forgotten that hint in my headlong rush to get the thing 
compiled :-D

I had to perform one further addition to the .config of the 
wpa_supplicant: I had to point the -I and -L options to my libnl 
source tree.
 LIBNL=/usr/src/netutils/wireless/libnl-8808743
 CFLAGS += -I$(LIBNL)/include
 LIBS += -L$(LIBNL)/lib
Obviously I took this verbatim from the .config of the hostapd.

Thanks again for you help, take care :-)

Frank Rysanek




More information about the Hostap mailing list