Comments
-
Greg Hurrell
I gather from the
/opt/local
in the output of yourmake
invocation that you are using some kind of package manager to provide a non-standard Ruby installation.I think the most likely cause, then, will be a discrepancy between the version of Ruby linked to by Vim (which I expect is the standard system Ruby via
/System/Library/Ruby.framework
) and the one linked to by the extension that you built.Can you try temporarily deactivating your package management system (I presume it inserts itself by altering your PATH or something, so just temporarily modify your PATH accordingly) and doing the
make
again? Then I'd expect it to work. -
anonymous
Hi Wincent,
Thanks so much for your quick reply!
So after running a make distclean, then ruby extconf.rb and make again:
gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -DHAVE_RUBY_H -fno-common -arch ppc -arch i386 -Os -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c ext.c gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -DHAVE_RUBY_H -fno-common -arch ppc -arch i386 -Os -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c match.c gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I. -DHAVE_RUBY_H -fno-common -arch ppc -arch i386 -Os -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c matcher.c cc -arch ppc -arch i386 -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 ppc -arch i386 -lruby -lpthread -ldl -lm
I still have no joy:
"command-t.vim could not load the C extension"
-
Greg Hurrell
You could try manually loading the extension yourself from inside Vim and see if it reports more error info or throws an exception. Try:
:ruby p(require 'command-t/ext')
You should see either
true
(loaded successfully),false
(was already loaded), or some exception message. -
anonymous
LoadError: /Users/tcrins01/.vim/ruby/command-t/ext.bundle: dlopen(/Users/tcrins01/.vim/ruby/command-t/ext.bundle, 9): no suitable image found. Did find:
-
Greg Hurrell
Hm. That's the kind of message you might see if you try loading a 64-bit extension into a 32-bit Ruby build, or vice versa.
You could try forcing a 64-bit build like this:
$ cd ~/.vim/ruby/command-t $ env ARCHFLAGS="-arch x86_64" ruby extconf.rb $ env ARCHFLAGS="-arch x86_64" make
Probably a Snow Leopard vs Leopard thing. I've also got a 64-bit machine, but on Snow Leopard, and when I do
ruby extconf.rb && make
I getARCHFLAGS
of-arch i386 -arch x86_64
by default, whereas you are getting-arch ppc -arch i386
:gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c ext.c gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c match.c gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -DHAVE_RUBY_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -std=c99 -Wall -Wextra -Wno-unused-parameter -c matcher.c 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
-
anonymous
Ahh! Perfect! That did the trick. Thank you so much for your help.
-
Greg Hurrell
Glad to hear it. Kind of annoying that the installation is so sensitive to that kind of discrepancy. Would love to find a way around it.
-
Greg Hurrell
Status changed:
- From: new
- To: closed
-
anonymous
Well if you need a test system, I can try to help? It is a shame, I saw the other issue that was just like this but couldn't think how to force the architecture.
-
Greg Hurrell
Thanks. Well the two possible ideas I have for this are:
-
install time: add some more checks either in the
extconf.rb
file or theMakefile
itself, to at least catch the major likely causes of incompatibility and print some kind of warning - run time: add a command that can be called from inside Vim itself to try building the extension; at least that should rule out external package management systems as a possible cause
Will try to get at least something like that sorted out before the 1.0 release.
-
install time: add some more checks either in the
-
anonymous
Either sound, like a good idea to me. I guess the problem is probably with the user though, I'm not the greatest linux user about so didn't know where to go. I think an obvious warning at install time would be the more standard approach? From a new to vim users perspective though I like the idea of vim installing it for me :)
Add a comment
Comments are now closed for this issue.