Bronya酱☆ 发表于 2022-5-15 15:45:55

【求助】SFT1200官方固件编译出错

在编译SFT1200的官方固件时出错,编译时添加了UA2F插件。有没有大佬知道这是为什么?config.log文件在附件,下面是一部分输出信息:checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... cat: -: No such file or directory
no
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... cat: -: No such file or directory
no
checking for x86_64-pc-linux-gnu-gcc... gcc
cat: -: No such file or directory
checking whether the C compiler works... no
configure: error: in `/mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06/build_dir/host/sed-4.5':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** Error 77
make: Leaving directory '/mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06/tools/sed'
time: tools/sed/compile#0.51#0.71#5.30
make: *** Error 2
make: Leaving directory '/mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06'
make: *** Error 2
make: Leaving directory '/mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06'
make: *** Error 2

Bronya酱☆ 发表于 2022-5-15 15:58:05

编译时参考了以下两篇文章:
https://www.notion.so/sunbk201public/OpenWrt-f59ae1a76741486092c27bc24dbadc59
https://www.126126.xyz/post/031/

萝卜大侠 发表于 2022-5-16 07:45:06

Bronya酱☆ 发表于 2022-5-15 15:58
编译时参考了以下两篇文章:
https://www.notion.so/sunbk201public/OpenWrt-f59ae1a76741486092c27bc24dba ...

你的Linux环境是什么版本呢?

Bronya酱☆ 发表于 2022-5-17 12:05:00

萝卜大侠 发表于 2022-5-16 07:45
你的Linux环境是什么版本呢?

WSL2 Ubuntu-20.04-LTS

dengxinfa 发表于 2022-5-18 11:58:13

Bronya酱☆ 发表于 2022-5-17 12:05
WSL2 Ubuntu-20.04-LTS

你这个编译其他软件包可以吗?从日志上看gcc那里好像检测有点问题

但是日志报错是tools/sed这个软件包编译报错,可以尝试将openwrt19.07中的tools/sed这个软件包替换到当前编译环境下,执行make tools/sed/{clean,compile} V=s,之后再进行编译

Bronya酱☆ 发表于 2022-5-18 12:33:27

dengxinfa 发表于 2022-5-18 11:58
你这个编译其他软件包可以吗?从日志上看gcc那里好像检测有点问题

但是日志报错是tools/sed这个软件包编 ...

不添加任何其它软件包直接编译也不行,报相同的错。
我试试替换tools/sed行不行

dengxinfa 发表于 2022-5-18 15:48:58

Bronya酱☆ 发表于 2022-5-18 12:33
不添加任何其它软件包直接编译也不行,报相同的错。
我试试替换tools/sed行不行 ...

如果gcc版本问题的话可以按照这个补丁修改一下
linux@ubuntu:~/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06$ git diff include/prereq-build.mk
diff --git a/openwrt-18.06/include/prereq-build.mk b/openwrt-18.06/include/prereq-build.mk
index f01e2aea5..cd0d0f671 100644
--- a/openwrt-18.06/include/prereq-build.mk
+++ b/openwrt-18.06/include/prereq-build.mk
@@ -28,8 +28,8 @@ $(eval $(call TestHostCommand,proper-umask, \

$(eval $(call SetupHostCommand,gcc, \
      Please install the GNU C Compiler (gcc) 4.8 or later, \
-       $(CC) -dumpversion | grep -E '^(4\.|\.?|10\.?)', \
-       gcc -dumpversion | grep -E '^(4\.|\.?|10\.?)', \
+       $(CC) -dumpversion | grep -E '^(4\.|\.?|1\.?)', \
+       gcc -dumpversion | grep -E '^(4\.|\.?|1\.?)', \
      gcc --version | grep -E 'Apple.(LLVM|clang)' ))

$(eval $(call TestHostCommand,working-gcc, \
@@ -40,8 +40,8 @@ $(eval $(call TestHostCommand,working-gcc, \

$(eval $(call SetupHostCommand,g++, \
      Please install the GNU C++ Compiler (g++) 4.8 or later, \
-       $(CXX) -dumpversion | grep -E '^(4\.|\.?|10\.?)', \
-       g++ -dumpversion | grep -E '^(4\.|\.?|10\.?)', \
+       $(CXX) -dumpversion | grep -E '^(4\.|\.?|1\.?)', \
+       g++ -dumpversion | grep -E '^(4\.|\.?|1\.?)', \
      g++ --version | grep -E 'Apple.(LLVM|clang)' ))

$(eval $(call TestHostCommand,working-g++, \

dengxinfa 发表于 2022-5-18 15:51:30

Bronya酱☆ 发表于 2022-5-18 12:33
不添加任何其它软件包直接编译也不行,报相同的错。
我试试替换tools/sed行不行 ...

建议你还是使用18.02的ubuntu吧,这个SDK使用的是openwrt18.06的版本,对于ubuntu20.04应该有很多的兼容性问题,如果你实在要使用ubuntu20.04的话,就下载一个openwrt19.07, 然后看一下sft1200的sdk里那些包报错的,就对比一下openwrt19.07的替换一下,重新编译

hghghg 发表于 2022-5-21 17:55:22

官方的感觉有些问题,我当时也弄不通,最后直接去恩山弄的修改版

nihaolai 发表于 2023-1-14 09:16:06

页: [1]
查看完整版本: 【求助】SFT1200官方固件编译出错