鸿蒙系统源码编译,鸿蒙2.0源码编译问题

昨天折腾了鸿蒙的源码编译,按照官网的步骤编译发现有这道地方无法编译通过,看看哪位大神能帮忙解决,感谢 具体错误如下:

昨天折腾了鸿蒙的源码编译,按照官网的步骤编译发现有这道地方无法编译通过,看看哪位大神能帮忙解决,感谢

具体错误如下:

[196/197] ACTION //vendor/hisi/hi3861/hi3861:run_wifiiot_scons(//build/lite/toolchain:linux_x86_64_riscv32_gcc)FAILED: obj/vendor/hisi/hi3861/hi3861/run_wifiiot_scons_build_ext_components.txtpython ../../build/lite/build_ext_components.py --path=../../vendor/hisi/hi3861/hi3861 --command=sh\ hm_build.shexecute ota_builder with python...Traceback (most recent call last):File "/usr/local/lib/scons/SCons/Script/Main.py", line 1381, in main_exec_main(parser, values)File "/usr/local/lib/scons/SCons/Script/Main.py", line 1344, in _exec_main_main(parser)File "/usr/local/lib/scons/SCons/Script/Main.py", line 1022, in _mainSCons.Script._SConscript._SConscript(fs, script)File "/usr/local/lib/scons/SCons/Script/SConscript.py", line 286, in _SConscriptexec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)File "/root/code/vendor/hisi/hi3861/hi3861/SConstruct", line 211, in File "/usr/local/lib/scons/SCons/Script/SConscript.py", line 597, in SConscriptreturn _SConscript(self.fs, *files, **subst_kw)File "/usr/local/lib/scons/SCons/Script/SConscript.py", line 286, in _SConscriptexec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)File "/root/code/vendor/hisi/hi3861/hi3861/boot/flashboot/SConscript", line 104, in objs += env.SConscript(os.path.join(src, 'SConscript'), {'env':env,}, variant_dir = os.path.join('#', obj_path, "flashboot", path), duplicate=0)File "/usr/local/lib/scons/SCons/Script/SConscript.py", line 597, in SConscriptreturn _SConscript(self.fs, *files, **subst_kw)File "/usr/local/lib/scons/SCons/Script/SConscript.py", line 297, in _SConscripthandle_missing_SConscript(f, kw.get('must_exist', None))File "/usr/local/lib/scons/SCons/Script/SConscript.py", line 179, in handle_missing_SConscriptSCons.Warnings.warn(SCons.Warnings.MissingSConscriptWarning, msg)File "/usr/local/lib/scons/SCons/Warnings.py", line 174, in warn_warningOut(warning)File "/usr/local/lib/scons/SCons/Script/Main.py", line 613, in _scons_internal_warningfilename, lineno, routine, dummy = find_deepest_user_frame(traceback.extract_stack())File "/usr/local/lib/python3.8/traceback.py", line 211, in extract_stackstack = StackSummary.extract(walk_stack(f), limit=limit)File "/usr/local/lib/python3.8/traceback.py", line 366, in extractf.lineFile "/usr/local/lib/python3.8/traceback.py", line 288, in lineself._line = linecache.getline(self.filename, self.lineno).strip()File "/usr/local/lib/python3.8/linecache.py", line 16, in getlinelines = getlines(filename, module_globals)File "/usr/local/lib/python3.8/linecache.py", line 47, in getlinesreturn updatecache(filename, module_globals)File "/usr/local/lib/python3.8/linecache.py", line 137, in updatecachelines = fp.readlines()File "/usr/local/lib/python3.8/codecs.py", line 322, in decode(result, consumed) = self._buffer_decode(data, self.errors, final)UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 699: invalid continuation byteDuring handling of the above exception, another exception occurred:

antherseventeen

前天 12:01

问题大致上解决了 我的解决办法是编译 先把官方鸿蒙全量代码下载到本地,从gitee下对应的vendor替换就可以编译通过了。(目测全量下载有一定的差异)

shuaytao

前天 10:06

升级一下scons试试

antherseventeen

前天 10:20

我测试过几个版本了( scons-3.0.4、 scons-3.1.2 、 scons-4.0.1 ) 还是一样的报错

春梦鸟留痕

前天 10:54

python版本太高?降到2.7试试

ila

前天 20:58

默认是2.7的

antherseventeen

前天 11:54

官方教程搭建环境要求python3.7以上,我尝试过用python2.7搭建,有很多模块装不上

xu4v

前天 22:18

错误是:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xca in position 699: invalid continuation byte

文件是:/root/code/vendor/hisi/hi3861/hi3861/boot/flashboot/SConscript

antherseventeen

今天 17:57

回复 @xu4v : 感谢,转码后问题是解决了,后面还有别的问题,看起来我下载的代码有问题。

xu4v

今天 17:12

回复 @antherseventeen : 对,这个 can't decode byte 一般都是文件编码没识别的问题,要解决的话一般是把文本文件的编码格式转换一下

antherseventeen

今天 17:02

是的,可能是我下载的代码有问题,这个文件是用gbk编码,后面再gitee上下载的就没有这个问题了

思维特无敌

昨天 17:27

字符集问题,用GBK字符集试试

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值