标签:pen cannot 环境 openssl tar 不成功 查看 open 变量
解压,进入,使用默认配置文件
cd wpa_supplicant-2.6
cp defconfig .config
修改.config
文件,修改部分,根据自己的需要进行这部分的配置
#指定libnl的路径和CC
CC=/usr/arm/arm-2014.05/bin/arm-none-linux-gnueabi-gcc -L/root/openssl-1.1.1d/__install/lib
CFLAGS += -I/root/openssl-1.1.1d/__install/include
LIBS += -L/root/openssl-1.1.1d/__install/lib
CONFIG_DRIVER_NL80211=y
CONFIG_LIBNL32=y
#指定libnl的路径
CFLAGS += -I/root/libnl-3.5.0/__install/include
LIBS += -L/root/libnl-3.5.0/__install/lib
编译make
将生成的文件拷贝到开发吧的bin目录下
cc1: warning: include location "/usr/local/include/libnl3" is unsafe for cross-compilation [-Wpoison-system-directories]
cc1: warning: include location "/usr/include/dbus-1.0" is unsafe for cross-compilation [-Wpoison-system-directories]
CC ../src/drivers/netlink.c
ln -s libdbus.so.20 libdbus.so.30
建议软链接,尝试解决./usr/arm/arm-2014.05/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -ldbus-1
collect2: error: ld returned 1 exit status
Makefile:1903: recipe for target 'wpa_supplicant' failed
make: *** [wpa_supplicant] Error 1
显然,找不到头文件造成的错误,有多种解决方法
gcc --print-search-dirs
可以查看头文件的搜索路径,这里的gcc
需要根据你的gcc
编译器名称调整,通过ln -s
头文件头文件搜索位置建立`通过在头文件的搜索位置,建立一个同名软链接,来帮助编译器找到头文件../src/drivers/driver_nl80211.c
,将#include
的路径修改成它可以找到的地方(不推荐).../src/drivers/driver_nl80211.c:17:31: fatal error: netlink/genl/genl.h: No such file or directory
#include <netlink/genl/genl.h>
^
compilation terminated.
Makefile:1991: recipe for target '../src/drivers/driver_nl80211.o' failed
make: *** [../src/drivers/driver_nl80211.o] Error 1
标签:pen cannot 环境 openssl tar 不成功 查看 open 变量
原文地址:https://www.cnblogs.com/lifo/p/12006103.html