Hi,
I work as a software tester who has general understanding of C++
language.
I experiment with simulated Wi-Fi access point and a station.
My Linux distribution is Fedora 27.
I try to compile hostap by following the steps from:
https://wireless.wiki.kernel.org/en/users/documentation/hostapd#download_and_compile_hostapd
I get the source code from:
git://w1.fi/srv/git/hostap.git
I create a configuration:
cp defconfig .config
vi .config
Parameter "CONFIG_DRIVER_NL80211=y" is already uncomented.
make
../src/drivers/driver_nl80211.c:17:10: fatal error: netlink/genl/genl.h:
No such file or directory
#include <netlink/genl/genl.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:1251: ../src/drivers/driver_nl80211.o] Error 1
When I search for file "genl.h"
then I don't find it on my system.
I search for package "libnl", but only "libnl3" is available.
I install it:
yum install libnl3 libnl3-devel
I repeat the previous compilation.
I receive the same error.
When I search for "genl.h"
then I find it in "/usr/include/libnl3/netlink/genl/genl.h".
The source file "../src/drivers/driver_nl80211.c"
includes "netlink/genl/genl.h".
To satisfy that requirement I create a soft link:
ln -s /usr/include/libnl3/netlink /usr/include/netlink
When I rebegin the compilation:
make clean
make
then I receive error:
/usr/bin/ld: cannot find -lnl
collect2: error: ld returned 1 exit status
make: *** [Makefile:1278: hostapd] Error 1
When I browse StackOverflow
and I search for "/usr/bin/ld: cannot find -lnl"
then I find article
"https://stackoverflow.com/questions/16710047/usr-bin-ld-cannot-find-lnameofthelibrary".
When I follow the steps from that article
then I receive result:
==================================================
attempt to open //usr/x86_64-redhat-linux/lib64/libnl.so failed
attempt to open //usr/x86_64-redhat-linux/lib64/libnl.a failed
attempt to open //usr/lib64/libnl.so failed
attempt to open //usr/lib64/libnl.a failed
attempt to open //usr/local/lib64/libnl.so failed
attempt to open //usr/local/lib64/libnl.a failed
attempt to open //lib64/libnl.so failed
attempt to open //lib64/libnl.a failed
attempt to open //usr/x86_64-redhat-linux/lib/libnl.so failed
attempt to open //usr/x86_64-redhat-linux/lib/libnl.a failed
attempt to open //usr/local/lib/libnl.so failed
attempt to open //usr/local/lib/libnl.a failed
attempt to open //lib/libnl.so failed
attempt to open //lib/libnl.a failed
attempt to open //usr/lib/libnl.so failed
attempt to open //usr/lib/libnl.a failed
ld: cannot find -lnl
QUESTIONS
1. What steps to follow in order to compile hostap?
2. Can you please update the documentation at
"https://wireless.wiki.kernel.org/en/users/documentation/hostapd#download_and_compile_hostapd"
to the latest release of Fedora?
DETAILS
kernel-4.13.16-302.fc27.x86_64
gcc-7.3.1-6.fc27.x86_64
rpm -qf $(which /usr/bin/ld)
binutils-2.29-6.fc27.x86_64
binutils-2.29-13.fc27.x86_64
yum search libnl
================== Name & Summary Matched: libnl ==================
libnl3-doc.x86_64 : API documentation for libnl3
python-libnl3.x86_64 : libnl3 binding for Python 2
python2-libnl3.x86_64 : libnl3 binding for Python 2
python3-libnl3.x86_64 : libnl3 binding for Python 3
libnl3-cli.x86_64 : Command line interface utils for libnl3
libnl3-cli.i686 : Command line interface utils for libnl3
libnl3-devel.x86_64 : Libraries and headers for using libnl3
libnl3-devel.i686 : Libraries and headers for using libnl3
======================= Name Matched: libnl =======================
libnl3.x86_64 : Convenience library for kernel netlink sockets
libnl3.i686 : Convenience library for kernel netlink sockets
Hi Rami,
When I delete the project's directory
and I clone the project again
and I compile it with uncommented parameter "CONFIG_LIBNL32=y"
then the compilation is successful.
Thanks for the advice.
> HI Pavlin,
> Please try from scratch cloning the tree from scratch, then
> cp defconfig .config, then
> uncomment the following entry in .config:
> CONFIG_LIBNL32=y
> and then run "make", and post here the results.
>
> Regards,
> Rami Rosen
> http://ramirose.wixsite.com/ramirosen
HI Pavlin,
Please try from scratch cloning the tree from scratch, then
cp defconfig .config, then
uncomment the following entry in .config:
CONFIG_LIBNL32=y
and then run "make", and post here the results.
Regards,
Rami Rosen
http://ramirose.wixsite.com/ramirosen
On Sun, 9 Sep 2018 at 16:57, <[email protected]> wrote:
>
> Hi,
>
> I work as a software tester who has general understanding of C++
> language.
> I experiment with simulated Wi-Fi access point and a station.
>
> My Linux distribution is Fedora 27.
>
> I try to compile hostap by following the steps from:
> https://wireless.wiki.kernel.org/en/users/documentation/hostapd#download_and_compile_hostapd
>
> I get the source code from:
> git://w1.fi/srv/git/hostap.git
>
> I create a configuration:
> cp defconfig .config
> vi .config
>
> Parameter "CONFIG_DRIVER_NL80211=y" is already uncomented.
>
> make
>
> ../src/drivers/driver_nl80211.c:17:10: fatal error: netlink/genl/genl.h:
> No such file or directory
> #include <netlink/genl/genl.h>
> ^~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> make: *** [Makefile:1251: ../src/drivers/driver_nl80211.o] Error 1
>
> When I search for file "genl.h"
> then I don't find it on my system.
>
> I search for package "libnl", but only "libnl3" is available.
> I install it:
> yum install libnl3 libnl3-devel
>
>
> I repeat the previous compilation.
> I receive the same error.
>
> When I search for "genl.h"
> then I find it in "/usr/include/libnl3/netlink/genl/genl.h".
>
> The source file "../src/drivers/driver_nl80211.c"
> includes "netlink/genl/genl.h".
>
> To satisfy that requirement I create a soft link:
> ln -s /usr/include/libnl3/netlink /usr/include/netlink
>
> When I rebegin the compilation:
> make clean
> make
> then I receive error:
> /usr/bin/ld: cannot find -lnl
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:1278: hostapd] Error 1
>
>
> When I browse StackOverflow
> and I search for "/usr/bin/ld: cannot find -lnl"
> then I find article
> "https://stackoverflow.com/questions/16710047/usr-bin-ld-cannot-find-lnameofthelibrary".
>
> When I follow the steps from that article
> then I receive result:
> ==================================================
> attempt to open //usr/x86_64-redhat-linux/lib64/libnl.so failed
> attempt to open //usr/x86_64-redhat-linux/lib64/libnl.a failed
> attempt to open //usr/lib64/libnl.so failed
> attempt to open //usr/lib64/libnl.a failed
> attempt to open //usr/local/lib64/libnl.so failed
> attempt to open //usr/local/lib64/libnl.a failed
> attempt to open //lib64/libnl.so failed
> attempt to open //lib64/libnl.a failed
> attempt to open //usr/x86_64-redhat-linux/lib/libnl.so failed
> attempt to open //usr/x86_64-redhat-linux/lib/libnl.a failed
> attempt to open //usr/local/lib/libnl.so failed
> attempt to open //usr/local/lib/libnl.a failed
> attempt to open //lib/libnl.so failed
> attempt to open //lib/libnl.a failed
> attempt to open //usr/lib/libnl.so failed
> attempt to open //usr/lib/libnl.a failed
> ld: cannot find -lnl
>
>
> QUESTIONS
> 1. What steps to follow in order to compile hostap?
> 2. Can you please update the documentation at
> "https://wireless.wiki.kernel.org/en/users/documentation/hostapd#download_and_compile_hostapd"
> to the latest release of Fedora?
>
>
> DETAILS
> kernel-4.13.16-302.fc27.x86_64
> gcc-7.3.1-6.fc27.x86_64
> rpm -qf $(which /usr/bin/ld)
> binutils-2.29-6.fc27.x86_64
> binutils-2.29-13.fc27.x86_64
>
> yum search libnl
> ================== Name & Summary Matched: libnl ==================
> libnl3-doc.x86_64 : API documentation for libnl3
> python-libnl3.x86_64 : libnl3 binding for Python 2
> python2-libnl3.x86_64 : libnl3 binding for Python 2
> python3-libnl3.x86_64 : libnl3 binding for Python 3
> libnl3-cli.x86_64 : Command line interface utils for libnl3
> libnl3-cli.i686 : Command line interface utils for libnl3
> libnl3-devel.x86_64 : Libraries and headers for using libnl3
> libnl3-devel.i686 : Libraries and headers for using libnl3
> ======================= Name Matched: libnl =======================
> libnl3.x86_64 : Convenience library for kernel netlink sockets
> libnl3.i686 : Convenience library for kernel netlink sockets