command-t.vim could not load the C extension
-
anonymous
After a seemingly successful install, I get the error "command-t.vim could not load the C extension" when running :CommandT. Is this common?
-
Greg Hurrell
Can you please paste the output of the
ruby extconf.rb
andmake
steps of the installation, and also the output ofvim --version
? -
anonymous
Hi,
i have the exact same problem as the original poster. Everything seems to install fine, but <leader>t fails with "command-t.vim could not load the C extension" Here´s my system info:
vim version:
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jul 29 2010 19:05:14) MacOS X (unix) version Included patches: 1-446 Compiled by alexander@192.168.10.177 Normal version without GUI. Features included (+) or not (-): -arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +cryptv -cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +float +folding -footer +fork() -gettext -hangul_input -iconv +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname +mouse -mouseshape -mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse +mouse_xterm -multi_byte +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra -perl +postscript +printer -profile -python +quickfix +reltime -rightleft +ruby +scrollbind -signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp -xterm_clipboard -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" fall-back for $VIM: "/usr/local/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/Headers/FlatCarbon -g -O2 -D_FORTIFY_SOURCE=1 -I/usr/local/lib/ruby/1.8/i686-darwin10.4.0 -DRUBY_VERSION=18 Linking: gcc -L. -L/usr/local/lib -o vim -lm -lncurses -lruby-static -lobjc
output of ruby extconf.rb:
checking for ruby.h... yes creating Makefile
output of make:
gcc -I. -I/usr/local/lib/ruby/1.8/i686-darwin10.4.0 -I/usr/local/lib/ruby/1.8/i686-darwin10.4.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c ext.c gcc -I. -I/usr/local/lib/ruby/1.8/i686-darwin10.4.0 -I/usr/local/lib/ruby/1.8/i686-darwin10.4.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c match.c gcc -I. -I/usr/local/lib/ruby/1.8/i686-darwin10.4.0 -I/usr/local/lib/ruby/1.8/i686-darwin10.4.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c matcher.c cc -dynamic -bundle -undefined suppress -flat_namespace -o ext.bundle ext.o match.o matcher.o -L. -L/usr/local/lib -L. -ldl -lobjc
operating system: os x snow leopard
ruby version:
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-darwin10.4.0]
vim is linked against the same ruby the system is using
thanks for your help!
alexander
-
Greg Hurrell
It looks to me like the last step of you
make
isn't actually linking to Ruby at all. Compare your-ldl -lobjc
with mine:cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o ext.bundle ext.o match.o matcher.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lpthread -ldl
(Note the explicit
-lruby
.)It would be interesting to see your
Makefile
. Maybe try editing it by hand and changing theLIBS =
line to include-lruby-static
, then re-runmake
. -
anonymous
Hi there,
thank you very much for looking into this!
I´ve tried manually editing the Makefile with -lruby-static this lead to vim segfaulting on me ;)
Vim: Caught deadly signal SEGV Vim: Finished.
And here´s my Makefile:
SHELL = /bin/sh #### Start of system configuration section. #### srcdir = . topdir = /usr/local/lib/ruby/1.8/i686-darwin10.4.0 hdrdir = $(topdir) VPATH = $(srcdir):$(topdir):$(hdrdir) exec_prefix = $(prefix) prefix = $(DESTDIR)/usr/local sharedstatedir = $(prefix)/com mandir = $(datarootdir)/man psdir = $(docdir) oldincludedir = $(DESTDIR)/usr/include localedir = $(datarootdir)/locale bindir = $(exec_prefix)/bin libexecdir = $(exec_prefix)/libexec sitedir = $(libdir)/ruby/site_ruby htmldir = $(docdir) vendorarchdir = $(vendorlibdir)/$(sitearch) includedir = $(prefix)/include infodir = $(datarootdir)/info vendorlibdir = $(vendordir)/$(ruby_version) sysconfdir = $(prefix)/etc libdir = $(exec_prefix)/lib sbindir = $(exec_prefix)/sbin rubylibdir = $(libdir)/ruby/$(ruby_version) docdir = $(datarootdir)/doc/$(PACKAGE) dvidir = $(docdir) vendordir = $(libdir)/ruby/vendor_ruby datarootdir = $(prefix)/share pdfdir = $(docdir) archdir = $(rubylibdir)/$(arch) sitearchdir = $(sitelibdir)/$(sitearch) datadir = $(datarootdir) localstatedir = $(prefix)/var sitelibdir = $(sitedir)/$(ruby_version) CC = gcc LIBRUBY = $(LIBRUBY_A) LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a LIBRUBYARG_SHARED = LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static RUBY_EXTCONF_H = CFLAGS = -fno-common -g -O2 -pipe -fno-common $(cflags) INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) DEFS = CPPFLAGS = -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags) CXXFLAGS = $(CFLAGS) ldflags = -L. dldflags = archflag = DLDFLAGS = $(ldflags) $(dldflags) $(archflag) LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace AR = ar EXEEXT = RUBY_INSTALL_NAME = ruby RUBY_SO_NAME = ruby arch = i686-darwin10.4.0 sitearch = i686-darwin10.4.0 ruby_version = 1.8 ruby = /usr/local/bin/ruby RUBY = $(ruby) RM = rm -f MAKEDIRS = mkdir -p INSTALL = /usr/bin/install -c INSTALL_PROG = $(INSTALL) -m 0755 INSTALL_DATA = $(INSTALL) -m 644 COPY = cp #### End of system configuration section. #### preload = libpath = . $(libdir) LIBPATH = -L. -L$(libdir) DEFFILE = CLEANFILES = mkmf.log DISTCLEANFILES = extout = extout_prefix = target_prefix = LOCAL_LIBS = LIBS = -ldl -lobjc SRCS = ext.c match.c matcher.c OBJS = ext.o match.o matcher.o TARGET = ext DLLIB = $(TARGET).bundle EXTSTATIC = STATIC_LIB = BINDIR = $(bindir) RUBYCOMMONDIR = $(sitedir)$(target_prefix) RUBYLIBDIR = $(sitelibdir)$(target_prefix) RUBYARCHDIR = $(sitearchdir)$(target_prefix) TARGET_SO = $(DLLIB) CLEANLIBS = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak all: $(DLLIB) static: $(STATIC_LIB) clean: @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) distclean: clean @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES) realclean: distclean install: install-so install-rb install-so: $(RUBYARCHDIR) install-so: $(RUBYARCHDIR)/$(DLLIB) $(RUBYARCHDIR)/$(DLLIB): $(DLLIB) $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) install-rb: pre-install-rb install-rb-default install-rb-default: pre-install-rb-default pre-install-rb: Makefile pre-install-rb-default: Makefile $(RUBYARCHDIR): $(MAKEDIRS) $@ site-install: site-install-so site-install-rb site-install-so: install-so site-install-rb: install-rb .SUFFIXES: .c .m .cc .cxx .cpp .C .o .cc.o: $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< .cxx.o: $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< .cpp.o: $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< .C.o: $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< .c.o: $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $< $(DLLIB): $(OBJS) Makefile @-$(RM) $@ $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) ### # Copyright 2010 Wincent Colaiuta. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. CFLAGS += -std=c99 -Wall -Wextra -Wno-unused-parameter
thanks again and kind regards,
alexander
-
Greg Hurrell
Not sure if this sheds much light on the subject, but here are the differences between my
Makefile
and yours (well, comparing all lines containing the string "lib"):--- /Users/wincent/tmp/mine.txt 2010-07-30 17:22:30.000000000 +0200 +++ /Users/wincent/tmp/yours.txt 2010-07-30 17:22:17.000000000 +0200 @@ -1,7 +1,6 @@ -topdir = /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -prefix = $(DESTDIR)/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr +topdir = /usr/local/lib/ruby/1.8/i686-darwin10.4.0 libexecdir = $(exec_prefix)/libexec -sitedir = $(DESTDIR)/Library/Ruby/Site +sitedir = $(libdir)/ruby/site_ruby vendorarchdir = $(vendorlibdir)/$(sitearch) vendorlibdir = $(vendordir)/$(ruby_version) libdir = $(exec_prefix)/lib @@ -10,25 +9,24 @@ archdir = $(rubylibdir)/$(arch) sitearchdir = $(sitelibdir)/$(sitearch) sitelibdir = $(sitedir)/$(ruby_version) -LIBRUBY = $(LIBRUBY_SO) +LIBRUBY = $(LIBRUBY_A) LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a -LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME) -LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME) -ruby = /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby +LIBRUBYARG_SHARED = +LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static libpath = . $(libdir) LIBPATH = -L. -L$(libdir) LOCAL_LIBS = -LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl +LIBS = -ldl -lobjc DLLIB = $(TARGET).bundle STATIC_LIB = RUBYLIBDIR = $(sitelibdir)$(target_prefix) TARGET_SO = $(DLLIB) CLEANLIBS = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map -all: $(DLLIB) -static: $(STATIC_LIB) - @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) +all: $(DLLIB) +static: $(STATIC_LIB) + @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) install-so: $(RUBYARCHDIR)/$(DLLIB) $(RUBYARCHDIR)/$(DLLIB): $(DLLIB) - $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) + $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) $(DLLIB): $(OBJS) Makefile - $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) \ No newline at end of file + $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) \ No newline at end of file
I wonder if you have a non-static version of the Ruby library on your system, seeing as the extension is getting built with the
-dynamic
flag.If you don't care about seeing another segfault you could try
-lruby
instead of-lruby-static
and see what happens.Failing that, it would be interesting to perform two other tests:
One is to see if you can load the extension from some other Ruby process. For example, just try loading the extension, referencing a constant and seeing if it responds to any methods:
$ ruby -r ~/.vim/ruby/command-t/ext -e 'p CommandT::Match.methods'
The other is to try from inside Vim itself and see what it prints:
:ruby p(require 'command-t/ext')
-
Alan
I had the same problem after pulling the git repo into .vim/bundle and running rake make with (rvm) 1.9.2.
I tried adding -lruby-static and then rerunning make, but it didn't seem to help.
What ended up working: regenerating the Makefile with (rvm) 1.8.7 and then adding -lruby-static. Unfortunately I'm a newb, so I'm not sure why what I did worked, but I hope it's helpful.
-
Greg Hurrell
Most likely it worked because your Vim was linked against 1.8.7 and not 1.9.2. Command-T has to link against the same Ruby otherwise Vim won't be able to load it.
-
anonymous
I also had the same problem. Doing what Alan mentioned the above post helped resolving it. I use snow leopard 10.6.4 + macvim 7.3(latest avaiable ) + ruby 1.8.7
-
anonymous
I have the same error. The extconf.rb and make perform same as above without errors. Running the two commands, I get:
% ruby -r ~/.vim/ruby/command-t/ext -e 'p CommandT::Match.methods' ["private_class_method", "inspect", "name", "tap", "clone", "public_methods", "object_id", "__send__", "method_defined?", "instance_variable_defined?", "equal?", "freeze", "extend", "send", "const_defined?", "methods", "ancestors", "module_eval", "instance_method", "hash", "autoload?", "dup", "to_enum", "instance_methods", "public_method_defined?", "instance_variables", "class_variable_defined?", "eql?", "constants", "instance_eval", "id", "module_exec", "singleton_methods", "const_missing", "taint", "instance_variable_get", "frozen?", "enum_for", "private_method_defined?", "public_instance_methods", "display", "instance_of?", "superclass", "method", "to_a", "included_modules", "const_get", "instance_exec", "type", "<", "protected_methods", "<=>", "class_eval", "==", "class_variables", ">", "===", "instance_variable_set", "protected_instance_methods", "protected_method_defined?", "respond_to?", "kind_of?", ">=", "public_class_method", "to_s", "<=", "const_set", "allocate", "class", "new", "private_methods", "=~", "tainted?", "__id__", "class_exec", "autoload", "untaint", "nil?", "private_instance_methods", "include?", "is_a?"]
And, inside mvim, running :ruby p(require 'command-t/ext') gives
LoadError: /Users/jdf/.vim/ruby/command-t/ext.bundle: dlopen(/Users/jdf/.vim/ruby/command-t/ext.bundle, 9): no suitable image found. Did find:
-
Greg Hurrell
The "no suitable image found" sounds like a 32-bit/64-bit mismatch to me (ie. Vim built as 32-bit executable, Command-T as 64-bit, or vice versa). You should be able to compare the Vim compilation and linker flags (visible in
vim --version
) with the flags shown during the Command-T build (make
) and you'll see if there is a discrepancy there.My guess is that you're on Mac OS X (from the
/Users/
home directory); you on Leopard or Snow Leopard? And does your machine have a 64-bit processor? -
anonymous
Created
,
edited
Hi!
I had the same problem, with OSX Snow Leopard, MacVim 7.3. I found a solution:
- Manually edit your generated Makefile and replace 'x86_64' with "i386" in every occurrence.
then, run:
$ make clean all $ sudo make install
then run your macvim... it should work.
best! matias
-
anonymous
changing to i386 gets command-t to work for me on mac os x lion
however during make a warning is thrown: ld: warning: ignoring file /Users/asjf/.rvm/rubies/ruby-1.8.7-p352/lib/libruby.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
don't know if that may have any side effects
-
anonymous
Created
,
edited
Hello, I'm also having these issues, using MacVim on OS 10.7 with Pathogen. So far, none of the posts here have helped.
$ mvim --version VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan 2 2012 17:38:47) MacOS X (unix) version Included patches: 1-390 Compiled by Bjorn Winckler <bjorn.winckler@gmail.com> Huge version with MacVim GUI. Features included (+) or not (-): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +fullscreen -gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme +netbeans_intg +odbeditor +path_extra +perl +persistent_undo +postscript +printer +profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +transparency +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp -xterm_clipboard -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O2 -arch i386 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -L. -L. -arch i386 -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lncurses -liconv -framework Cocoa -fstack-protector -L/usr/local/lib -L/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -framework Python -framework Ruby
$ rake make /Users/raphael/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby extconf.rb checking for ruby.h... yes creating Makefile /usr/bin/gcc-4.2 -I. -I/opt/local/include -I/Users/raphael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/i686-darwin11.1.0 -I/Users/raphael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/i686-darwin11.1.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c ext.c /usr/bin/gcc-4.2 -I. -I/opt/local/include -I/Users/raphael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/i686-darwin11.1.0 -I/Users/raphael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/i686-darwin11.1.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c match.c /usr/bin/gcc-4.2 -I. -I/opt/local/include -I/Users/raphael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/i686-darwin11.1.0 -I/Users/raphael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/i686-darwin11.1.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c matcher.c cc -dynamic -bundle -undefined suppress -flat_namespace -o ext.bundle ext.o match.o matcher.o -L. -L/Users/raphael/.rvm/rubies/ree-1.8.7-2011.03/lib -L. -L/opt/local/lib -ldl -lobjc ld: warning: directory not found for option '-L/opt/local/lib'
$ ruby --version ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin11.1.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03
-
Greg Hurrell
The output shows that your MacVim is linking against the system Ruby, yet you've built Command-T using REE.
In a nutshell, you need to make sure that both Vim and Command-T are compiled using the same Ruby. Please see the docs for more details.
-
emu
Alright, I'm having these issues, too. I've attempted everything here to no avail. I'm a bit of a noob, so please bear with me. I'm on OS X 10.7 and using Pathogen. I'm trying to use Command-T as a submodule of my dotfiles directory, if that makes a difference.
$ mvim --version VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan 2 2012 17:38:47) MacOS X (unix) version Included patches: 1-390 Compiled by Bjorn Winckler <bjorn.winckler@gmail.com> Huge version with MacVim GUI. Features included (+) or not (-): +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +fullscreen -gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme +netbeans_intg +odbeditor +path_extra +perl +persistent_undo +postscript +printer +profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +transparency +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp -xterm_clipboard -xterm_save system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O2 -arch i386 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -L. -L. -arch i386 -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lncurses -liconv -framework Cocoa -fstack-protector -L/usr/local/lib -L/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -framework Python -framework Ruby
ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-darwin11.4.0]
So if I'm understanding this correctly, MacVim 7.3 should play nicely with 1.8.7, which is what I'm using, but suddenly...
$ ruby extconf.rb checking for ruby.h... yes creating Makefile
$ make /usr/bin/gcc-4.2 -I. -I/Users/ethanmuller/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-darwin11.4.0 -I/Users/ethanmuller/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-darwin11.4.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -fno-common -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c ext.c /usr/bin/gcc-4.2 -I. -I/Users/ethanmuller/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-darwin11.4.0 -I/Users/ethanmuller/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-darwin11.4.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -fno-common -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c match.c /usr/bin/gcc-4.2 -I. -I/Users/ethanmuller/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-darwin11.4.0 -I/Users/ethanmuller/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-darwin11.4.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -fno-common -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c matcher.c cc -dynamic -bundle -undefined suppress -flat_namespace -o ext.bundle ext.o match.o matcher.o -L. -L/Users/ethanmuller/.rvm/rubies/ruby-1.8.7-p358/lib -L. -lruby -ldl -lobjc
:CommandT command-t.vim could not load the C extension Please see INSTALLATION and TROUBLE-SHOOTING in the help For more information type: :help command-t
Dang it. I'm stumped.
-
emu
I fixed my own problem. Here's what I think was happening. Let me know if I'm wrong.
I was using RVM's 1.8.7 instead of OS X's 1.8.7. I entirely disabled RVM to compile Command-T, and it worked. I know next to nothing about Ruby, and even less about RVM. That was my problem, I think.
-
anonymous
Created
,
edited
i had the same problem, it's clearly a version issue of OS X ruby, RVM Ruby and MACVIM Ruby version.
What i did to solve the problem:
1. Check what version of ruby you are using:
ruby -v
2. If it is not 1.8.7, install it. I did it with rvm:
rvm install 1.8.7
3. Use ruby 1.8.7
rvm use 1.8.7
4. Download command-t plugin and install it
Reply
This topic is now closed.