Comments
-
Greg Hurrell
That's the message that gets printed when it can't load the C extension.
To find out more, try requiring it manually from inside VIM. For example, if I go and delete the
~/.vim/ruby/command-t/ext.bundle
file, I will see the error message that you quote. To manuallyrequire
it from inside VIM I do::ruby require 'command-t/ext'
And VIM prints:
LoadError: (eval):18:in `require': no such file to load -- command-t/ext
So when you do that, what do you see?
-
anonymous
I get this message:
LoadError: /Users/andrei/.vim/ruby/command-t/ext.bundle: dlopen(/Users/andrei/.vim/ruby/command-t/ext.bundle, 9): no suitable image found. Did find:
The ext.bundle exists though:
$ ls /Users/andrei/.vim/ruby/command-t/ext.bundle -rwxr-xr-x 1 andrei staff 15K Mar 30 10:09 /Users/andrei/.vim/ruby/command-t/ext.bundle
-
Greg Hurrell
Ok, the message you're seeing is truncated. The full message is bound to be something like:
LoadError: /Users/andrei/.vim/ruby/command-t/ext.bundle: dlopen(/Users/andrei/.vim/ruby/command-t/ext.bundle, 9): no suitable image found. Did find: ext.bundle: mach-o, but wrong architecture - ext.bundle
This can happen when you try to load a 64-bit extension into 32-bit Ruby or vice versa.
So the question is, how did you build MacVim? Or is it just the latest snapshot?
And when you built Command-T, what was the output of the
make
? -
anonymous
I downloaded MacVim from http://code.google.com/p/macvim/.
:version
gives me:VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Aug 21 2008 12:51:59) ... Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown -pragmas -pipe -I. -Iproto -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon -g -O -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 Linking: gcc -L. -arch ppc -arch i386 -L/usr/local/lib -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -oVim -framework Cocoa -framework Carbon -lncurses -liconv -framework Python -lruby -lm
The output of
make
for Command-T was:usr/bin/gcc-4.2 -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/opt/local/lib/ruby/1.8/i686-darwin10 -I. -DHAVE_RUBY_H -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -arch x86_64 -fno-common -pipe -fno-common -arch x86_64 -std=gnu99 -Wall -Wextra -Wno-unused-parameter -c ext.c /usr/bin/gcc-4.2 -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/opt/local/lib/ruby/1.8/i686-darwin10 -I. -DHAVE_RUBY_H -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -arch x86_64 -fno-common -pipe -fno-common -arch x86_64 -std=gnu99 -Wall -Wextra -Wno-unused-parameter -c match.c /usr/bin/gcc-4.2 -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I/opt/local/lib/ruby/1.8/i686-darwin10 -I. -DHAVE_RUBY_H -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -arch x86_64 -fno-common -pipe -fno-common -arch x86_64 -std=gnu99 -Wall -Wextra -Wno-unused-parameter -c matcher.c /usr/bin/gcc-4.2 -dynamic -bundle -undefined suppress -flat_namespace -o ext.bundle ext.o match.o matcher.o -L. -L/opt/local/lib -L. -L/opt/local/lib -arch x86_64 -lruby -lpthread -ldl -lobjc
-
Greg Hurrell
So your problem here is that the extension built as 64-bit and your MacVim was built as 32-bit.
I guess you're on Snow Leopard and that you're on a newish (ie. 64 bit) machine, as I can see that when you run
make
Ruby defaults to building for 64-bit (visible in the-arch x86_64
flags that appear in the build output).I am also guessing that the build of MacVim you downloaded was built on a machine running Leopard, or at least it was set up to use the older 10.4 SDK, and set to produce a 32-bit Universal Binary (as you can see in the output where it lists the arches as
-arch i386
and-arch ppc
).This has changed with more recent snapshots of MacVim, which are now labelled as "universal 32/64 bit binary which requires an Intel processor and Mac OS X 10.5 or later", but in any case the one you are using looks quite old (21 August 2008 compile) date. I'm using snapshot 52 here (which reports
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Mar 5 2010 15:46:30)
).So you have three options here:
-
One is to grab the latest MacVim snapshot (which reports
-arch i386 -arch x86_64
in the:version
output) from http://code.google.com/p/macvim/wiki/Snapshot; this is probably the easiest option by far - Another is to force the extension to build as 32-bit: this is going to be tricky at best because you're officially fighting an uphill battle against the defaults in Snow Leopard on 64-bit machiens
- The other is to build Vim yourself with 64-bit support: not too hard at all (documented here: http://code.google.com/p/macvim/wiki/Building) but I don't really see the benefit over just grabbing the latest snapshot
-
One is to grab the latest MacVim snapshot (which reports
-
Greg Hurrell
I gather from the lack of response that you've satisfactorily solved your problem by updating to the latest MacVim snapshot, so I'm going to mark this one as closed. Feel free to post another comment if you want me to re-open it.
-
Greg Hurrell
Status changed:
- From: new
- To: closed
Add a comment
Comments are now closed for this issue.