当前位置:   article > 正文

20230112编译AIO-3568J的Buildroot(rk356x_linux_release_v1.3.0b_20221213)_error: running build_recovery failed!

error: running build_recovery failed!

20230112编译AIO-3568J的Buildroot(rk356x_linux_release_v1.3.0b_20221213)
2023/1/12 20:40


当前可以拿到的Buildroot的SDK;
rk356x_linux_release_v1.0.0_20210511_split_dir
rk356x_linux_release_v1.2.0_20211019_split_dir
rk356x_linux_release_v1.3.0b_20221213_split_dir(最新的SDK)

如果编译rk356x_linux_release_v1.3.0b_20221213_split_dir,建议使用Ubuntu18.04(Firefly官方使用)和Ubuntu20.04。
如果需要使用OpenHarmony(python3.8以上),那就使用Ubuntu20.04(Ubuntu18.04默认Python3.6)
如果使用Ubuntu22.04,你就会增长很多知识!


https://wiki.t-firefly.com/Core-3568J/buildroot_compile.html
Core-3568J-4. 编译 Buildroot 固件

Core-3568J产品规格书
Core-3568J 采用 RK3568 四核 64 位 Cortex-A55 处理器,22 nm 先进工艺,主频最高2.0GHz, 集成双核心架构GPU以及高效能NPU;最大支持8G大内存;支持WiFi6,5G/4G等高速无线网络通讯;拥有丰富的接口扩展,支持多种视频输入输出接口,可适用于智能NVR、云终端、物联网网关、工业控制等场景


4. 编译 Buildroot 固件
本章介绍 Buildroot 固件的编译流程,推荐在 Ubuntu 18.04 系统环境下进行开发,若使用其它系统版本,可能需要对编译环境做相应调整。


4.1. 编译 SDK
4.1.1. 编译前配置
不同板型的配置文件存放在device/rockchip/rk356x/目录下
回到 SDK 根目录执行build.sh选择配置文件:
./build.sh aio-3568j-buildroot.mk
配置文件会链接到 device/rockchip/.BoardConfig.mk,检查该文件可以验证是否配置成功。

rootroot@rootroot-adol-ADOLBOOK-I421UAY-ADOL14UA:~/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213$ ./build.sh aio-3568j-buildroot.mk

You're building on Linux
Launch menu...pick a combo:

