在Ubuntu上使用python支持编译vim

Sen*_*ran 8 python vim compilation

我试图在Ubuntu上使用python解释器从源代码编译vim.我已经在Ubuntu上安装了vim的依赖项,安装了python2.7-devel和python2.7-dbg包,并像这样进行配置步骤

./configure --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config
Run Code Online (Sandbox Code Playgroud)

config目录包含config.c文件.make步骤失败,出现以下错误.

...

objects/py_config.o:(.data+0xcc): undefined reference to `initcStringIO'
objects/py_config.o:(.data+0xd4): undefined reference to `initcPickle'
objects/py_config.o:(.data+0xdc): undefined reference to `initzlib'
collect2: ld returned 1 exit status
make: *** [vim] Error 1
Run Code Online (Sandbox Code Playgroud)

我已经尝试过稳定版本,在配置等方面进行了调整.但是没有找到明确的答案.还有没有python-interpreter的vim构建.

这里完整

输出 - http://paste.pocoo.org/show/577749/

错误 - http://paste.pocoo.org/show/577752/

Makefile - http://paste.pocoo.org/show/577751/

Sen*_*ran 3

经过大量研究后回答我自己的问题。看起来在某些Ubuntu安装中,vim正在寻找编译的文件可能丢失了

在意识到我继续自定义安装 Python 源代码 ( ./configure --prefix=/home/senthil/localpython; make; make install) 后,然后继续进行 vim 编译。

  1. 设置您的路径,使其python指向新的本地安装。

    PATH=/home/senthill/localpython/bin:$PATH

  2. 然后使用以下标志开始编译。

    ./configure --enable-pythoninterp --with-features=huge --with-python-config-dir=/home/senthil/localpython/lib/python2.7/config

您应该看到 vim 使用本地 python 解释器可以正常编译。从各种消息来源得知,这增加了 vim 的大小,而且我还觉得速度明显变慢了。就在完成这个练习之后(非常有耐心),我想,我想使用系统编译的 vim 本身。