wincent / command-t

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

Ignoring ffi-1.9.18 because its extensions are not built. Try: gem pristine ffi --version 1.9.18 #327

Closed lencioni closed 2 years ago

lencioni commented 6 years ago

When I trigger Command-T for the first time in a session, I see this message

Ignoring ffi-1.9.18 because its extensions are not built. Try: gem pristine ffi --version 1.9.18

I've found some other folks who have had luck by doing things like

gem update bundler
gem install curb

but for me the problem persists. Any suggestions?

wincent commented 6 years ago

Command-T doesn't have any Gem dependencies, and isn't invoking Bundler in any way, so I am not sure where that is coming from. Does a similar thing happen if you just do :ruby puts 'hi'? Or maybe do anything that would force Ruby to evaluate the loadpath, like :ruby require 'ostruct'?

lencioni commented 6 years ago

No, neither of those things cause this to happen.

wincent commented 6 years ago

It seems unlikely that I'll be able to repro this. A google for "Ignoring ffi" "because its extensions are not built" turns up a bunch of hits with all sorts of combinations of Ruby environments (eg. chruby, rvm etc) and tools (almost none of which mention Command-T). This one seems pretty typical:

I came across this exact issue today - getting warnings like this for gems that weren't even installed!

... Well, it turns out the gems were installed - for a different ruby than the one I had set active with chruby (2.2.3 vs 2.3.1).

Switching to all the different rubies and running gem pristine --all on all of them solved the problem.

I don't think this is specific to Command-T, but if you could isolate the exact place in Command-T that is causing this to manifest I'd love to figure out a way to suppress it. I also wonder whether rebuilding Command-T (or Vim) might make it go away (perhaps something linked against a version of that Gem and since then got rebuilt against a different version).

jgplane commented 6 years ago

Are you using RVM? I had the same issue and noticed that if I run $ rvm use system before entering vim, then warning messages go away. It's not a permanent fix, but it might help you find the root cause.

lightcap commented 6 years ago

I just filed what may be a duplicate of this issue: #330

If I rvm into the version that command-t and vim were compiled against I don't get the issue at all. But any other version I use via rvm shows the same behavior. And it's different gems for each of the versions, too.

By way of example after issuing rvm use 2.4.1, then going to vim and triggering command-t, I'm getting:


Ignoring bindex-0.5.0 because its extensions are not built. Try: gem pristine bindex --version 0.5.0
Ignoring byebug-9.1.0 because its extensions are not built. Try: gem pristine byebug --version 9.1.0
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring ffi-1.9.18 because its extensions are not built. Try: gem pristine ffi --version 1.9.18
Ignoring gem-wrappers-1.3.1 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.3.1
Ignoring nio4r-2.1.0 because its extensions are not built. Try: gem pristine nio4r --version 2.1.0
Ignoring nokogiri-1.8.0 because its extensions are not built. Try: gem pristine nokogiri --version 1.8.0
Ignoring pg-0.21.0 because its extensions are not built. Try: gem pristine pg --version 0.21.0
Ignoring puma-3.10.0 because its extensions are not built. Try: gem pristine puma --version 3.10.0
Ignoring sqlite3-1.3.13 because its extensions are not built. Try: gem pristine sqlite3 --version 1.3.13
Ignoring unf_ext-0.0.7.4 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.4
Ignoring websocket-driver-0.6.5 because its extensions are not built. Try: gem pristine websocket-driver --version 0.6.5```

Whereas if I do `rvm use 2.5.0` and then open vim with `mvim .` and hit `<leader>-t` I get no errors.
lightcap commented 6 years ago

Are you using RVM? I had the same issue and noticed that if I run $ rvm use system before entering vim, then warning messages go away. It's not a permanent fix, but it might help you find the root cause.

I can also verify that using rvm use system results in no gem errors as above. So it seems that it's both the version compiled against and system that are fine. Any other version using rvm has at least one error.

Siemingfong commented 5 years ago

I have the same problem and solved. Try this: sudo gem pristine ffi

Pratiquea commented 4 years ago

I had the same issue. The following command worked for me:

rvm use system
vitata78 commented 4 years ago

I have the same problem and solved. Try this: sudo gem pristine ffi

I did this and got more problems now((

package configuration for libffi is not found
"xcrun clang -o conftest -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin20 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/backward -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib -L. -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.Internal.sdk/usr/local/lib   -arch arm64e -arch x86_64   -lruby.2.6   "
In file included from conftest.c:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
         ^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:10: note: did not find header 'config.h' in framework 'ruby' (loaded from '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks')
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */
designervoid commented 3 years ago

@vitata78 try this one https://github.com/ffi/ffi/issues/844#issuecomment-733957054

KushalBhanot commented 3 years ago

I have the same problem and solved. Try this: sudo gem pristine ffi

Thank you so much for the solution! 🪄 It worked just fine. I was stuck with this warning since yesterday.

127 commented 3 years ago

Had thes same issue with system ruby with rbenv installed after Big Sur 11.2.1 update. Fixing rbenv gem won't help. System gem needed a fix. Fixed with: rbenv use system && sudo gem pristine ffi

DevanshiGor commented 2 years ago

same problem with Xcode 13 - macOS 12.0 Beta unable to install cocoapods > 1.8.4 & sudo gem pristine ffi not working in my case.

Baneeishaque commented 2 years ago

Try this CocoaPods/CocoaPods#10103 (comment). Success on Monterey Beta 10 - Xcode 13 (Comment says it also success on Big Sur).

DevanshiGor commented 2 years ago

Thanks @Baneeishaque but not working in my case :(

AlexandreNascimento-SternTI commented 2 years ago

Run in de project folder

sudo gem install cocoapods to update cocoapods

sudo gem pristine ffi to install/update de package

pod repo update to update all repositories end dependencies

pod install to install all repositories end dependencies

run your app and be happy

wincent commented 2 years ago

Given the big rewrite for v6.0.x, I'm closing all older issues as there is unlikely to be anything significant happening on the 5-x-devel branch from here on[^patches]. Feedback issue for 6.0.x is here:

[^patches]: Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.