求助OpenHarmony 4.0 release 编译报错4000

martinhu 显示全部楼层 发表于 2023-11-22 08:22:32

本帖最后由 martinhu 于 2023-11-22 09:09 编辑

本帖最后由 martinhu 于 2023-11-22 08:39 编辑

求助OpenHarmony 4.0 release 编译报错 4000

  1. 介绍问题现象和发生的背景 从4.0 Beta2更新至4.0 release发现编译报错,通常error code为4000,有时3000,偶尔0000;

  2. 编译环境配置、代码下拉、编译 参考 https://forums.openharmony.cn/forum.php?mod=viewthread&tid=897&extra=page%3D1

    1、sudo dpkg-reconfigure dash #选择No
    2、替换Ubuntu软件源,在“https://mirrors.ustc.edu.cn/repogen/”下载20.04版本最新的源。
    更新/etc/apt/sources.list
    3、安装必要的库和工具
    sudo apt-get install binutils binutils-dev git git-lfs gnupg flex bison gperf build-essential zip curl zlib1g-dev   libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip m4 bc gnutls-bin python3.8 python3-pip ruby genext2fs device-tree-compiler make libffi-dev e2fsprogs pkg-config perl openssl libssl-dev libelf-dev libdwarf-dev u-boot-tools mtd-utils cpio doxygen liblz4-tool openjdk-8-jre gcc g++ texinfo dosfstools mtools default-jre default-jdk libncurses5 apt-utils wget scons python3.8-distutils tar rsync git-core libxml2-dev lib32z-dev grsync xxd libglib2.0-dev libpixman-1-dev kmod jfsutils reiserfsprogs xfsprogs squashfs-tools pcmciautils quota ppp libtinfo-dev libtinfo5 libncurses5-dev libncursesw5 libstdc++6 gcc-arm-none-eabi vim ssh locales libxinerama-dev libxcursor-dev libxrandr-dev libxi-dev
    sudo apt-get install gcc-arm-linux-gnueabi gcc-9-arm-linux-gnueabi
    
    4、配置Python
    sudo update-alternatives --install ~/bin/python python /usr/bin/python3.8 1
    sudo update-alternatives --install ~/bin/python3 python3 /usr/bin/python3.8 1
    python --version
    
    sudo apt install python3-pip
    mkdir ~/.pip
    pip3 config set global.index-url https://mirrors.huaweicloud.com/repository/pypi/simple
    pip3 config set global.trusted-host mirrors.huaweicloud.com
    pip3 config set global.timeout 120
    
    5、安装和配置git ,repo
    sudo apt install git-lfs
    wget https://gitee.com/oschina/repo/raw/fork_flow/repo-py3
    sudo mv repo-py3 /usr/local/bin/repo
    sudo chmod a+x /usr/local/bin/repo
    pip3 install -i https://repo.huaweicloud.com/repository/pypi/simple requests
    git config --global user.email "xxx"
    git config --global user.name "xxx"
    git config --global credential.helper store
    git config --global --add safe.directory "*"
    
    6.0 拉取代码及编译   
    mkdir OpenHarmony_4.0_release_tag && cd OpenHarmony_4.0_release_tag
    repo init -u https://gitee.com/openharmony/manifest -b OpenHarmony-4.0-Release --no-repo-verify
    repo sync -c
    repo forall -c "git lfs pull"
    bash build/prebuilts_download.sh
    ./build.sh -p rk3568
  3. 运行结果、错误截图 image.png image.png 完整编译log https://www.alipan.com/s/s818cV5d6sQ

  4. 我尝试过的解决方法和结果 翻阅laval社区和本论坛,build和docs仓下不少编译报错问题,大多是在虚拟机中遇到的编译问题,总体而言由于代码未拉完整或虚拟机内存不够导致,我的环境为linux编译服务器,应该与内存关系不大,release和master代码重新拉过几次,基本都会编译报4000。 尝试结果: 1、个人电脑wsl2 编译OK。 2、同事电脑wsl2编译OK,重新编译fail ,4000 3、使用linux编译服务器,偶然一次编译通过,后续编译仍报错。 4、使用3.2 drivers\hdf_core\framework\core\adapter\vnode\src\hdf_vnode_adapter.c替换4.0文件,能编译通过,但烧录后无法开机。

  5. 猜想 1、可能编译环境配置有关 2、可能与编译环境使用内网有关

【运行环境】

硬件:ubuntu 20.04 128GB内存 64核 ROM版本:OpenHarmony 4.0 release

您尚未登录,无法参与评论,登录后可以:
参与开源共建问题交流
认同或收藏高质量问答
获取积分成为开源共建先驱

精彩评论5

martinhu

沙发 发表于 2023-11-22 08:51:41

留意到build.log中有不少符号error,不知道有没有影响 /home/xxx/OHOS/OpenHarmony_4.0_release_tag/out/rk3568/obj/third_party/jsframework/runtime/main/page/entry/init.ts 144:73 error Missing semicolon semi

✖ 1 problem (1 error, 0 warnings) 1 error and 0 warnings potentially fixable with the --fix option.

/home/xxx/OHOS/OpenHarmony_4.0_release_tag/out/rk3568/obj/third_party/jsframework/runtime/src/index.ts 1:15 error Strings must use singlequote quotes 2:36 error Strings must use singlequote quotes 3:27 error Strings must use singlequote quotes

✖ 3 problems (3 errors, 0 warnings) 3 errors and 0 warnings potentially fixable with the --fix option.

martinhu

板凳 发表于 2023-11-22 09:09:53

build.log也存在error: write on a pipe with no reader

dragon

来自手机 地板 发表于 2023-11-23 10:43:03
重点关注拉代码的时候有没有警告或错误

martinhu

5# 发表于 2023-11-23 11:49:16

清除out后使用sudo编译通过

dragon

发表于 2023-11-23 23:58  IP属地: 河北省廊坊市

回复 martinhu: 感谢反馈成功经验!

【1 条回复】

Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部