forum.gl-inet.cn

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
    查看: 787|回复: 9

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

    [复制链接]

    1

    主题

    4

    帖子

    38

    积分

    新手上路

    Rank: 1

    积分
    38
    发表于 2022-5-15 15:45:55 | 显示全部楼层 |阅读模式
    在编译SFT1200的官方固件时出错,编译时添加了UA2F插件。有没有大佬知道这是为什么?config.log文件在附件,下面是一部分输出信息:
    1. checking for a BSD-compatible install... /usr/bin/install -c
    2. checking whether build environment is sane... yes
    3. checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    4. checking for gawk... gawk
    5. checking whether make sets $(MAKE)... cat: -: No such file or directory
    6. no
    7. checking whether make supports nested variables... yes
    8. checking whether make supports nested variables... (cached) yes
    9. checking whether make supports the include directive... cat: -: No such file or directory
    10. no
    11. checking for x86_64-pc-linux-gnu-gcc... gcc
    12. cat: -: No such file or directory
    13. checking whether the C compiler works... no
    14. configure: error: in `/mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06/build_dir/host/sed-4.5':
    15. configure: error: C compiler cannot create executables
    16. See `config.log' for more details
    17. make[3]: *** [Makefile:46: /mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06/build_dir/host/sed-4.5/.configured] Error 77
    18. make[3]: Leaving directory '/mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06/tools/sed'
    19. time: tools/sed/compile#0.51#0.71#5.30
    20. make[2]: *** [tools/Makefile:155: tools/sed/compile] Error 2
    21. make[2]: Leaving directory '/mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06'
    22. make[1]: *** [tools/Makefile:151: /mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06/staging_dir/target-mipsel_mips-interAptiv_musl/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynnyy] Error 2
    23. make[1]: Leaving directory '/mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06'
    24. make: *** [/mnt/d/WSL/gl-infra-builder/openwrt-18.06/siflower/openwrt-18.06/include/toplevel.mk:218: world] Error 2
    复制代码

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    回复

    使用道具 举报

    1

    主题

    4

    帖子

    38

    积分

    新手上路

    Rank: 1

    积分
    38
     楼主| 发表于 2022-5-15 15:58:05 | 显示全部楼层
    回复

    使用道具 举报

    76

    主题

    2144

    帖子

    9631

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    9631

    官方人员

    发表于 2022-5-16 07:45:06 | 显示全部楼层
    Bronya酱☆ 发表于 2022-5-15 15:58
    编译时参考了以下两篇文章:
    https://www.notion.so/sunbk201public/OpenWrt-f59ae1a76741486092c27bc24dba ...

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

    使用道具 举报

    1

    主题

    4

    帖子

    38

    积分

    新手上路

    Rank: 1

    积分
    38
     楼主| 发表于 2022-5-17 12:05:00 | 显示全部楼层
    萝卜大侠 发表于 2022-5-16 07:45
    你的Linux环境是什么版本呢?

    WSL2 Ubuntu-20.04-LTS
    回复

    使用道具 举报

    0

    主题

    53

    帖子

    354

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    354

    官方人员

    发表于 2022-5-18 11:58:13 | 显示全部楼层

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

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

    使用道具 举报

    1

    主题

    4

    帖子

    38

    积分

    新手上路

    Rank: 1

    积分
    38
     楼主| 发表于 2022-5-18 12:33:27 | 显示全部楼层
    dengxinfa 发表于 2022-5-18 11:58
    你这个编译其他软件包可以吗?从日志上看gcc那里好像检测有点问题

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

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

    使用道具 举报

    0

    主题

    53

    帖子

    354

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    354

    官方人员

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

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

    7. $(eval $(call SetupHostCommand,gcc, \
    8.         Please install the GNU C Compiler (gcc) 4.8 or later, \
    9. -       $(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
    10. -       gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
    11. +       $(CC) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
    12. +       gcc -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
    13.         gcc --version | grep -E 'Apple.(LLVM|clang)' ))

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

    16. $(eval $(call SetupHostCommand,g++, \
    17.         Please install the GNU C++ Compiler (g++) 4.8 or later, \
    18. -       $(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
    19. -       g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|10\.?)', \
    20. +       $(CXX) -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
    21. +       g++ -dumpversion | grep -E '^(4\.[8-9]|[5-9]\.?|1[0-9]\.?)', \
    22.         g++ --version | grep -E 'Apple.(LLVM|clang)' ))

    23. $(eval $(call TestHostCommand,working-g++, \
    复制代码
    回复

    使用道具 举报

    0

    主题

    53

    帖子

    354

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    354

    官方人员

    发表于 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的替换一下,重新编译
    回复

    使用道具 举报

    10

    主题

    48

    帖子

    246

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    246
    发表于 2022-5-21 17:55:22 | 显示全部楼层
    官方的感觉有些问题,我当时也弄不通,最后直接去恩山弄的修改版
    回复

    使用道具 举报

    0

    主题

    834

    帖子

    1684

    积分

    禁止发言

    积分
    1684
    发表于 2023-1-14 09:16:06 | 显示全部楼层
    提示: 作者被禁止或删除 内容自动屏蔽
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|gl-inet.cn ( 粤ICP备18130956号 )

    GMT+8, 2024-4-27 09:31 , Processed in 0.028273 second(s), 26 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表