wincent / command-t

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

Command-T on VIM won't load after compilation -- Mac High Sierra #343

Closed ghostmonk closed 5 years ago

ghostmonk commented 5 years ago

I'm on mac high sierra, and I cannot get command-t to work inside of VIM. I am using pathogen to load the plugin

  1. I used rvm use 2.7.3 to match the linked version in VIM.
  2. I used make clean before running ruby extconf.rb
  3. I verified that resulting Makefile was using a matched ruby version
  4. vim --version outputs +ruby/dyn but not + ruby
  5. vim version = VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 29 2017 18:37:46) Included patches: 1-503, 505-680, 682-1283
  6. OS = macOS High Sierra 10.13.6

There is a warning and then an error logged in the mkmf.log file after compilation.

The warning is as follows...

have_header: checking for st.h... -------------------- yes

"clang -E -I/usr/local/Cellar/ruby/2.5.1/include/ruby-2.5.0/x86_64-darwin16 -I/usr/local/Cellar/ruby/2.5.1/include/ruby-2.5.0/ruby/backward -I/usr/local/Cellar/ruby/2.5.1/include/ruby-2.5.0 -I.  -I/usr/local/opt/libyaml/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens  -fno-common -pipe  conftest.c -o conftest.i"
In file included from conftest.c:3:
/usr/local/Cellar/ruby/2.5.1/include/ruby-2.5.0/ruby/backward/st.h:2:2: warning: use "ruby/st.h" instead of bare "st.h" [-W#warnings]
#warning use "ruby/st.h" instead of bare "st.h"
 ^
1 warning generated.
/usr/local/Cellar/ruby/2.5.1/include/ruby-2.5.0/ruby/backward/st.h:2:2: warning: use "ruby/st.h" instead of bare "st.h" [-W#warnings]
#warning use "ruby/st.h" instead of bare "st.h"
 ^
1 warning generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <st.h>
/* end */

The error is right after and is as follows

--------------------

have_library: checking for pthread_create() in -lpthread... -------------------- yes

"clang -o conftest -I/usr/local/Cellar/ruby/2.5.1/include/ruby-2.5.0/x86_64-darwin16 -I/usr/local/Cellar/ruby/2.5.1/include/ruby-2.5.0/ruby/backward -I/usr/local/Cellar/ruby/2.5.1/include/ruby-2.5.0 -I.  -I/usr/local/opt/libyaml/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens  -fno-common -pipe conftest.c  -L. -L/usr/local/Cellar/ruby/2.5.1/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib     -lruby.2.5.1 -lpthread  -lpthread -ldl -lobjc "
conftest.c:13:57: error: use of undeclared identifier 'pthread_create'
int t(void) { void ((*volatile p)()); p = (void ((*)()))pthread_create; return !p; }
                                                        ^
1 error generated.
checked program was:
/* begin */
 1: #include "ruby.h"
 2:
 3: /*top*/
 4: extern int t(void);
 5: int main(int argc, char **argv)
 6: {
 7:   if (argc > 1000000) {
 8:     printf("%p", &t);
 9:   }
10:
11:   return 0;
12: }
13: int t(void) { void ((*volatile p)()); p = (void ((*)()))pthread_create; return !p; }
/* end */

Any help would be greatly appreciated.

sfsgagi commented 5 years ago

I think this is the same issue discussed (solved) here: #341 (upgrade Vim to 8.1 and this will lead to the 'normal' ruby version instead of +ruby/dyn)

You can also try:

rvm use system 
# from command-t folder:
rake clean
rake make
wincent commented 5 years ago

Seems this one should be resolved as per the previous comment, so I'm going to mark this one as closed.