• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# FAQs
2
3## Common Build Problems and Solutions
4
5###  "usr/sbin/ninja: invalid option -- w"
6
7- **Symptom**
8
9  The build fails, and **usr/sbin/ninja: invalid option -- w** is displayed.
10
11- **Possible Causes**
12
13  The Ninja version in use does not support the **--w** option.
14
15- **Solution**
16
17  Uninstall Ninja and GN, and [install Ninja and GN of the required version](../../device-dev/get-code/gettools-ide.md).
18
19### "/usr/bin/ld: cannot find -lncurses"
20
21- **Symptom**
22
23  The build fails, and **/usr/bin/ld: cannot find -lncurses** is displayed.
24
25- **Possible Causes**
26
27  The ncurses library is not installed.
28
29- **Solution**
30
31  ```shell
32  sudo apt-get install lib32ncurses5-dev
33  ```
34
35### "line 77: mcopy: command not found"
36
37- **Symptom**
38
39  The build fails, and **line 77: mcopy: command not found** is displayed.
40
41- **Possible Causes**
42
43  mcopy is not installed.
44
45- **Solution**
46
47  ```shell
48  sudo apt-get install dosfstools mtools
49  ```
50
51### "riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory"
52
53- **Symptom**
54
55  The build fails, and the following information is displayed: <br>**riscv32-unknown-elf-gcc: error trying to exec 'cc1': execvp: No such file or directory**
56
57- **Possible Causes**
58
59   You do not have the permission to access files in the RISC-V compiler directory.
60
61- **Solution**
62
63  1. Run the following command to locate **gcc_riscv32**:
64
65     ```shell
66     which riscv32-unknown-elf-gcc
67     ```
68
69
70
71  2. Run the **chmod** command to change the directory permission to **755**.
72
73
74
75### "No module named 'Crypto'"
76
77- **Symptom**
78
79  The build fails, and **No module named 'Crypto'** is displayed.
80
81- **Possible Causes**
82
83   Crypto is not installed in Python3.
84
85- **Solution**
86
87  1. Run the following command to query the Python version:
88
89     ```shell
90     python3 --version
91     ```
92
93  2. Ensure that Python 3.9.2 or later is installed, and then run the following command to install PyCryptodome:
94
95     ```shell
96     sudo pip3 install pycryptodome
97     ```
98
99### "xx.sh : xx unexpected operator"
100
101- **Symptom**
102
103  The build fails, and **xx.sh [: xx unexpected operator** is displayed.
104
105- **Possible Causes**
106
107  The build environment shell is not bash.
108
109- **Solution**
110
111  ```shell
112  sudo rm -rf /bin/sh
113  sudo ln -s /bin/bash /bin/sh
114  ```
115
116
117### "some services are not authenticated. Listed as follows"
118
119- **Symptom**
120
121  The build fails, and "some services are not authenticated. Listed as follows" is displayed.
122
123- **Possible Causes**
124
125  For the processes listed in the error information, the UID is set to **root** or **system** in the process configuration files. However, these processes are not high-privilege processes defined by the product.
126
127- **Solution**
128
129  Modify the process configuration file to reduce the privilege level. Do not set **UID** to **root** or **system** unless necessary.
130
131  If a process must have the **root** or **system** privilege due to service requirements, modify the **high_privilege_process_list.json** file with the approval of security experts. The **high_privilege_process_list.json** file is located in **vendor/**{*company_name*}/{*product_name*}**/security_config**. For example, the file for rk3586 is **//vendor/hihope/rk3568/security_config/high_privilege_process_list.json**.
132
133
134