云网牛站
所在位置:首页 > HarmonyOS问题与回答 > 因没有SConscript文件使用DevEco Studio编译Hi3861报错

因没有SConscript文件使用DevEco Studio编译Hi3861报错

2021-06-15 10:01:57作者:1069531172稿源:HarmonyOS站

问题:在Windows下使用DevEco Studio编译Hi3861报错,因没有SConscript文件。

 

问题追加:

以下是DevEco工具版本,以及编译的源码获取路径:

1、DevEcoTool版本是2.2.0

打开visual code的时候控制台会提示:

无法使用 compilerPath 解析配置:“riscv32-unknown-elf-gcc”

The 1 extension(s) below, in workspace recommendations have issues:huawei.deveco-device-tool (not found in marketplace)

2、Hi3861开发板的源码

代码下载地址:https://repo.huaweicloud.com/harmonyos/os/windows_code/code-20210414_1459.tar.gz

在设置Framework时,选择的“Hb”。

3、依赖环境的版本信息

Python版本:3.8.5。

Node.js版本:14.8.0。

HPM版本:1.2.2。

Visual Studio Code版本:1.56.2。

4、出错信息

[OHOS INFO] [203/204] ACTION //device/hisilicon/hispark_pegasus/sdk_liteos:run_wifiiot_scons(//build/lite/toolchain:riscv32-unknown-elf)

[OHOS ERROR] [203/204] ACTION //device/hisilicon/hispark_pegasus/sdk_liteos:run_wifiiot_scons(//build/lite/toolchain:riscv32-unknown-elf)

[OHOS ERROR] FAILED: obj/device/hisilicon/hispark_pegasus/sdk_liteos/run_wifiiot_scons_build_ext_components.txt

[OHOS ERROR] c:\users\wangsai\.deveco-device-tool\core\deveco-venv\scripts\python.exe ../../../build/lite/build_ext_components.py --path=../../../device/hisilicon/hispark_pegasus/sdk_liteos "--command=sh hm_build.sh D:/home/OpenHarmanyOS/code/out/hispark_pegasus/wifiiot_hispark_pegasus win" --target_dir=D:/home/OpenHarmanyOS/code/out/hispark_pegasus/wifiiot_hispark_pegasus/obj/device/hisilicon/hispark_pegasus/sdk_liteos/build.log --out_dir=D:/home/OpenHarmanyOS/code/out/hispark_pegasus/wifiiot_hispark_pegasus/error.log

[OHOS ERROR] [203/204] ACTION //device/hisilicon/hispark_pegasus/sdk_liteos:run_wifiiot_scons(//build/lite/toolchain:riscv32-unknown-elf)

[OHOS ERROR] FAILED: obj/device/hisilicon/hispark_pegasus/sdk_liteos/run_wifiiot_scons_build_ext_components.txt

[OHOS ERROR] c:\users\wangsai\.deveco-device-tool\core\deveco-venv\scripts\python.exe ../../../build/lite/build_ext_components.py --path=../../../device/hisilicon/hispark_pegasus/sdk_liteos "--command=sh hm_build.sh D:/home/OpenHarmanyOS/code/out/hispark_pegasus/wifiiot_hispark_pegasus win" --target_dir=D:/home/OpenHarmanyOS/code/out/hispark_pegasus/wifiiot_hispark_pegasus/obj/device/hisilicon/hispark_pegasus/sdk_liteos/build.log --out_dir=D:/home/OpenHarmanyOS/code/out/hispark_pegasus/wifiiot_hispark_pegasus/error.log

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/SConstruct' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/SConstruct'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/app/demo/app.json' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/app/demo/app.json'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/boot/flashboot/Makefile' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/boot/flashboot/Makefile'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/boot/flashboot/SConscript' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/boot/flashboot/SConscript'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/boot/loaderboot/SConscript' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/boot/loaderboot/SConscript'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/build/make_scripts/config.mk' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/make_scripts/config.mk'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/build/scripts/scons_env_cfg.py' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/scripts/scons_env_cfg.py'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/build/scripts/scons_utils.py' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/scripts/scons_utils.py'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/build_patch.sh' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build_patch.sh'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/tools/lzma_tool/lzma_tool.exe' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/tools/lzma_tool/lzma_tool.exe'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/tools/nvtool/build_nv.py' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/tools/nvtool/build_nv.py'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/tools/nvtool/tools/nv/cdbm.exe' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/tools/nvtool/tools/nv/cdbm.exe'

[OHOS ERROR] `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/build/win_scripts/tools/sign_tool/sign_tool.exe' -> `/d/home/OpenHarmanyOS/code/device/hisilicon/hispark_pegasus/sdk_liteos/tools/sign_tool/sign_tool.exe'

