如何使用ruby 1.9.2编译vim [英] Howto compile vim with ruby 1.9.2
问题描述
我尝试使用ruby支持重新编译vim,因为我注意到vim仍在使用1.8.7(这是Snow Leopard上的默认ruby版本). Ruby 1.9.2通过rvm安装.
I tried to re-compile vim with ruby support because I noticed that vim was still using 1.8.7 (which is the default ruby version on Snow Leopard). Ruby 1.9.2 is installed via rvm.
使用编译时
./configure --enable-rubyinterp --enable-gui=no --disable-nls --enable-cscope --prefix=/Users/madhatter
我从make中收到以下错误:
I get the following error from make:
ld: library not found for -lruby.1.9.1
collect2: ld returned 1 exit status
make[1]: *** [vim] Error 1
make: *** [first] Error 2
然后我从googlecode克隆了实际的存储库,并尝试构建它. make中没有错误,但是启动vim导致以下错误:
I then cloned the actual repository from googlecode and tried to build that. There were no errors in make, but starting vim resulted in the following error:
dyld: Symbol not found: _environ
Referenced from: /Users/madhatter/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.1.9.1.dylib
Expected in: flat namespace
in /Users/madhatter/.rvm/rubies/ruby-1.9.2-p290/lib/libruby.1.9.1.dylib
[1] 41782 trace trap vim
最后我尝试将一些红宝石信息添加到config.mk文件中
Last thing I tried was adding some ruby information to the config.mk file
RUBY = /Users/madhatter/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
RUBY_SRC = if_ruby.c
RUBY_OBJ = objects/if_ruby.o
RUBY_PRO = if_ruby.pro
RUBY_CFLAGS = -I/Users/madhatter/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I/Users/madhatter/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin10.8.0 -DRUBY_VERSION=19
RUBY_LIBS = -lruby.1.9.1 -lpthread -ldl -lobjc
还有其他想法可行吗?
推荐答案
请参见试图在OS X上编译vim吗?寻求答案.基本上,答案是您现在无法修复Vim.
see Trying to compile vim on OS X? for an answer. Basically the answer is that you can't right now without fixing Vim.
这篇关于如何使用ruby 1.9.2编译vim的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!