Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

When 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?

like image 248
madhatter Avatar asked Sep 06 '11 20:09

madhatter


2 Answers

see Trying to compile vim on OS X? for an answer. Basically the answer is that you can't right now without fixing Vim.

like image 90
Danny Dulai Avatar answered Oct 01 '22 15:10

Danny Dulai


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
like image 32
Fredrik Pihl Avatar answered Oct 01 '22 15:10

Fredrik Pihl