Skip to content

常见问题

沉默の金 edited this page Mar 24, 2024 · 21 revisions

常见问题

这里会收集本仓库或fork仓库遇到的错误(不定期更新)

0.日志过长无法直接查看

This step has been truncated due to its large size. Download the full logs from the menu once the workflow run has completed.
点右上角的齿轮Download log archive下载日志

1. build-Image_Builder的编译并生成安装包步骤报错

这个报错原因有很多:

1. 使用了快照分支(main/master)

现在main/master分支部分架构升级到了6.1内核部分内核模块(kmod)或其依赖可能有bug导致无法编译成功,而本仓库默认编译所有内核模块(kmod)导致编译失败。现在可以使用内核模块 (kmod)编译排除列表排除那些内核模块(kmod)。

内核模块(kmod)编译排除列表介绍见:关于kmod编译排除列表

2. 配置错误

错误在执行安装软件包(make package/install)时出现
报错为make: *** [/home/runner/work/$仓库名/$仓库名/workspace/openwrt/include/toplevel.mk:232: package/install] Error 2 这时你需要向上翻日志才能找到真正的问题 找到Collected errors:一行,*后面的是真正的错误内容,一般在修改配置时不编译 * opkg_install_cmd: Cannot install package $软件包名中的软件包即可

注意:建议使用OpenWrt-k配置构建工具修改配置,因为该软件包很可能是其他软件包的依赖,而“加载自定义配置并生成配置文件”步骤会补全依赖,所以你需要配置所有依赖与该软件包的软件包为不编译。你可以下载Artifacts中的build-Image_Builder-logs-$配置名,其中的openwrt.config文件为此job编译用的完整配置,你可以通过该文件检测其是否被作为依赖补全。

3. 删除了内核模块(kmod)编译排除列表中的sfe

就算要编译sfe也不能删除,因为内核模块(kmod)编译排除列表仅会在添加所有kmod为模块(=m)时进行排除,不影响配置为编译进固件(=y)的sfe。
报错:ERROR: package/cmzj_package/shortcut-fe/shortcut-fe failed to build.
根本原因:build1添加内核补丁与所需内核配置步骤未检测到sfe设为编译进固件所以没打补丁

2. 构建内核步骤报错

1. 内核配置错误

此错误一般在添加了部分为kmod的拓展软件包时出现,其添加了新的内核组件却没有配置它。
例子:

没有配置"NF_CONNTRACK_CHAIN_EVENTS"
make[4]: Entering directory '/home/runner/work/turboacc/turboacc/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/linux-5.15.[120](https://github.com/chenmozhijin/turboacc/actions/runs/5581557809/job/15115649282#step:13:121)'
  SYNC    include/config/auto.conf.cmd
*
make[6]: *** [scripts/kconfig/Makefile:77: syncconfig] Error 1
* Restart config...
make[5]: *** [Makefile:628: syncconfig] Error 2
*
Makefile:725: include/config/auto.conf.cmd: No such file or directory
make[4]: *** [Makefile:748: include/config/auto.conf.cmd] Error 2
*
* Core Netfilter Configuration
*
Netfilter ingress support (NETFILTER_INGRESS) [Y/n/?] y
Netfilter NFNETLINK interface (NETFILTER_NETLINK) [M/y/?] m
Netfilter base hook dump support (NETFILTER_NETLINK_HOOK) [N/m/?] n
Netfilter NFACCT over NFNETLINK interface (NETFILTER_NETLINK_ACCT) [N/m/y/?] n
Netfilter NFQUEUE over NFNETLINK interface (NETFILTER_NETLINK_QUEUE) [N/m/y/?] n
Netfilter LOG over NFNETLINK interface (NETFILTER_NETLINK_LOG) [N/m/y/?] n
Netfilter OSF over NFNETLINK interface (NETFILTER_NETLINK_OSF) [N/m/y/?] n
Netfilter connection tracking support (NF_CONNTRACK) [M/n/y/?] m
Syslog packet logging (NF_LOG_SYSLOG) [M/y/?] m
Connection mark tracking support (NF_CONNTRACK_MARK) [Y/n/?] y
Connection tracking zones (NF_CONNTRACK_ZONES) [Y/n/?] y
Supply CT list in procfs (OBSOLETE) (NF_CONNTRACK_PROCFS) [Y/n/?] y
Connection tracking events (NF_CONNTRACK_EVENTS) [Y/n/?] y
  Register multiple callbacks to ct events (NF_CONNTRACK_CHAIN_EVENTS) [N/y/?] (NEW) make[4]: Leaving directory '/home/runner/work/turboacc/turboacc/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/linux-5.15.120'
make[3]: Leaving directory '/home/runner/work/turboacc/turboacc/openwrt/target/linux/ipq806x'
make[2]: Leaving directory '/home/runner/work/turboacc/turboacc/openwrt/target/linux'
time: target/linux/compile#1.41#0.33#1.72
make[3]: *** [Makefile:28: /home/runner/work/turboacc/turboacc/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/linux-5.15.120/.modules] Error 2
make[2]: *** [Makefile:11: compile] Error 2
make[1]: *** [target/Makefile:30: target/linux/compile] Error 1
    ERROR: target/linux failed to build.
make[1]: Leaving directory '/home/runner/work/turboacc/turboacc/openwrt'
make: *** [/home/runner/work/turboacc/turboacc/openwrt/include/toplevel.mk:232: target/compile] Error 2

这是以前可能会出现的问题,现在已经会自动添加配置了(见build-openwrt.yml )。
你可以通过这种方式添加内核配置,建议添加到该步骤(build1 添加内核补丁与所需内核配置步骤)的尾部

编译并生成安装包时错误

1. fatal error: cannot specify '-o' with '-c', '-S' or '-E' with multiple files compilation terminated.

参考cokebar/openwrt-vlmcsd#30
把缓存关掉应该就好了(在compile.config中)

其他错误

运行器网络不好

这个问题有很小的概率会发生,日志类似下方这样

Resolving github.com (github.com)... 140.82.114.4
Connecting to github.com (github.com)|140.82.114.4|:443... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2023-08-27 22:23:13 ERROR 500: Internal Server Error.

一般"Re-run failed jobs"j就好

如果在编译的步骤中遇到问题可以善用搜索引擎,搜不到可以在github搜,看看有没有相关的issues或Pull requests。

如果你在编译与使用过程中遇到其他问题欢迎提issuediscussions