0. default BoardConfig.mk
1. BoardConfig-rk3566-evb2-lp4x-v10-32bit.mk
2. BoardConfig-rk3566-evb2-lp4x-v10.mk
3. BoardConfig-rk3568-evb1-ddr4-v10-32bit.mk
4. BoardConfig-rk3568-evb1-ddr4-v10-spi-nor-64M.mk
5. BoardConfig-rk3568-evb1-ddr4-v10.mk
6. BoardConfig-rk3568-nvr-spi-nand.mk
7. BoardConfig-rk3568-nvr.mk
8. BoardConfig-rk3568-uvc-evb1-ddr4-v10.mk
9. BoardConfig.mk
10. aio-3566-jd4-2cam-buildroot.mk
11. aio-3566-jd4-2cam-ubuntu.mk
12. aio-3566-jd4-buildroot.mk
13. aio-3566-jd4-mipi-2cam-buildroot.mk
14. aio-3566-jd4-mipi-2cam-ubuntu.mk
15. aio-3566-jd4-mipi-buildroot.mk
16. aio-3566-jd4-mipi-ubuntu.mk
17. aio-3566-jd4-ubuntu.mk
18. aio-3568j-2cam-buildroot.mk
19. aio-3568j-2cam-ubuntu.mk
20. aio-3568j-buildroot.mk
21. aio-3568j-mipi-2cam-buildroot.mk
22. aio-3568j-mipi-2cam-ubuntu.mk
23. aio-3568j-mipi-buildroot.mk
24. aio-3568j-mipi-ubuntu.mk
25. aio-3568j-nvr.mk
26. aio-3568j-ubuntu.mk
27. cs-r2-3566-jd4-ubuntu.mk
28. firefly-rk3566-buildroot.mk
29. firefly-rk3566-ubuntu.mk
30. firefly-rk3568-buildroot.mk
31. firefly-rk3568-nvr-buildroot.mk
32. firefly-rk3568-ubuntu.mk
33. ipc-m10r800-a3568j-ubuntu.mk
34. itx-3568q-2cam-ubuntu.mk
35. itx-3568q-buildroot.mk
36. itx-3568q-lvds-2cam-ubuntu.mk
37. itx-3568q-lvds-ubuntu.mk
38. itx-3568q-mipi-2cam-ubuntu.mk
39. itx-3568q-mipi-ubuntu.mk
40. itx-3568q-ubuntu.mk
41. roc-rk3566-pc-2cam-buildroot.mk
42. roc-rk3566-pc-2cam-ubuntu.mk
43. roc-rk3566-pc-buildroot.mk
44. roc-rk3566-pc-mipi-2cam-buildroot.mk
45. roc-rk3566-pc-mipi-2cam-ubuntu.mk
46. roc-rk3566-pc-mipi-buildroot.mk
47. roc-rk3566-pc-mipi-ubuntu.mk
48. roc-rk3566-pc-ubuntu.mk
49. roc-rk3568-pc-2cam-buildroot.mk
50. roc-rk3568-pc-2cam-ubuntu.mk
51. roc-rk3568-pc-buildroot.mk
52. roc-rk3568-pc-mipi-2cam-buildroot.mk
53. roc-rk3568-pc-mipi-2cam-ubuntu.mk
54. roc-rk3568-pc-mipi-buildroot.mk
55. roc-rk3568-pc-mipi-ubuntu.mk
56. roc-rk3568-pc-se-2cam-buildroot.mk
57. roc-rk3568-pc-se-2cam-ubuntu.mk
58. roc-rk3568-pc-se-buildroot.mk
59. roc-rk3568-pc-se-edp-buildroot.mk
60. roc-rk3568-pc-se-edp-ubuntu.mk
61. roc-rk3568-pc-se-mipi-2cam-buildroot.mk
62. roc-rk3568-pc-se-mipi-2cam-ubuntu.mk
63. roc-rk3568-pc-se-mipi-buildroot.mk
64. roc-rk3568-pc-se-mipi-ubuntu.mk
65. roc-rk3568-pc-se-ubuntu.mk
66. roc-rk3568-pc-ubuntu.mk
67. station-m2-ubuntu.mk
68. station-p2-ubuntu.mk
Which would you like? [0]: 20


相关配置介绍:

# Target arch
export RK_ARCH=arm64 # 64位 ARM 架构
# Uboot defconfig
export RK_UBOOT_DEFCONFIG=firefly_rk3568 # u-boot 配置文件
# Kernel defconfig
export RK_KERNEL_DEFCONFIG=firefly_linux_defconfig # kernel 配置文件
# Kernel dts
export RK_KERNEL_DTS=firefly-rk3568-aioj # dts 文件
# Buildroot config
export RK_CFG_BUILDROOT=rockchip_rk3568 # Buildroot 配置
# Recovery config
export RK_CFG_RECOVERY=rockchip_rk356x_recovery # recovery 配置
# parameter for GPT table
export RK_PARAMETER=parameter-buildroot-fit.txt # 分区表
# rootfs image path
export RK_ROOTFS_IMG=rockdev/rootfs.${RK_ROOTFS_TYPE} # 根文件系统路径
4.1.2. 选择编译配件
在 device/rockchip/rk356x/ 目录下,除了aio-3568j-buildroot.mk之外,还有其他不同配件搭配的配置文件


# Target arch
export RK_ARCH=arm64
export RK_UBOOT_DEFCONFIG=firefly_rk3568
export RK_KERNEL_DEFCONFIG=firefly_linux_defconfig
export RK_KERNEL_DTS=firefly-rk3568-aioj
export RK_CFG_BUILDROOT=rockchip_rk3568
export RK_CFG_RECOVERY=rockchip_rk356x_recovery
export RK_PARAMETER=parameter-buildroot-fit.txt
export RK_ROOTFS_IMG=rockdev/rootfs.${RK_ROOTFS_TYPE}


rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ export RK_ARCH=arm64
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ export RK_UBOOT_DEFCONFIG=firefly_rk3568
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ export RK_KERNEL_DEFCONFIG=firefly_linux_defconfig
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ export RK_KERNEL_DTS=firefly-rk3568-aioj
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ export RK_CFG_BUILDROOT=rockchip_rk3568
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ export RK_CFG_RECOVERY=rockchip_rk356x_recovery
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ export RK_PARAMETER=parameter-buildroot-fit.txt
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ export RK_ROOTFS_IMG=rockdev/rootfs.${RK_ROOTFS_TYPE}
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ 
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ echo $RK_ARCH
arm64
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ echo $RK_UBOOT_DEFCONFIG
firefly_rk3568
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ echo $RK_KERNEL_DEFCONFIG
firefly_linux_defconfig
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ echo $RK_KERNEL_DTS
firefly-rk3568-aioj
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ echo $RK_CFG_BUILDROOT
rockchip_rk3568
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ echo $RK_CFG_RECOVERY
rockchip_rk356x_recovery
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ echo $RK_PARAMETER
parameter-buildroot-fit.txt
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ echo $RK_ROOTFS_IMG
rockdev/rootfs.
rootroot@rootroot-HP-ZHAN-66-Pro-A-14-G3:~/rk356x_linux_release_v1.3.0b_20221213$ 


在 device/rockchip/rk356x/ 目录下,除了aio-3568j-buildroot.mk之外,还有其他不同配件搭配的配置文件
配置文件的名称中会标明所使用的屏幕和摄像头。如果没有标明屏幕,说明使用的是默认 HDMI 显示;如果没有标明摄像头,说明使用的是默认单目摄像头

# 例如:
xxxx-buildroot.mk              # 使用 HDMI + 单目摄像头
xxxx-2cam-buildroot.mk         # 使用 HDMI + 双目摄像头
xxxx-mipi-buildroot.mk         # 使用 mipi + 单目摄像头
xxxx-mipi-2cam-buildroot.mk    # 使用 mipi + 双目摄像头

选择好配置文件后,执行build.sh来使其生效:
# 例如:
./build.sh xxxx-mipi-2cam-buildroot.mk

4.1.3. 全自动编译
全自动编译会执行所有编译、打包操作,生成完整固件。
./build.sh

4.1.4. 部分编译
编译 u-boot
./build.sh uboot

编译 kernel
注意:Firefly kernel 没有开启全部的内核功能,有需求请查看Kernel 使用
./build.sh kernel

编译 recovery
./build.sh recovery

编译 Buildroot 根文件系统
编译 Buildroot 根文件系统,将会在 buildroot/output 生成编译输出目录:
./build.sh buildroot

# 注:确保作为普通用户编译 Buildroot 根文件系统,避免不必要的错误。


4.1.5. 打包固件
更新各部分镜像链接到 rockdev/ 目录:
./mkfirmware.sh

打包固件,生成的完整固件会保存到 rockdev/pack/ 目录。
./build.sh updateimg


4.2. 分区说明
4.2.1. parameter 分区表
parameter.txt 文件中包含了固件的分区信息,以 parameter-buildroot-fit.txt 为例:
路径:device/rockchip/rk356x/parameter-buildroot-fit.txt

FIRMWARE_VER: 1.0
MACHINE_MODEL: RK3568
MACHINE_ID: 007
MANUFACTURER: RK3568
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 0xffffffff
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
TYPE: GPT
CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00010000@0x00008000(boot),0x00010000@0x00018000(recovery),0x00010000@0x00028000(backup),0x00040000@0x00038000(oem),0x00c00000@0x00078000(rootfs),-@0x00c78000(userdata:grow)
uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9
CMDLINE 属性是我们关注的地方,以 uboot 为例, 0x00002000@0x00004000(uboot) 中 0x00004000 为uboot 分区的起始位置,0x00002000 为分区的大小,以此类推。

4.2.2. package-file
package-file 文件用于打包固件时确定需要的分区镜像和镜像路径,同时它需要与 parameter.txt 文件保持一致。

路径:tools/linux/Linux_Pack_Firmware/rockdev/rk356x-package-file

package-file    package-file
bootloader      Image/MiniLoaderAll.bin
parameter       Image/parameter.txt
uboot           Image/uboot.img
misc            Image/misc.img
boot            Image/boot.img
recovery        Image/recovery.img
rootfs          Image/rootfs.img
oem             Image/oem.img
userdata        Image/userdata.img
backup          RESERVED


4.3. 更多内容
《Firefly Buildroot 使用手册》

《Firefly Buildroot 开发手册》


编译 recovery【有三个问题!】
./build.sh recovery

问题一:
rootroot@rootroot-adol-ADOLBOOK-I421UAY-ADOL14UA:~/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213$ 
rootroot@rootroot-adol-ADOLBOOK-I421UAY-ADOL14UA:~/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213$ ./build.sh recovery
processing option: recovery
==========Start building recovery==========
TARGET_RECOVERY_CONFIG=rockchip_rk356x_recovery
========================================
config is rockchip_rk356x_recovery
found kernel image
Top of tree: /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213
===========================================

#TARGET_BOARD=rk356x
#OUTPUT_DIR=output/rockchip_rk356x_recovery
#CONFIG=rockchip_rk356x_recovery_defconfig

===========================================
make: Entering directory '/home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot'
make[1]: *** No rule to make target '/home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/.br-external.mk'.  Stop.
make: *** [Makefile:83: _all] Error 2
make: Leaving directory '/home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot'
Command exited with non-zero status 2
you take 0:00.08 to build recovery
ERROR: Running build_recovery failed!
ERROR: exit code 2 from line 1064:
    /usr/bin/time -f "you take %E to build recovery" $COMMON_DIR/mk-ramdisk.sh recovery.img $RK_CFG_RECOVERY
rootroot@rootroot-adol-ADOLBOOK-I421UAY-ADOL14UA:~/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213$ 
rootroot@rootroot-adol-ADOLBOOK-I421UAY-ADOL14UA:~/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213$ sudo apt-get install time
[sudo] password for rootroot: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
time is already the newest version (1.9-0.1build2).
0 upgraded, 0 newly installed, 0 to remove and 160 not upgraded.
rootroot@rootroot-adol-ADOLBOOK-I421UAY-ADOL14UA:~/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213$ 

 


百度搜索:ERROR: exit code 2 from line 1064:     /usr/bin/time -f "you take %E to build recovery" $COMMON_DIR/

 

https://blog.csdn.net/Neutionwei/article/details/122262078
[ROC-RK3568-PC] 手把手教你编译Linux_SDK并打包Buildroot系统固件

https://blog.csdn.net/u011559046/article/details/118642143
rv1126rv1109开发环境搭建

https://blog.csdn.net/qq_38664089/article/details/125870510
RK3588编译问题集

 

 

 


问题二:

