找回密码
 立即注册
img_loading
智能检测中

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888广告投放联系QQ68610888
查看: 2502|回复: 6

虚拟机编译总是报错,不知原因求大神指点!!!

[复制链接]
发表于 2021-11-30 11:50 | 显示全部楼层 |阅读模式
使用lean大神源码编译小米R3P固件,初次默认配置编译成功,本次准备制作插件库,在原始配置的基础上只添加luci的application大部分插件为M选项配置,编译后就出现以下报错,求大神指点。虚拟机系统为ubantu20.04

t-mipsel_24kc_musl/usr/lib -lz -L/home/zzz/lede/staging_dir/target-mipsel_24kc_musl/usr/lib -lgnutls -pthread -lm -L/home/zzz/lede/staging_dir/target-mipsel_24kc_musl/usr/lib -lz -L/home/zzz/lede/staging_dir/target-mipsel_24kc_musl/usr/lib -lfdk-aac -L/home/zzz/lede/staging_dir/target-mipsel_24kc_musl/usr/lib -lopus -L/home/zzz/lede/staging_dir/target-mipsel_24kc_musl/usr/lib -lm -lshine -lm -lm -pthread -lm  
/home/zzz/lede/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: libavformat/libavformat.so: undefined reference to `__atomic_fetch_sub_8'
/home/zzz/lede/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: libavformat/libavformat.so: undefined reference to `__atomic_store_8'
/home/zzz/lede/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: libavformat/libavformat.so: undefined reference to `__atomic_load_8'
/home/zzz/lede/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib/gcc/mipsel-openwrt-linux-musl/8.4.0/../../../../mipsel-openwrt-linux-musl/bin/ld: libavformat/libavformat.so: undefined reference to `__atomic_fetch_add_8'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:124: ffmpeg_g] Error 1
make[4]: Leaving directory '/home/zzz/lede/build_dir/target-mipsel_24kc_musl/ffmpeg-full/ffmpeg-4.4'
make[3]: *** [Makefile:751: /home/zzz/lede/build_dir/target-mipsel_24kc_musl/ffmpeg-full/ffmpeg-4.4/.built] Error 2
make[3]: Leaving directory '/home/zzz/lede/feeds/packages/multimedia/ffmpeg'
time: package/feeds/packages/ffmpeg/full/compile#0.37#0.15#0.46
    ERROR: package/feeds/packages/ffmpeg failed to build (build variant: full).
