Howto compile vim with ruby 1.9.2
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.
开发者_如何学JAVAWhen compiling with
./configure --enable-rubyinterp --enable-gui=no --disable-nls --enable-cscope --prefix=/Users/madhatter
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
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
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
Any other ideas what might work?
see Trying to compile vim on OS X? for an answer. Basically the answer is that you can't right now without fixing Vim.
This is what I'm using for vim + python
./configure --with-features=BIG --enable-pythoninterp=yes --enable-multibyte=yes --enable-cscope=yes
Looks like you're missing
--enable-rubyinterp=yes
精彩评论