xr806鸿蒙代码编译出错
-
[OHOS INFO] hb root path: /home/nihui/osd/xr806 OHOS Which product do you need? wifi_skylark [OHOS INFO] ERROR at //device/xradio/xr806/liteos_m/config.gni:14:1: Unable to load "/home/nihui/osd/xr806/device/xradio/xr806/liteos_m/SDKconfig.gni". [OHOS INFO] import("//device/xradio/xr806/liteos_m/SDKconfig.gni") [OHOS INFO] ^---------------------------------------------------- [OHOS INFO] See //build/lite/config/BUILDCONFIG.gn:14:1: whence it was imported. [OHOS INFO] import("${device_path}/config.gni") [OHOS INFO] ^--------------------------------- [OHOS ERROR] you can check build log in /home/nihui/osd/xr806/out/xr806/wifi_skylark/build.log [OHOS ERROR] command: "/home/nihui/osd/xr806/prebuilts/build-tools/linux-x86/bin/gn gen /home/nihui/osd/xr806/out/xr806/wifi_skylark --root=/home/nihui/osd/xr806 --dotfile=/home/nihui/osd/xr806/build/lite/.gn --script-executable=/usr/bin/python3 --args=ohos_build_compiler_specified="gcc" product_path="/home/nihui/osd/xr806/vendor/xradio/xr806" device_path="/home/nihui/osd/xr806/device/xradio/xr806/liteos_m" ohos_kernel_type="liteos_m" enable_ohos_kernel_liteos_m_fs = false enable_ohos_kernel_liteos_m_cppsupport = false disable_huks_binary = false disable_authenticate = false ohos_build_type="debug" ohos_build_time="1639157835366" ohos_build_datetime="2021-12-11 09:37:15" ohos_full_compile=true" failed [OHOS ERROR] return code: 1 [OHOS ERROR] execution path: /home/nihui/osd/xr806
看起来是缺少device/xradio/xr806/liteos_m/SDKconfig.gni,怎么办呢?
-
@nihui 这个文件是动态文件,需要按步骤现在device/xradio/xr_skylark/xr806文件夹下,执行一下make lib -j后,返回根目录再执行一下hb build -f
-
@salt_fish 看了下 device/xradio/xr806/xr_skylark/config.py,感觉里面有bug
#!/usr/bin/python # -*- coding: UTF-8 -*- import os pwd = os.path.dirname (__file__) f = open('.{0}/.config'.format(pwd),'r') DATA = ['#XR806 config'] for line in f.readlines(): if line[0] != '#' and line[0] != '\n': line = line.strip('\n') DATA.append(line) GNf = open('.{0}/../liteos_m/SDKconfig.gni'.format(pwd),'w')
Traceback (most recent call last): File "/home/nihui/osd/xr806/device/xradio/xr806/xr_skylark/config.py", line 34, in <module> f = open('.{0}/.config'.format(pwd),'r') FileNotFoundError: [Errno 2] No such file or directory: './home/nihui/osd/xr806/device/xradio/xr806/xr_skylark/.config' make: *** [Makefile:125:menuconfig] 错误 1 Traceback (most recent call last): File "/home/nihui/osd/xr806/device/xradio/xr806/xr_skylark/config.py", line 34, in <module> f = open('.{0}/.config'.format(pwd),'r') FileNotFoundError: [Errno 2] No such file or directory: './home/nihui/osd/xr806/device/xradio/xr806/xr_skylark/.config'
打开文件的路径前面有个点,导致打开失败,无法写入 SDKconfig.gni
-
@nihui 是的,这里是个bug,应该改成相对路径。
-
@i_a_student 在 xr806鸿蒙代码编译出错 中说:
@nihui 是的,这里是个bug,应该改成相对路径。
我也出现了这个问题,这个问题在新的代码已经修复掉了吗?
我本地要怎么修改才能编译通过呢?
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号