make[2]: *** [package/Makefile:116: package/feeds/packages/ffmpeg/compile] Error 1
make[2]: Leaving directory '/home/zzz/lede'
make[1]: *** [package/Makefile:110: /home/zzz/lede/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/zzz/lede'
make: *** [/home/zzz/lede/include/toplevel.mk:230:world] 错误 2



本帖子中包含更多资源

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

×
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
发表于 2021-11-30 12:13 | 显示全部楼层
试一下这个办法,修改源码里的这个文件
/lede/feeds/packages/multimedia/ffmpeg/Makefile
文件里面搜索 pkg-config 在它下面添加一行代码
--extra-libs=-latomic \
  1.         --pkg-config="pkg-config" \
  2.         --extra-libs=-latomic \
  3.         --enable-shared \
复制代码

然后再编译
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-11-30 15:49 | 显示全部楼层
jjit 发表于 2021-11-30 12:13
试一下这个办法,修改源码里的这个文件
/lede/feeds/packages/multimedia/ffmpeg/Makefile
文件里面搜索  ...

谢谢大佬,按照你这边的指点,能继续往下走了,但又卡再这里了.
install -d -m0755 /home/zzz/lede/build_dir/target-mipsel_24kc_musl/cjdns-cjdns-v21/tmp
(cd /home/zzz/lede/build_dir/target-mipsel_24kc_musl/cjdns-cjdns-v21 && CROSS="true" CC="mipsel-openwrt-linux-musl-gcc" AR="mipsel-openwrt-linux-musl-gcc-ar" RANLIB="mipsel-openwrt-linux-musl-gcc-ranlib" CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/home/zzz/lede/build_dir/target-mipsel_24kc_musl/cjdns-cjdns-v21=cjdns-cjdns-v21 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -U_FORTIFY_SOURCE -Wno-error=array-bounds -Wno-error=stringop-overflow -Wno-error=stringop-overread" LDFLAGS="-L/home/zzz/lede/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/lib -L/home/zzz/lede/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/lib -znow -zrelro" SYSTEM="linux" TARGET_ARCH=""mipsel"" SSP_SUPPORT="y" GYP_ADDITIONAL_ARGS="-f make-linux" CJDNS_BUILD_TMPDIR="/home/zzz/lede/build_dir/target-mipsel_24kc_musl/cjdns-cjdns-v21/tmp" CJDNS_RELEASE_VERSION= exec ./do)
timeout is 600000
Initialize 58ms
{"isLLVM":false,"isClang":false,"isGCC":true,"version":"8.4.0"}
Build NaCl
Creating directories
Link time optimization not supported [cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
]
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread

Total build time: 431ms.
/home/zzz/lede/build_dir/target-mipsel_24kc_musl/cjdns-cjdns-v21/build_linux/dependencies/cnacl/node_build/RandomBytes.js:13
        if (retCode) { throw new Error('failed to compile'); }
                       ^

Error: failed to compile
    at /home/zzz/lede/build_dir/target-mipsel_24kc_musl/cjdns-cjdns-v21/build_linux/dependencies/cnacl/node_build/RandomBytes.js:13:30
    at /home/zzz/lede/build_dir/target-mipsel_24kc_musl/cjdns-cjdns-v21/node_build/builder.js:95:13
    at ChildProcess.<anonymous> (/home/zzz/lede/build_dir/target-mipsel_24kc_musl/cjdns-cjdns-v21/tools/lib/Semaphore.js:7:30)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:198:13)
    at Pipe._handle.close (net.js:607:12)
make[3]: *** [Makefile:149: /home/zzz/lede/build_dir/target-mipsel_24kc_musl/cjdns-cjdns-v21/.built] Error 1
make[3]: Leaving directory '/home/zzz/lede/feeds/routing/cjdns'
time: package/feeds/routing/cjdns/compile#0.81#0.30#1.06
    ERROR: package/feeds/routing/cjdns failed to build.
make[2]: *** [package/Makefile:116: package/feeds/routing/cjdns/compile] Error 1
make[2]: Leaving directory '/home/zzz/lede'
make[1]: *** [package/Makefile:110: /home/zzz/lede/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/zzz/lede'
make: *** [/home/zzz/lede/include/toplevel.mk:230:world] 错误 2
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2021-11-30 17:01 | 显示全部楼层
也是修改源码试试 /lede/feeds/routing/cjdns/Makefile
文件里面找到 -Wno-error=stringop-overread
删了这个参数,就删这个参数,前面的参数不删

点评

修改了,还是一样的错误。 从make menuconfig选项luci的application清除cjdns插件,编译还是一样的错误。步骤是: make menuconfig 清除cjdns插件 save make -j1 V=s  详情 回复 发表于 2021-11-30 17:23
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-11-30 17:23 | 显示全部楼层
jjit 发表于 2021-11-30 17:01
也是修改源码试试 /lede/feeds/routing/cjdns/Makefile
文件里面找到 -Wno-error=stringop-overread
删了 ...

修改了,还是一样的错误。

从make menuconfig选项luci的application清除cjdns插件,编译还是一样的错误。步骤是:
make menuconfig    清除cjdns插件   save
make -j1 V=s

点评

您好,这个问题您解决了么,我也遇到了同一个问题,系统是WSL2的Ubuntu,也是编译cjdns的时候出错的  详情 回复 发表于 2021-12-5 20:26
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2021-12-5 20:26 | 显示全部楼层
zjh306858724 发表于 2021-11-30 17:23
修改了,还是一样的错误。

从make menuconfig选项luci的application清除cjdns插件,编译还是一样的 ...

您好,这个问题您解决了么,我也遇到了同一个问题,系统是WSL2的Ubuntu,也是编译cjdns的时候出错的
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2021-12-5 20:48 | 显示全部楼层
install -d -m0755 /home/aabbcco/lede/lede/build_dir/target-aarch64_generic_musl/cjdns-cjdns-v21/tmp
(cd /home/aabbcco/lede/lede/build_dir/target-aarch64_generic_musl/cjdns-cjdns-v21 && CROSS="true" CC="aarch64-openwrt-linux-musl-gcc" AR="aarch64-openwrt-linux-musl-gcc-ar" RANLIB="aarch64-openwrt-linux-musl-gcc-ranlib" CFLAGS="-Os -pipe -mcpu=generic -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -fmacro-prefix-map=/home/aabbcco/lede/lede/build_dir/target-aarch64_generic_musl/cjdns-cjdns-v21=cjdns-cjdns-v21 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -U_FORTIFY_SOURCE -Wno-error=array-bounds -Wno-error=stringop-overflow -Wno-error=stringop-overread" LDFLAGS="-L/home/aabbcco/lede/lede/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/usr/lib -L/home/aabbcco/lede/lede/staging_dir/toolchain-aarch64_generic_gcc-8.4.0_musl/lib -znow -zrelro" SYSTEM="linux" TARGET_ARCH=""aarch64"" SSP_SUPPORT="y" GYP_ADDITIONAL_ARGS="-f make-linux" CJDNS_BUILD_TMPDIR="/home/aabbcco/lede/lede/build_dir/target-aarch64_generic_musl/cjdns-cjdns-v21/tmp" CJDNS_RELEASE_VERSION= exec ./do)
timeout is 600000
Initialize 28ms
{"isLLVM":false,"isClang":false,"isGCC":true,"version":"8.4.0"}
Build NaCl
Creating directories
Link time optimization not supported [cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread
]
cc1: error: -Werror=stringop-overread: no option -Wstringop-overread

Total build time: 339ms.
/home/aabbcco/lede/lede/build_dir/target-aarch64_generic_musl/cjdns-cjdns-v21/build_linux/dependencies/cnacl/node_build/RandomBytes.js:13
        if (retCode) { throw new Error('failed to compile'); }

                       ^

Error: failed to compile
    at /home/aabbcco/lede/lede/build_dir/target-aarch64_generic_musl/cjdns-cjdns-v21/build_linux/dependencies/cnacl/node_build/RandomBytes.js:13:30
    at /home/aabbcco/lede/lede/build_dir/target-aarch64_generic_musl/cjdns-cjdns-v21/node_build/builder.js:95:13
    at ChildProcess.<anonymous> (/home/aabbcco/lede/lede/build_dir/target-aarch64_generic_musl/cjdns-cjdns-v21/tools/lib/Semaphore.js:7:30)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:198:13)
    at Pipe._handle.close (net.js:607:12)
make[3]: *** [Makefile:149: /home/aabbcco/lede/lede/build_dir/target-aarch64_generic_musl/cjdns-cjdns-v21/.built] Error 1
make[3]: Leaving directory '/home/aabbcco/lede/lede/feeds/routing/cjdns'
time: package/feeds/routing/cjdns/compile#0.74#0.10#0.77
    ERROR: package/feeds/routing/cjdns failed to build.
make[2]: *** [package/Makefile:116: package/feeds/routing/cjdns/compile] Error 1
make[2]: Leaving directory '/home/aabbcco/lede/lede'
make[1]: *** [package/Makefile:110: /home/aabbcco/lede/lede/staging_dir/target-aarch64_generic_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/aabbcco/lede/lede'
make: *** [/home/aabbcco/lede/lede/include/toplevel.mk:230: world] Error 2
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

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

本版积分规则

关闭

欢迎大家光临恩山无线论坛

只谈技术、莫论政事!切勿转播谣言!为了你也为了他人。
只谈技术、莫论政事!(点击见详情) 切记不要随意传播谣言,把自己的日子过安稳了就行,为了自己好也为了大家好。 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。

查看 »

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2025-6-1 09:29

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com

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