日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

移植wpa_supplicant 2.2问题

發布時間:2023/11/30 编程问答 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 移植wpa_supplicant 2.2问题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.編譯libnl1.1問題

In file included from addr.c:28:0:
../include/netlink-local.h: In function '__str2type':
../include/netlink-local.h:218:11: error: 'ULONG_MAX' undeclared (first use in this function)
../include/netlink-local.h:218:11: note: each undeclared identifier is reported only once for each function it appears in
../include/netlink-local.h: In function '__list_str2type':
../include/netlink-local.h:239:11: error: 'ULONG_MAX' undeclared (first use in this function)
make[2]: *** [addr.o] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2

修改方法:

在 ./include/netlink-local.h 中增加頭文件

?#include <limits.h>


2.修改wpa_supplicant 2.2 Makefile

修改Makefile之前,需要執行config的拷貝

?cp defconfig .config

修改Makefile如下:

CC:=/home/xuxuequan/Ingenicwork/toolchain/mips-gcc472-glibc216-32bit/bin/mips-linux-gnu-gcc
#ifndef CC
#CC=gcc
#endif


CFLAGS:= -I /home/xuxuequan/Ingenicwork/toolchain/mips-gcc472-glibc216-32bit/mips-linux-gnu/libc/usr/include
CFLAGS += -I /home/xuxuequan/Ingenicwork/lib/libsource/openssl-1.0.1h/install/include
CFLAGS += -I /home/xuxuequan/Ingenicwork/lib/libsource/libnl-1.1/include
LIBS := -L /home/xuxuequan/Ingenicwork/lib/libsource/openssl-1.0.1h/install/lib -lssl
LIBS := -L /home/xuxuequan/Ingenicwork/lib/libsource/openssl-1.0.1h/install/lib -lcrypto
LIBS += -L /home/xuxuequan/Ingenicwork/lib/libsource/libnl-1.1/install/lib -lnl?
LIBDIR := ./out/lib/
BINDIR := ./out/sbin/



#ifndef CFLAGS
#CFLAGS = -MMD -O2 -Wall -g
#endif

#export LIBDIR ?= /usr/local/lib/
#export BINDIR ?= /usr/local/sbin/


#LIBS += -lcrypto
LIBS += -L /home/xuxuequan/Ingenicwork/lib/libsource/openssl-1.0.1h/install/lib -lcrypto
#LIBS_p += -lcrypto
LIBS_p += -L /home/xuxuequan/Ingenicwork/lib/libsource/openssl-1.0.1h/install/lib -lcrypto


3.wpa_supplicant 2.2編譯問題

問題一:

../src/drivers/driver_nl80211.c:19:31: fatal error: netlink/genl/genl.h: No such file or directory
compilation terminated.
make: *** [../src/drivers/driver_nl80211.o] Error 1

問題分析:

這是由于沒有libnl庫導致的,在Makefile中設置libnl的相關include即可


問題二:

../src/drivers/driver_nl80211.c: In function 'family_handler':
../src/drivers/driver_nl80211.c:717:10: error: 'CTRL_ATTR_MCAST_GROUPS' undeclared (first use in this function)
../src/drivers/driver_nl80211.c:717:10: note: each undeclared identifier is reported only once for each function it appears in
../src/drivers/driver_nl80211.c:721:22: error: 'CTRL_ATTR_MCAST_GRP_MAX' undeclared (first use in this function)
../src/drivers/driver_nl80211.c:724:12: error: 'CTRL_ATTR_MCAST_GRP_NAME' undeclared (first use in this function)
../src/drivers/driver_nl80211.c:725:12: error: 'CTRL_ATTR_MCAST_GRP_ID' undeclared (first use in this function)
make: *** [../src/drivers/driver_nl80211.o] Error 1

問題分析:

這是由于當前libnl庫版本中genetlink.h文件部分定義沒有導致的,可以從交叉編譯工具鏈中拷貝一個

cp /home/xuxuequan/Ingenicwork/toolchain/mips-gcc472-glibc216-32bit/mips-linux-gnu/libc/usr/include/linux/genetlink.h ./genetlink.h?


問題三:

/home/xuxuequan/Ingenicwork/toolchain/mips-gcc472-glibc216-32bit/bin/../lib/gcc/mips-linux-gnu/4.7.2/../../../../mips-linux-gnu/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
make: *** [wpa_passphrase] Error 1

問題分析:

這是由于Makefile中如下部分定義導致的,按照紅色部分修改為交叉編譯

#LIBS += -lcrypto
LIBS += -L /home/xuxuequan/Ingenicwork/lib/libsource/openssl-1.0.1h/install/lib -lcrypto
#LIBS_p += -lcrypto
LIBS_p += -L /home/xuxuequan/Ingenicwork/lib/libsource/openssl-1.0.1h/install/lib -lcrypto

總結

以上是生活随笔為你收集整理的移植wpa_supplicant 2.2问题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。