make Making all in src make[1]: Entering directory '/home/GPU_Project/ARM-Mali-G72/Software_packet/DDK-Compile_Tool/lib_file/libxcb-1.7/src' /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/xproto.xml Failed to load the xcbgen Python package! Make sure that xcb/proto installed it on your Python path. If not, you will need to create a .pth file or define $PYTHONPATH to extend the path. Refer to the README file in xcb/proto for more info. Traceback (most recent call last): File "./c_client.py", line 1027, in <module> from xcbgen.state import Module ImportError: No module named xcbgen.state make[1]: *** [Makefile:1018: xproto.c] Error 1 make[1]: Leaving directory '/home/GPU_Project/ARM-Mali-G72/Software_packet/DDK-Compile_Tool/lib_file/libxcb-1.7/src' make: *** [Makefile:450: all-recursive] Error 1
时间: 2023-08-06 11:07:43 浏览: 142
这个错误提示是由于在编译过程中缺少 `xcbgen` 模块,你需要安装该模块。
可以尝试使用以下命令安装 `xcb-proto` 包:
```
sudo apt-get install xcb-proto
```
如果你已经安装了 `xcb-proto` 包但是仍然出现该错误,可能是因为 `xcbgen` 模块没有正确安装。你可以尝试运行以下命令:
```
sudo pip install xcffib
```
如果 `pip` 命令不存在,你可以先安装 `pip`:
```
sudo apt-get install python-pip
```
如果以上方法无法解决问题,你可以参考 `README` 文件中的说明解决该问题。
相关问题
make Making all in src make[1]: Entering directory '/home/GPU_Project/ARM-Mali-G72/Software_packet/DDK-Compile_Tool/lib_file/libxcb-1.7/src' /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/xinput.xml Failed to load the xcbgen Python package! Make sure that xcb/proto installed it on your Python path. If not, you will need to create a .pth file or define $PYTHONPATH to extend the path. Refer to the README file in xcb/proto for more info. Traceback (most recent call last): File "./c_client.py", line 1027, in <module> from xcbgen.state import Module ImportError: No module named xcbgen.state make[1]: *** [Makefile:1018: xinput.c] Error 1 make[1]: Leaving directory '/home/GPU_Project/ARM-Mali-G72/Software_packet/DDK-Compile_Tool/lib_file/libxcb-1.7/src' make: *** [Makefile:450: all-recursive] Error 1 root@asu:/home/GPU_Project/ARM-Mali-G72/Software_packet/DDK-Compile_Tool/lib_file/libxcb-1.7# make Making all in src make[1]: Entering directory '/home/GPU_Project/ARM-Mali-G72/Software_packet/DDK-Compile_Tool/lib_file/libxcb-1.7/src' /usr/bin/python ./c_client.py -p //usr/lib/python3.8/site-packages //usr/share/xcb/xinput.xml File "./c_client.py", line 1016 except getopt.GetoptError, err: ^ SyntaxError: invalid syntax make[1]: *** [Makefile:1018: xinput.c] Error 1 make[1]: Leaving directory '/home/GPU_Project/ARM-Mali-G72/Software_packet/DDK-Compile_Tool/lib_file/libxcb-1.7/src' make: *** [Makefile:450: all-recursive] Error 1
这是一个编译错误,看起来是缺少了一个 Python 模块。错误信息中提到了 `xcbgen` 模块,你可以尝试安装这个模块来解决问题。
你可以通过 pip 命令来安装 xcbgen:
```
pip install xcbgen
```
如果你没有安装 pip,可以通过以下命令安装:
```
sudo apt-get install python-pip
```
另外,还有一个语法错误,是因为 Python 2.x 和 Python 3.x 在异常处理上有些不同。你可以将 `except getopt.GetoptError, err:` 改为 `except getopt.GetoptError as err:` 来解决这个问题。
make[2]: Entering directory '/home/test/GPU_Project/ARM-Mali-G72/Software_packet/DDK-Compile_Tool/lib_file/libdrm-2.4.36/libkms' CC linux.lo linux.c: In function 'linux_name_from_sysfs': linux.c:76:2: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration] maj = major(buffer.st_rdev); ^ linux.c:76:2: warning: nested extern declaration of 'major' [-Wnested-externs] linux.c:77:2: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration] min = minor(buffer.st_rdev); ^ linux.c:77:2: warning: nested extern declaration of 'minor' [-Wnested-externs] cc1: some warnings being treated as errors make[2]: *** [Makefile:409: linux.lo] Error 1 make[2]: Leaving directory '/home/test/GPU_Project/ARM-Mali-G72/Software_packet/DDK-Compile_Tool/lib_file/libdrm-2.4.36/libkms' make[1]: *** [Makefile:612: all-recursive] Error 1 make[1]: Leaving directory '/home/test/GPU_Project/ARM-Mali-G72/Software_packet/DDK-Compile_Tool/lib_file/libdrm-2.4.36' make: *** [Makefile:394: all] Error 2
这个错误是因为在 linux.c 文件中使用了 major 和 minor 函数,但是编译器无法找到它们的声明。可以尝试在文件开头添加如下代码:
```
#include <sys/sysmacros.h>
```
这个头文件包含了 major 和 minor 函数的声明。如果还是无法解决问题,可能需要检查是否有其他头文件缺失或者链接库没有正确链接。
阅读全文