1 Star 0 Fork 4.9K

fish / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
compilation-and-building-faq.md 2.81 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-04-08 16:33 . fixed bugs

Compilation and Building FAQ

Invalid -- w option

  • Problem

    The compilation fails, and usr/sbin/ninja: invalid option -- w is displayed.

  • Cause

    The Ninja version in the compilation environment is outdated and does not support the --w option.

  • Solution

    Uninstall Ninja and GN and follow the instructions provided in Acquiring Tools to obtain the provided compilation toolchain.

Ncurses library not found

  • Problem

    The compilation fails, and /usr/bin/ld: cannot find -lncurses is displayed.

  • Cause

    The ncurses library is not installed.

  • Solution

    sudo apt-get install lib32ncurses5-dev

Mcopy not found

  • Problem

    The compilation fails, and line 77: mcopy: command not found is displayed.

  • Cause

    Mcopy is not installed.

  • Solution

    ​sudo apt-get install dosfstools mtools

No riscv file or directory

  • Problem

    The compilation fails, and the following information is displayed: riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory.

  • Cause

    Permission is required to access files in the riscv compiler path.

  • Solution

    1. Run the following command to query the directory where gcc_riscv32 is located:

      which riscv32-unknown-elf-gcc
    2. Run the chmod command to change the directory permission to 755.

No Crypto

  • Problem

    The compilation fails, and No module named'Crypto loaded is displayed.

  • Cause

    Crypto is not installed in Python 3.

  • Solution

    1. Run the following command to query the Python version:

      python3 --version
    2. Ensure that Python 3.7 or later is installed, and then run the following command to install pycryptodome:

      sudo pip3 install pycryptodome

Unexpected operator

  • Problem

    The compilation fails, and xx.sh [: xx unexpected operator is displayed.

  • Cause

    The compilation environment is shell instead of bash.

  • Solution

    sudo rm -rf /bin/sh
    sudo ln -s /bin/bash /bin/sh
1
https://gitee.com/fish_neil/docs.git
git@gitee.com:fish_neil/docs.git
fish_neil
docs
docs
master

搜索帮助