[OHOS ERROR]

[OHOS ERROR]

[OHOS ERROR] scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly

[OHOS ERROR]

[OHOS ERROR] File "D:\home\OpenHarmanyOS\code\device\hisilicon\hispark_pegasus\sdk_liteos\SConstruct", line 21, in <module>

[OHOS ERROR]

[OHOS ERROR] execute ota_builder with python...

[OHOS ERROR]

[OHOS ERROR]

[OHOS ERROR]

[OHOS ERROR] scons: warning: Calling missing SConscript without error is deprecated.

[OHOS ERROR] 

[OHOS ERROR] Transition by adding must_exist=0 to SConscript calls.

[OHOS ERROR]

[OHOS ERROR] Missing SConscript 'build\build_tmp\objs\flashboot\third_party\u-boot-v2019.07\u-boot-v2019.07\lib\SConscript'

[OHOS ERROR]

[OHOS ERROR] File "D:\home\OpenHarmanyOS\code\device\hisilicon\hispark_pegasus\sdk_liteos\boot\flashboot\SConscript", line 107, in <module>

[OHOS ERROR]

[OHOS ERROR] TypeError: 'NoneType' object is not iterable:

[OHOS ERROR]

[OHOS ERROR]   File "D:\home\OpenHarmanyOS\code\device\hisilicon\hispark_pegasus\sdk_liteos\SConstruct", line 211:

[OHOS ERROR]

[OHOS ERROR]     flash_boot_bin = env.SConscript(os.path.join('boot', 'flashboot', 'SConscript'), {'env':env, 'env_cfg':env_cfg, 'module':'boot'}, duplicate=0)

[OHOS ERROR] 

[OHOS ERROR]   File "C:\Users\wangsai\.deveco-device-tool\core\tool_scons\script\..\engine\SCons\Script\SConscript.py", line 597:

[OHOS ERROR]

[OHOS ERROR]     return _SConscript(self.fs, *files, **subst_kw)

[OHOS ERROR]

[OHOS ERROR]   File "C:\Users\wangsai\.deveco-device-tool\core\tool_scons\script\..\engine\SCons\Script\SConscript.py", line 286:

[OHOS ERROR]

[OHOS ERROR]     exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)

[OHOS ERROR]

[OHOS ERROR]   File "D:\home\OpenHarmanyOS\code\device\hisilicon\hispark_pegasus\sdk_liteos\boot\flashboot\SConscript", line 107:

[OHOS ERROR]

[OHOS ERROR]     objs += env.SConscript(os.path.join(src, 'SConscript'), {'env':env,}, variant_dir = os.path.join('#', obj_path, "flashboot", path), duplicate=0)

[OHOS ERROR]

[OHOS ERROR]   File "D:\ProgramData\Python\Python38\lib\collections\__init__.py", line 1102:

[OHOS ERROR]

[OHOS ERROR]     self.data += list(other)

[OHOS ERROR]

[OHOS ERROR] you can check build log in D:\home\OpenHarmanyOS\code\out\hispark_pegasus\wifiiot_hispark_pegasus\build.log

[OHOS ERROR] command: "D:\home\OpenHarmanyOS\tools\ninja-win\ninja.exe -w dupbuild=warn -C D:\home\OpenHarmanyOS\code\out\hispark_pegasus\wifiiot_hispark_pegasus" failed

[OHOS ERROR] return code: 1

[OHOS ERROR] execution path: D:\home\OpenHarmanyOS\code

*** [out\hispark_pegasus\wifiiot_hispark_pegasus\Hi3861_wifiiot_app.out] Error -1

=========== [FAILED] Took 115.63 seconds ===========

The terminal process "c:\users\wangsai\.deveco-device-tool\core\deveco-venv\scripts\hos.exe 'run', '--project-dir', 'D:\home\OpenHarmanyOS\code', '--environment', 'hi3861'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

 

回答:

该问题是因为文件找不到,文件路径是:device\hisilicon\hispark_pegasus\sdk_liteos\third_party\u-boot-v2019.07\u-boot-v2019.07\lib\目录下的SConscript。建议重新下载解压一次,使用Windows自带的解压工具就好,过程中可能会有报错,但是可以忽略。

 

说明:

经确认,确实没有SConscript这个文件:

因没有SConscript文件使用DevEco Studio编译Hi3861报错

因没有SConscript文件使用DevEco Studio编译Hi3861报错

尝试重新下载解压,也是没有这个文件,然后使用tar命令解压也没有这个文件,再使用360的压缩工具进去看也没有这个文件。

对于此情况,发表出来供有同样的网友参考。

关于平台上的选择,可参考“Hi3861开发板支持Linux还是Windows烧录,还是两个平台都支持”一文。

精选文章
热门文章