wincent / command-t

⌨️ Fast file navigation for Neovim and Vim
BSD 2-Clause "Simplified" License
2.74k stars 317 forks source link

faild to load C extension #367

Closed undefinedTea closed 4 years ago

undefinedTea commented 4 years ago

this seems to be related to #350 with one exception: ruby version number mismatch is not the issue.

issue in VIM

command-t.vim could not load the C extension.
Please see INSTALLATION and TROUBLE-SHOOTING in the help.
Vim Ruby version: 2.6.5-p114
For more information type:    :help command-t

VIM ruby version

:ruby puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
> 2.6.5-p114

SYSTEM ruby version

$ ruby --version
> ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]

compile and make commands

$ make clean

$ ruby extconf.rb
checking for float.h... yes
checking for ruby.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for fcntl.h... yes
checking for stdint.h... yes
checking for sys/errno.h... yes
checking for sys/socket.h... yes
checking for ruby/st.h... yes
checking for st.h... yes
checking for pthread_create() in -lpthread... yes
creating Makefile

$ make
compiling ext.c
compiling heap.c
compiling match.c
compiling matcher.c
compiling watchman.c
watchman.c:546:51: warning: function 'watchman_raise_system_call_error' could be
      declared with attribute 'noreturn' [-Wmissing-noreturn]
void watchman_raise_system_call_error(int number) {
                                                  ^
1 warning generated.
linking shared-object ext.bundle

VIM flags

$ vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan  8 2020 00:57:57)
macOS version
Included patches: 1-100
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               -farsi             -mouse_sysmouse    -tag_old_static
+arabic            +file_in_path      +mouse_urxvt       -tag_any_white
+autocmd           +find_in_path      +mouse_xterm       -tcl
+autochdir         +float             +multi_byte        +termguicolors
-autoservername    +folding           +multi_lang        +terminal
-balloon_eval      -footer            -mzscheme          +terminfo
+balloon_eval_term +fork()            +netbeans_intg     +termresponse
-browse            +gettext           +num64             +textobjects
++builtin_terms    -hangul_input      +packages          +textprop
+byte_offset       +iconv             +path_extra        +timers
+channel           +insert_expand     +perl              +title
+cindent           +job               +persistent_undo   -toolbar
-clientserver      +jumplist          +popupwin          +user_commands
+clipboard         +keymap            +postscript        +vartabs
+cmdline_compl     +lambda            +printer           +vertsplit
+cmdline_hist      +langmap           +profile           +virtualedit
+cmdline_info      +libcall           -python            +visual
+comments          +linebreak         +python3           +visualextra
+conceal           +lispindent        +quickfix          +viminfo
+cryptv            +listcmds          +reltime           +vreplace
+cscope            +localmap          +rightleft         +wildignore
+cursorbind        +lua               +ruby              +wildmenu
+cursorshape       +menu              +scrollbind        +windows
+dialog_con        +mksession         +signs             +writebackup
+diff              +modify_fname      +smartindent       -X11
+digraphs          +mouse             -sound             -xfontset
-dnd               -mouseshape        +spell             -xim
-ebcdic            +mouse_dec         +startuptime       -xpm
+emacs_tags        -mouse_gpm         +statusline        -xsmp
+eval              -mouse_jsbterm     -sun_workshop      -xterm_clipboard
+ex_extra          +mouse_netterm     +syntax            -xterm_save
+extra_search      +mouse_sgr         +tag_binary
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang   -L. -fstack-protector-strong -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib  -L/usr/local/lib -o vim        -lncurses -liconv -lintl -framework AppKit  -L/usr/local/opt/lua/lib -llua5.3 -mmacosx-version-min=10.15 -fstack-protector-strong -L/usr/local/lib  -L/usr/local/Cellar/perl/5.30.1/lib/perl5/5.30.1/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc  -L/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m -framework CoreFoundation  -lruby.2.6

the warning generated by make regarding watchman might be unrelated to the issue according to some google research. however, i am clearly not familiar enough with this to say for sure. any help is much appreciated, and to clarify - this occurred after a clean install (everything was working prior with no obvious changes on the system).

i am not eve sure the troubleshooting steps performed are relevant here, since i can't tell by the error what the issue really is

undefinedTea commented 4 years ago

no idea why, but resolved via https://github.com/wincent/command-t/issues/341#issuecomment-522216390, specifically:

$ make clean
$ /usr/local/opt/ruby/bin/ruby extconf.rb 
$ make

using the specified system ruby (despite it being the same version and patch level) works. closing.