openwrt armvirt aarch64 hostapd编译失败

最近编译了下openwrt自用,发现了几个问题,尝试解决后记录下,便于自己以后不记得了去排查问题

错误日志:

2024-02-06T15:26:14.9286477Z  make[3] -C package/network/services/hostapd compile
2024-02-06T15:26:40.8441720Z     ERROR: package/network/services/hostapd failed to build (build variant: supplicant-full-internal).

2024-02-06T15:26:40.8494029Z make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
2024-02-06T15:26:40.8495489Z make: *** [/workdir/openwrt/include/toplevel.mk:231: world] Error 1

2024-02-06T15:27:43.7391607Z /workdir/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld: /workdir/openwrt/build_dir/target-aarch64_generic_musl/hostapd-supplicant-full-internal/hostapd-2022-07-29-b704dc72/build/wpa_supplicant/src/ap/acs.o: in function `acs_request_scan':
2024-02-06T15:27:43.7393406Z acs.c:(.text+0x488): undefined reference to `hostapd_driver_scan'
2024-02-06T15:27:43.7394962Z /workdir/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld: acs.c:(.text+0x494): undefined reference to `hostapd_driver_scan'
2024-02-06T15:27:43.7397556Z /workdir/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld: /workdir/openwrt/build_dir/target-aarch64_generic_musl/hostapd-supplicant-full-internal/hostapd-2022-07-29-b704dc72/build/wpa_supplicant/src/ap/acs.o: in function `acs_scan_complete':
2024-02-06T15:27:43.7399270Z acs.c:(.text+0x564): undefined reference to `hostapd_disable_iface'
2024-02-06T15:27:43.7400611Z /workdir/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld: acs.c:(.text+0x570): undefined reference to `hostapd_disable_iface'
2024-02-06T15:27:43.7403128Z /workdir/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld: /workdir/openwrt/build_dir/target-aarch64_generic_musl/hostapd-supplicant-full-internal/hostapd-2022-07-29-b704dc72/build/wpa_supplicant/src/ap/acs.o: in function `acs_init':
2024-02-06T15:27:43.7404785Z acs.c:(.text+0x1198): undefined reference to `hostapd_drv_do_acs'
2024-02-06T15:27:43.7406100Z /workdir/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld: acs.c:(.text+0x119c): undefined reference to `hostapd_drv_do_acs'
2024-02-06T15:27:43.7408069Z /workdir/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld: acs.c:(.text+0x11f0): undefined reference to `hostapd_set_state'
2024-02-06T15:27:43.7410002Z /workdir/openwrt/staging_dir/toolchain-aarch64_generic_gcc-11.3.0_musl/lib/gcc/aarch64-openwrt-linux-musl/11.3.0/../../../../aarch64-openwrt-linux-musl/bin/ld: acs.c:(.text+0x11fc): undefined reference to `hostapd_set_state'
2024-02-06T15:27:43.7440181Z collect2: error: ld returned 1 exit status
2024-02-06T15:27:43.7442584Z make[4]: *** [Makefile:2037: wpa_supplicant] Error 1
2024-02-06T15:27:43.7443898Z make[4]: Leaving directory '/workdir/openwrt/build_dir/target-aarch64_generic_musl/hostapd-supplicant-full-internal/hostapd-2022-07-29-b704dc72/wpa_supplicant'
2024-02-06T15:27:43.7446119Z make[3]: *** [Makefile:790: /workdir/openwrt/build_dir/target-aarch64_generic_musl/hostapd-supplicant-full-internal/hostapd-2022-07-29-b704dc72/.built] Error 2
2024-02-06T15:27:43.7448280Z make[3]: Leaving directory '/workdir/openwrt/package/network/services/hostapd'
2024-02-06T15:27:43.7449297Z time: package/network/services/hostapd/supplicant-full-internal/compile#0.25#0.07#0.31
2024-02-06T15:27:43.7454865Z     ERROR: package/network/services/hostapd failed to build (build variant: supplicant-full-internal).
2024-02-06T15:27:43.7456408Z make[2]: *** [package/Makefile:119: package/network/services/hostapd/compile] Error 1
2024-02-06T15:27:43.7461555Z make[2]: Leaving directory '/workdir/openwrt'
2024-02-06T15:27:43.7483362Z make[1]: *** [package/Makefile:110: /workdir/openwrt/staging_dir/target-aarch64_generic_musl/stamp/.package_compile] Error 2
2024-02-06T15:27:43.7488295Z make[1]: Leaving directory '/workdir/openwrt'
2024-02-06T15:27:43.7509836Z make: *** [/workdir/openwrt/include/toplevel.mk:231: world] Error 2
2024-02-06T15:27:43.7634326Z ##[error]Process completed with exit code 2.

临时解决:

        echo "TODO 处理hostapd wpa_supplicant-full编译报错" && cd /workdir/openwrt

        sed -i 's/#CONFIG_AP=y/CONFIG_AP=y/' package/network/services/hostapd/files/wpa_supplicant-full.config

参考: 使能无线相关组件编译报错 · Issue #11193 · coolsnowwolf/lede · GitHub

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值