报以下错误时, 在configure配置中添加:
ac_cv_file__dev_ptmx=no \
ac_cv_file__dev_ptc=no \
--disable-ipv6 \
二:修改
Python-2.7.9\Include\pyport.h 文件中
#ifdef HAVE_LONG_LONG
# ifndef PY_FORMAT_LONG_LONG
# if defined(MS_WIN64) || defined(MS_WINDOWS)
# define PY_FORMAT_LONG_LONG "I64"
# else
# define PY_FORMAT_LONG_LONG "ll"
# endif
# endif
#endif
三:
pgen错误
在Python-2.7.9\Include\graminit.h文件中 添加#include<stdio.h>
四:
报undefined _pyparser_grammar错误
经过长时间研究才发现是没有编译到对应的.o文件,且第一次编译跳过, 随后编译中build里有相关备份,也会导致不会去编译, 需要手动删除build目录, 在进行编译一次
五: 编译已经完成后发现少了一个 python-config文件,查找后发现Misc目录下有一个python-config.sh.in文件,可以看到也有一个python.in 文件, 后面也生成了Python执行文件, 所以肯定是在这块进行修改, 再去查看configure生成Makefile的log打印,
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Modules/Setup.config
config.status: creating Misc/python.pc
config.status: creating Modules/ld_so_aix
config.status: creating pyconfig.h
后面经过排查后才发现需要重新配置。.configure环境 执行autoreconf -ivf