在OS X上使用Python支持编译Vim

时间:2011-11-11 11:15:58

标签: python macos vim compilation

我从Vim src目录开始

$ pwd
~/vim/src
$ ./configure \
> --prefix=$HOME/Applications/vim-compiled \
> --enable-rubyinterp=yes \
> --enable-pythoninterp=yes \
> --with-python-config-dir=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config
$ make

make结束时,我收到以下错误

ld: warning: in /Library/Frameworks//Python.framework/Python, missing required architecture x86_64 in file
Undefined symbols:
<very long list of Undefined symbols>
...
...
...
<very long list of Undefined symbols>
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [vim] Error 1

导致错误的原因是什么?我在使用MacPorts,Homebrew或MacVim的类似问题中找到了答案。我不想使用任何这些。还有其他方法吗?

更新:这是列出Undefined symbols http://pastebin.com/ggV87ReF

的输出

3 个答案:

答案 0 :(得分:3)

在我的情况下,我使用以下命令在10.6.8上安装了MacVim ./configure --prefix=/usr --enable-perlinterp=yes --enable-pythoninterp=yes --with-features=huge --with-python-config-dir=/System/Library/Frameworks/Python.framework/Versions/2.6

sudo make

答案 1 :(得分:1)

查看vim(或macvim)的Homebrew配方,并在必要时进行修改。 https://github.com/mxcl/homebrew

答案 2 :(得分:1)

您是否尝试升级到OSX 32位/ 64位版本的Python 2.7。 2 ?我不确定是否有特定的64位版本的2.7,这可能会导致问题。