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-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

  • 13
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值