Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lencioni opened this issue Feb 1, 2018 · 17 comments

Comments

@lencioni
Copy link
Contributor

lencioni commented Feb 1, 2018

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
Copy link
Owner

wincent commented Feb 3, 2018

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
Copy link
Contributor Author

lencioni commented Feb 5, 2018

No, neither of those things cause this to happen.

@wincent
Copy link
Owner

wincent commented Feb 6, 2018

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
Copy link

jgplane commented Apr 9, 2018

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
Copy link

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
Copy link

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
Copy link

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

@Pratiquea
Copy link

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

rvm use system

@vitata78
Copy link

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
Copy link

@vitata78 try this one ffi/ffi#844 (comment)

@KushalBhanot
Copy link

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
Copy link

127 commented Feb 24, 2021

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
Copy link

DevanshiGor commented Oct 5, 2021

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
Copy link

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

@DevanshiGor
Copy link

Thanks @Baneeishaque but not working in my case :(

@AlexandreNascimento-SternTI

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
Copy link
Owner

wincent commented Aug 26, 2022

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 on1. Feedback issue for 6.0.x is here:

Footnotes

  1. Patches and PRs would be welcome, but my personal efforts are going to be directed towards main.

@wincent wincent closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests