WSL + Ubuntu20.04编译 OH-4.0-Release遇到的问题(Too many open files和die__process_unit)及其解决办法
1.Too many open files错误:原因是默认允许的最多同时打开文件限制为1024,通过命令ulimit -n 1000000,问题解决。 patching file arch/arm64/boot/dts/rockchip/rk3399-tve1030g-avb.dts patching file arch/arm64/boot/dts/rockchip/rk3399-tve1030
·
1.Too many open files错误:原因是默认允许的最多同时打开文件限制为1024,通过命令ulimit -n 1000000,问题解决。
patching file arch/arm64/boot/dts/rockchip/rk3399-tve1030g-avb.dts
patching file arch/arm64/boot/dts/rockchip/rk3399-tve1030g.dts
patch: **** Can't create temporary file arch/arm64/boot/dts/rockchip/rk3399-tve1030g.dtsi.oauMRcs : Too many open files
patch: **** Can't rename file Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.oSK92W0 to Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt : Too many open files
patch: **** Can't rename file Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.oSK92W0 to Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt : Too many open files
patch: **** Can't rename file Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.oSK92W0 to Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt : Too many open files
patch: **** Can't rename file Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.oSK92W0 to Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt : Too many open files
patch: **** Can't rename file Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.oSK92W0 to Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt : Too many open files
patch: **** Can't rename file Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.oSK92W0 to Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt : Too many open files
patch: **** Can't rename file Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.oSK92W0 to Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt : Too many open files
patch: **** Can't rename file Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.oSK92W0 to Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt : Too many open files
patch: **** Can't rename file Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.oSK92W0 to Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt : Too many open files
patch: **** Can't rename file Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt.oSK92W0 to Documentation/devicetree/bindings/devfreq/event/rockchip-dfi.txt : Too many open files
ulimit -a可以查看同时允许打开的文件数,对应下图中“open files”
root@DESKTOP-90KJ7MS:/usr/src/openharmony4.0/OpenHarmony-v4.0-Release/OpenHarmony# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 47838
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 47838
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
2. die__process_unit错误:原因是WSL虚拟机默认内存大小不够导致,通过调整WSL内存大小为12GB,问题解决。
die__process_unit: DW_TAG_label (0xa) @ <0xf8> not handled!
die__process_unit: tag not supported 0xa (label)!
die__process_unit: DW_TAG_label (0xa) @ <0x10e> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x12d> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x151> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x176> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x199> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x1b4> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x1cd> not handled!
die__process_unit: DW_TAG_label (0xa) @ <0x1ef> not handled!
在开始搜索栏输入%UserProfile%,在打开文件夹中添加.wslconfig文件,文件内容如下
[wsl2]
memory=12GB
swap=12GB
localhostForwarding=true
WSL虚拟机需要重启,可以在Power shell中输入wsl --shutdown,然后在启动Ubuntu即可生效。可以通过free -m命令进行查看
root@DESKTOP-90KJ7MS:/usr/src/openharmony4.0/OpenHarmony-v4.0-Release/OpenHarmony# free -m
total used free shared buff/cache available
Mem: 11965 1325 222 1 10417 10329
Swap: 12288 83 12204
更多推荐
已为社区贡献3条内容
所有评论(0)