gpt4 book ai didi

python - 无法从源代码 : recipe for target 'Programs/python.o' failed 安装 python 3.6.3

转载 作者:太空宇宙 更新时间:2023-11-04 12:17:39 26 4
gpt4 key购买 nike

我运行 Linux mint 18.2,./configure 工作正常,但是当我执行 make 时,我得到以下信息:

gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers   -I. -I./Include    -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c
In file included from ./Include/pyport.h:6:0,
from ./Include/Python.h:50,
from ./Programs/python.c:3:
/usr/local/include/inttypes.h:38:2: error: #error "Use this header only with Microsoft Visual C++ compilers!"
#error "Use this header only with Microsoft Visual C++ compilers!"
^
In file included from /usr/local/include/inttypes.h:48:0,
from ./Include/pyport.h:6,
from ./Include/Python.h:50,
from ./Programs/python.c:3:
/usr/local/include/stdint.h:38:2: error: #error "Use this header only with Microsoft Visual C++ compilers!"
#error "Use this header only with Microsoft Visual C++ compilers!"
^
In file included from /usr/local/include/inttypes.h:48:0,
from ./Include/pyport.h:6,
from ./Include/Python.h:50,
from ./Programs/python.c:3:
/usr/local/include/stdint.h:135:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int64_t’
typedef signed __int64 int64_t;
^
/usr/local/include/stdint.h:136:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uint64_t’
typedef unsigned __int64 uint64_t;
^
/usr/local/include/stdint.h:147:9: error: unknown type name ‘uint64_t’
typedef uint64_t uint_least64_t;
^
/usr/local/include/stdint.h:157:9: error: unknown type name ‘uint64_t’
typedef uint64_t uint_fast64_t;
^
/usr/local/include/stdint.h:164:30: error: conflicting types for ‘intptr_t’
typedef _W64 signed int intptr_t;
^
In file included from ./Include/Python.h:36:0,
from ./Programs/python.c:3:
/usr/include/unistd.h:270:20: note: previous declaration of ‘intptr_t’ was here
typedef __intptr_t intptr_t;
^
In file included from /usr/local/include/inttypes.h:48:0,
from ./Include/pyport.h:6,
from ./Include/Python.h:50,
from ./Programs/python.c:3:
/usr/local/include/stdint.h:170:9: error: unknown type name ‘uint64_t’
typedef uint64_t uintmax_t;
^
In file included from ./Include/pyport.h:6:0,
from ./Include/Python.h:50,
from ./Programs/python.c:3:
/usr/local/include/inttypes.h:288:1: error: unknown type name ‘_inline’
_inline
^
/usr/local/include/inttypes.h:290:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__cdecl’
imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
^
/usr/local/include/inttypes.h:290:11: error: unknown type name ‘__cdecl’
In file included from ./Include/Python.h:71:0,
from ./Programs/python.c:3:
./Include/pyhash.h:64:9: error: unknown type name ‘uint64_t’
uint64_t k0;
^
./Include/pyhash.h:65:9: error: unknown type name ‘uint64_t’
uint64_t k1;
^
In file included from ./Include/Python.h:79:0,
from ./Programs/python.c:3:
./Include/longintrepr.h:47:9: error: unknown type name ‘uint64_t’
typedef uint64_t twodigits;
^
In file included from ./Include/Python.h:87:0,
from ./Programs/python.c:3:
./Include/dictobject.h:31:5: error: unknown type name ‘uint64_t’
uint64_t ma_version_tag;
^
Makefile:750: recipe for target 'Programs/python.o' failed
make: *** [Programs/python.o] Error 1

我已经在同一台机器上成功构建了以前版本的 python,不知道这个有什么问题,谢谢,

最佳答案

这不是 Python 问题。出于某种原因,你最终得到了 Windows include files for integer definitions 的副本。 :

/usr/local/include/inttypes.h:38:2: error: #error "Use this header only with Microsoft Visual C++ compilers!"
#error "Use this header only with Microsoft Visual C++ compilers!"
^

/usr/local/include/stdint.h:38:2: error: #error "Use this header only with Microsoft Visual C++ compilers!"
#error "Use this header only with Microsoft Visual C++ compilers!"
^

其他一切都源于这两个错误。清理您的系统,那些包含文件不应该存在于标准位置。

我看过各种项目的报告,包括源代码存储库中的那些 header ,人们将这些大量复制到标准位置。参见 How do I use C headers from libgit2 without getting this error? (当您将所有内容从 include/git2 复制到/usr/include 时)和 #error "Use this header only with Microsoft Visual C++ compilers" in CodeBlocks .不管它们最终出现在您的系统上,它们不属于那里。

关于python - 无法从源代码 : recipe for target 'Programs/python.o' failed 安装 python 3.6.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46971088/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com