≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #2165

Bug #2165: Extension builds with correct Ruby version, but won't load

Kind bug
Product Command-T
When Created 2014-03-27T16:18:34Z, updated 2015-06-10T17:31:37Z
Status closed
Reporter Ches Martin
Tags no tags

Description

Hi Greg,

Thanks for Command-T, it's served me well for a long time and I was looking forward to the pthreads update since it's apparently been awhile since I updated my plugin version. I'm sure these install issues are a huge thorn in your side, but I've never had trouble with past versions and I'm miffed this time.

The extension build runs just fine, but I get the message in Vim that it can't be loaded.

I'm pretty sure I'm not flubbing the Ruby version here, otool results are included below. This system is running Mountain Lion, and by default part of the extension build appears to use gcc. My MacVim builds (I've tried both a distributed binary and a Homebrew build) indicate clang compilation, so I set CC=clang as you can see below. Without this, the build also completed fine but likewise in Vim it doesn't load. I can share the build output with gcc if it's helpful.

Here's everything, I'm hoping you have an idea or can point me to how to get more debug info of why the extension isn't loading:

 $ cd ~/.vim/bundle/Command-T/ruby/command-t
 $ make distclean
 $ chruby system
 $ which ruby
 /usr/bin/ruby
 $ env | grep RUBY
 $ env | grep GEM
 $ export CC=clang
 $ ruby extconf.rb
 checking for float.h... yes
 checking for ruby.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 creating Makefile
 $ make
 clang -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -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
 clang -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -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
 clang -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -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 -lobjc
 $ cc --version
 Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
 Target: x86_64-apple-darwin12.5.0
 Thread model: posix
 $ otool -L ext.bundle | grep ruby
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib (compatibility version 1.8.0, current version 1.8.7)
 $ otool -L /usr/local/Cellar/macvim/7.4-72/MacVim.app/Contents/MacOS/Vim | grep ruby
 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib (compatibility version 1.8.0, current version 1.8.7)
 $ vim --version
 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct 25 2013 17:40:50)
 MacOS X (unix) version
 Included patches: 1-52
 Compiled by Douglas Drumond <douglas@eee19.com>
 Huge version with MacVim GUI.  Features included (+) or not (-):
 +acl             +file_in_path    +mouse_sgr       +tag_binary
 +arabic          +find_in_path    -mouse_sysmouse  +tag_old_static
 +autocmd         +float           +mouse_urxvt     -tag_any_white
 +balloon_eval    +folding         +mouse_xterm     -tcl
 +browse          -footer          +multi_byte      +terminfo
 ++builtin_terms  +fork()          +multi_lang      +termresponse
 +byte_offset     +fullscreen      -mzscheme        +textobjects
 +cindent         -gettext         +netbeans_intg   +title
 +clientserver    -hangul_input    +odbeditor       +toolbar
 +clipboard       +iconv           +path_extra      +transparency
 +cmdline_compl   +insert_expand   +perl            +user_commands
 +cmdline_hist    +jumplist        +persistent_undo +vertsplit
 +cmdline_info    +keymap          +postscript      +virtualedit
 +comments        +langmap         +printer         +visual
 +conceal         +libcall         +profile         +visualextra
 +cryptv          +linebreak       +python          +viminfo
 +cscope          +lispindent      -python3         +vreplace
 +cursorbind      +listcmds        +quickfix        +wildignore
 +cursorshape     +localmap        +reltime         +wildmenu
 +dialog_con_gui  -lua             +rightleft       +windows
 +diff            +menu            +ruby            +writebackup
 +digraphs        +mksession       +scrollbind      -X11
 +dnd             +modify_fname    +signs           -xfontset
 -ebcdic          +mouse           +smartindent     +xim
 +emacs_tags      +mouseshape      -sniff           -xsmp
 +eval            +mouse_dec       +startuptime     -xterm_clipboard
 +ex_extra        -mouse_gpm       +statusline      -xterm_save
 +extra_search    -mouse_jsbterm   -sun_workshop    -xpm
 +farsi           +mouse_netterm   +syntax          
    system vimrc file: "$VIM/vimrc"
      user vimrc file: "$HOME/.vimrc"
  2nd user vimrc file: "~/.vim/vimrc"
       user exrc file: "$HOME/.exrc"
   system gvimrc file: "$VIM/gvimrc"
     user gvimrc file: "$HOME/.gvimrc"
 2nd user gvimrc file: "~/.vim/gvimrc"
     system menu file: "$VIMRUNTIME/menu.vim"
   fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
 Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
 Linking: clang   -L.    -L.     -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   

Thanks for your help!

Comments

  1. Greg Hurrell 2014-03-28T04:35:14Z

    I have a suspicion that Ruby is failing to load the JSON gem, which is a LoadError, and Command-T doesn't distinguish between that and failure to load Command-T itself.

    Try commenting out the require 'json' in ruby/command-t/scanner/file_scanner/watchman_file_scanner.rb and seeing if that works. (If you don't use the Watchman scanner, you don't need it anyway.)

    I have a commit on the next branch that removes the JSON dependency, but it will need a bit more work I think before it compiles correctly on older versions of Ruby. (I'll be looking into that tonight.)

  2. Greg Hurrell 2014-03-28T06:03:14Z

    Check out the latest HEAD of the next branch (https://github.com/wincent/Command-T/commit/52214cea74de4686baf41d99d810121ee4f90b1f) if you'd like to try this out; it no longer depends on JSON, and I've checked it compiles with 1.8.7 (etc) and the specs pass.

  3. Greg Hurrell 2015-06-10T17:31:34Z

    Closing due to lack of updates.

  4. Greg Hurrell 2015-06-10T17:31:37Z

    Status changed:

    • From: open
    • To: closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets