Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    xr806鸿蒙代码编译出错

    XR系列-无线互联
    4
    5
    386
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nihui
      nihui LV 6 last edited by

      [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,怎么办呢?

      S 1 Reply Last reply Reply Quote Share 0
      • S
        salt_fish LV 3 @nihui last edited by

        @nihui 这个文件是动态文件,需要按步骤现在device/xradio/xr_skylark/xr806文件夹下,执行一下make lib -j后,返回根目录再执行一下hb build -f

        nihui 1 Reply Last reply Reply Quote Share 0
        • nihui
          nihui LV 6 @salt_fish last edited by

          @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

          I 1 Reply Last reply Reply Quote Share 0
          • I
            I_A_student LV 4 @nihui last edited by

            @nihui 是的,这里是个bug,应该改成相对路径。

            M 1 Reply Last reply Reply Quote Share 0
            • M
              mysteryli LV 5 @I_A_student last edited by

              @i_a_student 在 xr806鸿蒙代码编译出错 中说:

              @nihui 是的,这里是个bug,应该改成相对路径。

              我也出现了这个问题,这个问题在新的代码已经修复掉了吗?
              我本地要怎么修改才能编译通过呢?

              1 Reply Last reply Reply Quote Share 0
              • 1 / 1
              • First post
                Last post

              Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

              行为准则 | 用户协议 | 隐私权政策