2023-01-12T15:24:55 [ 93%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackTGZGenerator.cxx.o
2023-01-12T15:24:55 [ 93%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmParseGTMCoverage.cxx.o
2023-01-12T15:24:55 [ 93%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmParseJacocoCoverage.cxx.o
2023-01-12T15:24:55 /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmServerProtocol.cxx: In member function 'std::size_t std::hash<LanguageData>::operator()(const LanguageData&) const':
2023-01-12T15:24:55 /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmServerProtocol.cxx:620:43: error: 'numeric_limits' is not a member of 'std'
2023-01-12T15:24:55 620 |                          (i.second ? std::numeric_limits<size_t>::max() : 0));
2023-01-12T15:24:55 |                                           ^~~~~~~~~~~~~~
2023-01-12T15:24:55 /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmServerProtocol.cxx:620:64: error: expected primary-expression before '>' token
2023-01-12T15:24:55 620 |                          (i.second ? std::numeric_limits<size_t>::max() : 0));
2023-01-12T15:24:55 |                                                                ^
2023-01-12T15:24:55 /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmServerProtocol.cxx:620:67: error: '::max' has not been declared; did you mean 'std::max'?
2023-01-12T15:24:55 620 |                          (i.second ? std::numeric_limits<size_t>::max() : 0));
2023-01-12T15:24:55 |                                                                   ^~~
2023-01-12T15:24:55 |                                                                   std::max
2023-01-12T15:24:55 In file included from /usr/include/c++/11/algorithm:62,
2023-01-12T15:24:55 from /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmLinkItem.h:8,
2023-01-12T15:24:55 from /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmGeneratorTarget.h:8,
2023-01-12T15:24:55 from /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmServerProtocol.cxx:7:
2023-01-12T15:24:55 /usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max' declared here
2023-01-12T15:24:55 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
2023-01-12T15:24:55 |     ^~~
2023-01-12T15:24:55 /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmServerProtocol.cxx:626:39: error: 'numeric_limits' is not a member of 'std'
2023-01-12T15:24:55 626 |       result ^ (in.IsGenerated ? std::numeric_limits<size_t>::max() : 0);
2023-01-12T15:24:55 |                                       ^~~~~~~~~~~~~~
2023-01-12T15:24:55 /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmServerProtocol.cxx:626:60: error: expected primary-expression before '>' token
2023-01-12T15:24:55 626 |       result ^ (in.IsGenerated ? std::numeric_limits<size_t>::max() : 0);
2023-01-12T15:24:55 |                                                            ^
2023-01-12T15:24:55 /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmServerProtocol.cxx:626:63: error: '::max' has not been declared; did you mean 'std::max'?
2023-01-12T15:24:55 626 |       result ^ (in.IsGenerated ? std::numeric_limits<size_t>::max() : 0);
2023-01-12T15:24:55 |                                                               ^~~
2023-01-12T15:24:55 |                                                               std::max
2023-01-12T15:24:55 In file included from /usr/include/c++/11/algorithm:62,
2023-01-12T15:24:55 from /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmLinkItem.h:8,
2023-01-12T15:24:55 from /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmGeneratorTarget.h:8,
2023-01-12T15:24:55 from /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-cmake-3.8.2/Source/cmServerProtocol.cxx:7:
2023-01-12T15:24:55 /usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max' declared here
2023-01-12T15:24:55 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
2023-01-12T15:24:55 |     ^~~
2023-01-12T15:24:56 [ 93%] Building CXX object Source/CMakeFiles/CPackLib.dir/CPack/cmCPackTXZGenerator.cxx.o
2023-01-12T15:24:56 [ 94%] Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmParseBlanketJSCoverage.cxx.o

 

百度搜索:
Source/cmServerProtocol.cxx:620:43: error: 'numeric_limits' is not a member of 'std' 2023-01-12T15:2

 

https://blog.csdn.net/qq_38204686/article/details/114950313
c++ error: ‘XXX’ is not a member of ‘std’

网上参考方案:CMakeLists.txt 添加 set(CMAKE_CXX_STANDARD 11) 
【C++11的问题,Ubuntu22.04的C++就是C++11】


https://blog.csdn.net/shanpenghui/article/details/79487015
‘numeric_limits’ is not a member of ‘std’


Z:\rk356x_linux_release_v1.3.0b_20221213_split_dir\rk356x_linux_release_v1.3.0b_20221213\buildroot\output\rockchip_rk356x_recovery\build\host-cmake-3.8.2\Source\cmLinkItem.h

/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
#ifndef cmLinkItem_h
#define cmLinkItem_h

#include <cmConfigure.h>

#include <algorithm>
#include <map>
#include <string>
#include <vector>

#include <stdexcept>
#include <limits>


#include "cmListFileCache.h"
#include "cmSystemTools.h"
#include "cmTargetLinkLibraryType.h"

 


