python - 没有规则来制作目标“libpython2.6.a”
问题描述
我正在尝试从其源代码编译Python2.6,并采取以下步骤,并遇到错误消息:
./configure
...
[root@KuGouIdc Python-2.6.6]# ls
config.log Demo Makefile.pre Objects Python
config.status Doc Makefile.pre.in Parser README
configure Grammar Makefile.pre.in.cflags PC RISCOS
configure.in Include Makefile.pre.in.fix-parallel-make PCbuild setup.py
configure.in.check-for-XML_SetHashSalt install-sh Makefile.pre.in.lib64 pyconfig.h setup.py.add-RPATH-to-pyexpat
configure.in.disable-pymalloc-on-valgrind Lib Makefile.pre.in.no-static-lib pyconfig.h.in setup.py.expat
configure.in.expat LICENSE Makefile.pre.in.systemtap pyconfig.h.in.disable-pymalloc-on-valgrind setup.py.lib64
configure.in.rpath Mac Misc pyconfig.h.in.systemtap systemtap-example.stp
configure.in.systemtap Makefile Modules pyfuntop.stp Tools
[root@KuGouIdc Python-2.6.6]# make -n all
gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c
make: *** No rule to make target `libpython2.6.a', needed by `python'. Stop.
我查看了 Makefile 详细信息,确实找不到任何规则来制作目标“libpythonXXX.a”。我google了一下,好像没有人遇到过和我一样的问题?
在 Makefile 中,它确实有一个规则来制作目标“libpythonXXX.so”。
解决方案
为我工作
$ docker run --rm -it debian:stretch
# mkdir /src
# cd /src
# apt update
# apt install wget build-essential
# wget https://www.python.org/ftp/python/2.6/Python-2.6.tgz
# tar xzf Python-2.6.tgz
# cd Python-2.6
# ./configure
...
# make -n all
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/acceler.o Parser/acceler.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/grammar1.o Parser/grammar1.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/listnode.o Parser/listnode.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Parser/node.o Parser/node.c
...
推荐阅读
- google-sheets - VLOOKUP 部分名称和输入或拼写错误
- sharepoint - 无法将列表更改保存到服务器
- python - JSON模式,检查值的总和是否超过100
- reactjs - 反应组件子道具的“条件”类型是什么?
- mongodb - MongoDB cursor.explain("executionStats") 上的 needTime 是什么?
- javascript - 如何左/右对齐flexbox div中的两个跨度
- typo3 - Typo3,为遮罩元素设置标题
- angular - Angular 2 指令,oninit 和 ngoninit
- azure-digital-twins - Azure 数字孪生的主要优势是什么?
- nrwl - 在 NRWL/NX 环境中使用 GraphQl 和 MongoDB 模式作为库