南京网站建设要多少钱,wordpress挖,上海电商公司排名,石嘴山网站建设公司海思嵌入式开发-005-OpenHarmony源码编译问题一、问题描述二、解决方案2.1解决原理2.2获取OpenHarmony 3.1.1 Release源码2.3最后解决问题#xff0c;编译成功。一、问题描述
按照链接拉取master源码#xff0c;出现如下问题#xff0c;打开build.log文件 提示相应位置的文…
海思嵌入式开发-005-OpenHarmony源码编译问题一、问题描述二、解决方案2.1解决原理2.2获取OpenHarmony 3.1.1 Release源码2.3最后解决问题编译成功。一、问题描述
按照链接拉取master源码出现如下问题打开build.log文件 提示相应位置的文件没找到。
The target_cpu needs to be specified, default target_cpuarm
[OHOS INFO] Set cache size limit to 100.0 GB
[OHOS INFO] root_out_dir//out/hispark_pegasus/wifiiot_hispark_pegasus
[OHOS INFO] root_build_dir//out/hispark_pegasus/wifiiot_hispark_pegasus
[OHOS INFO] root_gen_dir//out/hispark_pegasus/wifiiot_hispark_pegasus/gen
[OHOS INFO] current_toolchain//build/lite/toolchain:riscv32-unknown-elf
[OHOS INFO] host_toolchain//build/toolchain/linux:clang_x64
[OHOS INFO] build configs generation is complete.
[OHOS INFO] ERROR at //build/core/gn/BUILD.gn:54:14: Unable to load /home/matata/OpenHarmony_master/out/hispark_pegasus/wifiiot_hispark_pegasus/build_configs/BUILD.gn.
[OHOS INFO] deps [ $root_build_dir/build_configs:inner_kits ]
[OHOS INFO] ^-----------------------------------------
[OHOS INFO] ---------------------------------------------
[OHOS INFO] ccache summary:
[OHOS INFO] cache hit (direct) : 0
[OHOS INFO] cache hit (preprocessed) : 0
[OHOS INFO] cache miss : 0
[OHOS INFO] hit rate: 0.00%
[OHOS INFO] mis rate: 0.00%
[OHOS INFO] ---------------------------------------------
[OHOS INFO] file: /home/matata/OpenHarmony_master/out/hispark_pegasus/wifiiot_hispark_pegasus/.ninja_log not exists
[OHOS INFO] parse file fail
[OHOS ERROR] Please check build log in /home/matata/OpenHarmony_master/out/hispark_pegasus/wifiiot_hispark_pegasus/build.log
scons: *** [out/hispark_pegasus/wifiiot_hispark_pegasus/Hi3861_wifiiot_app.out] Error -1please check the compilation log: /home/matata/.deveco-device-tool/logs/build/build.log后面看技术交流群的群友也有类似的问题
二、解决方案
2.1解决原理
因为OpenHarmony源码有Master分支即主干分支里面包含最新发布的代码有很多功能特性都在开发、完善、测试中而且每天都会有非常多的提交因此代码可能不稳定。Master分支比较适合新功能的尝鲜体验或者日常开发以及Release分支即发布分支或LTs分支是waster分支的子集里面的代码可能会滞后Master分支多个版本。基本上是Master分支上开发完善、经过测试确认稳定之后的功能特性才会同步到Release分支上以供商业产品使用。目前Release分支已有多个版本商业公司可根据自己项目的需要选择合适的版本。
主要是目前master分支有这个问题所以需要切换到release分支。
OpenHarmony源码下载地址https://www.openharmony.cn/download OpenHarmony发布版本获取源码方式OpenHarmony Release Notes
2.2获取OpenHarmony 3.1.1 Release源码
步骤1注册码云gitee账号。步骤2在Ubuntu的用户目录下分步执行下面的命令安装git客户端和git-lfs并配置用户信息。
sudo apt install git git-lfs curl -y
git config --global user.name yourname # 你自己gitee的用户名
git config --global user.email your-email-address # 你自己gitee绑定的邮箱地址
git config --global credential.helper store步骤3在Ubuntu的用户目录下分步执行下面的命安装码云repo工具
curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 repo
sudo cp repo /usr/local/bin/repo
sudo chmod ax /usr/local/bin/repo
pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests步骤4分步执行下面的命令配置python3环境
cd /usr/bin
sudo ln -s /usr/bin/python3.8 python步骤5执行下面的命令通过repo https下载OpenHarmony主干代码
cd ~
mkdir OpenHarmony_master
cd OpenHarmony_master
repo init -u https://gitee.com/openharmony/manifest.git -b refs/tags/OpenHarmony-v3.1.1-Release --no-repo-verify
repo sync -c
repo forall -c git lfs pull
repo forall -c git checkout -b weekly_20220419
bash build/prebuilts_download.sh2.3最后解决问题编译成功。