编译最新版本的Python 3.8时,UUID模块出现以下错误:
/home/centos/Python-3.8.0/Modules/_uuidmodule.c: In function ‘py_uuid_generate_time_safe’:
/home/centos/Python-3.8.0/Modules/_uuidmodule.c:19:5: error: unknown type name ‘uuid_t’
uuid_t uuid;
^
/home/centos/Python-3.8.0/Modules/_uuidmodule.c:36:5: error: implicit declaration of function ‘uuid_generate_time’ [-Werror=implicit-function-declaration]
uuid_generate_time(uuid);
^
/home/centos/Python-3.8.0/Modules/_uuidmodule.c:37:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return Py_BuildValue("y#O", (const char *) uuid, sizeof(uuid), Py_None);
^
cc1: some warnings being treated as errors
我已安装所有相关的包,没有遇到任何问题。
.configure
命令以创建正确的makefile,然后使用make
命令,该错误将不复存在。 - Herve Meftahuuid-dev
之后重新运行./configure
对我也很有帮助。 - Sergei