问题三:
2023-01-12T16:03:32 /usr/bin/gcc  -L/home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/host/lib -Wl,-rpath,/home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/host/lib mksquashfs.o read_fs.o action.o swap.o pseudo.o compressor.o sort.o progressbar.o read_file.o info.o restore.o process_fragments.o caches-queues-lists.o gzip_wrapper.o lzma_xz_wrapper.o xz_wrapper.o lzo_wrapper.o lz4_wrapper.o xattr.o read_xattrs.o -lpthread -lm -lz -llzma -llzma  -llzo2 -llz4 -o mksquashfs
2023-01-12T16:03:32 /usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400be8): first defined here
2023-01-12T16:03:32 /usr/bin/ld: read_fs.o:(.bss+0x8): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400bf0): first defined here
2023-01-12T16:03:32 /usr/bin/ld: action.o:(.bss+0x0): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400be8): first defined here
2023-01-12T16:03:32 /usr/bin/ld: action.o:(.bss+0x8): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400bf0): first defined here
2023-01-12T16:03:32 /usr/bin/ld: sort.o:(.bss+0x100000): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400be8): first defined here
2023-01-12T16:03:32 /usr/bin/ld: sort.o:(.bss+0x100008): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400bf0): first defined here
2023-01-12T16:03:32 /usr/bin/ld: info.o:(.bss+0x10): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400bf0): first defined here
2023-01-12T16:03:32 /usr/bin/ld: info.o:(.bss+0x8): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400be8): first defined here
2023-01-12T16:03:32 /usr/bin/ld: restore.o:(.bss+0x0): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400be8): first defined here
2023-01-12T16:03:32 /usr/bin/ld: restore.o:(.bss+0x8): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400bf0): first defined here
2023-01-12T16:03:32 /usr/bin/ld: process_fragments.o:(.bss+0x0): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400be8): first defined here
2023-01-12T16:03:32 /usr/bin/ld: process_fragments.o:(.bss+0x8): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400bf0): first defined here
2023-01-12T16:03:32 /usr/bin/ld: xattr.o:(.bss+0x8): multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400be8): first defined here
2023-01-12T16:03:32 /usr/bin/ld: xattr.o:(.bss+0x10): multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400bf0): first defined here
2023-01-12T16:03:32 collect2: error: ld returned 1 exit status
2023-01-12T16:03:32 make[2]: *** [Makefile:228: mksquashfs] Error 1
2023-01-12T16:03:32 make[1]: *** [package/pkg-generic.mk:231: /home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/build/host-squashfs-3de1687d7432ea9b302c2db9521996f506c140a3/.stamp_built] Error 2
2023-01-12T16:03:32 make: *** [/home/rootroot/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213/buildroot/output/rockchip_rk356x_recovery/Makefile:16: _all] Error 2
Command exited with non-zero status 1
you take 0:41.83 to build recovery
ERROR: Running build_recovery failed!
ERROR: exit code 1 from line 1065:
    /usr/bin/time -f "you take %E to build recovery" $COMMON_DIR/mk-ramdisk.sh recovery.img $RK_CFG_RECOVERY
rootroot@rootroot-adol-ADOLBOOK-I421UAY-ADOL14UA:~/rk356x_linux_release_v1.3.0b_20221213_split_dir/rk356x_linux_release_v1.3.0b_20221213$ 

 


搜索:/usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `fwriter_buffer';

 

https://blog.csdn.net/a002wm/article/details/128515764
志r528编译搭建之“秘籍”

 extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
-struct cache *bwriter_buffer, *fwriter_buffer;


Z:\rk356x_linux_release_v1.3.0b_20221213_split_dir\rk356x_linux_release_v1.3.0b_20221213\buildroot\output\rockchip_rk356x_recovery\build\host-squashfs-3de1687d7432ea9b302c2db9521996f506c140a3\squashfs-tools\mksquashfs.h
/*
 * Lowest amount of physical memory considered viable for Mksquashfs
 * to run in Mbytes
 */
#define SQUASHFS_LOWMEM 64

/* offset of data in compressed metadata blocks (allowing room for
 * compressed size */
#define BLOCK_OFFSET 2

extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
extern struct cache *bwriter_buffer, *fwriter_buffer;
extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,
    *to_frag, *locked_fragment, *to_process_frag;
extern struct append_file **file_mapping;

 

问题四


Z:\rk356x_linux_release_v1.3.0b_20221213_split_dir\rk356x_linux_release_v1.3.0b_20221213\buildroot\output\rockchip_rk3568\build\host-cmake-3.8.2\Source\cmLinkItem.h
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing for details.  */
#ifndef cmLinkItem_h
#define cmLinkItem_h

 

#include <cmConfigure.h>

#include <algorithm>
#include <map>
#include <string>
#include <vector>

#include <stdexcept>
#include <limits>


#include "cmListFileCache.h"
#include "cmSystemTools.h"
#include "cmTargetLinkLibraryType.h"

class cmGeneratorTarget;

 


问题五
这两个问题和前面的解决方法相同!

 


Z:\rk356x_linux_release_v1.3.0b_20221213_split_dir\rk356x_linux_release_v1.3.0b_20221213\buildroot\output\rockchip_rk3568\build\host-squashfs-3de1687d7432ea9b302c2db9521996f506c140a3\squashfs-tools\mksquashfs.h

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/275216
推荐阅读
相关标签
  

闽ICP备14008679号