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

ffi issue when running pod repo update or pod install on macOS Ventura #11627

Closed
nastasiupta opened this issue Oct 26, 2022 · 19 comments
Closed

Comments

@nastasiupta
Copy link

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

I updated to macOS Ventura, I try to pod repo update and I get those errors and the Terminal is stuck. I tried to reinstall CocoaPods but I have the same issue. Any fix for this? I have the last version CocoaPods.

@raid5
Copy link

raid5 commented Oct 26, 2022

I updated to macOS 13.0 Ventura yesterday as well and am seeing the same thing.

@DargonLee
Copy link

me too

@keyvan-montazeri
Copy link

keyvan-montazeri commented Oct 27, 2022

Seems after upgrading MacOS to v13, gem will use universal-darwin22 to compile files. If you check /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ there is only universal-darwin21 available.
So, the solution is simple, try to create a link for universal-darwin22 then install ffi.

On terminal:

cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/

sudo ln -sf universal-darwin21 universal-darwin22

sudo gem install ffi

@nastasiupta
Copy link
Author

@keyvan-montazeri for second command (sudo ln -sf universal-darwin21 universal-darwin22) i get this error: ln: universal-darwin22: Operation not permitted

@altunog
Copy link

altunog commented Oct 27, 2022

same here

@spWang
Copy link

spWang commented Oct 28, 2022

➜ ruby-2.6.0 sudo ln -sf universal-darwin21 universal-darwin22
ln: universal-darwin22: Operation not permitted

me too @keyvan-montazeri

@carlnx
Copy link

carlnx commented Oct 28, 2022

Seems after upgrading the MacOS to v13, gem will use universal-darwin22 to compile files. If you check /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ there is only universal-darwin21 availble. So, the solution is simple, try to create a link for universal-darwin22 then install ffi.

On terminal:

cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/

sudo ln -sf universal-darwin21 universal-darwin22

sudo gem install ffi

Worked! Thanks. Need to allow Terminal to modify apps in Settings!

image

@altunog
Copy link

altunog commented Oct 28, 2022

After that setting the terminal issue solved and commands worked. Thanks! @carlnx & @keyvan-montazeri

@nastasiupta
Copy link
Author

nastasiupta commented Oct 31, 2022

Thanks @carlnx, solved the issue I had before, but I still have an issue for the last command.

When running
sudo gem install ffi

I still get this:
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20221031-59619-10xfcf6.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

@keyvan-montazeri
Copy link

keyvan-montazeri commented Oct 31, 2022

@nastasiupta have you ran follow commands after upgrading to MacOSv13? if not, try them, it may solve your problem.

xcode-select --install
sudo xcodebuild -license

@nastasiupta
Copy link
Author

@keyvan-montazeri
xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates

sudo xcodebuild -license
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

:/

@keyvan-montazeri
Copy link

keyvan-montazeri commented Oct 31, 2022

@nastasiupta
Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Then sudo xcodebuild -license

@nastasiupta
Copy link
Author

@keyvan-montazeri thanks, solved that issue, I could run all 3 commands,
Right now when I use pod repo update I get this:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:311:in to_specs': Could not find 'json' (>= 1.5.1) among 45 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/Users/nastasiupta/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/usr/local/Cellar/cocoapods/1.11.3/libexec:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0', execute gem envfor more information from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1449:inblock in activate_dependencies'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in each' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in activate_dependencies'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in activate' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1452:in block in activate_dependencies'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in each' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in activate_dependencies'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in activate' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1452:in block in activate_dependencies'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in each' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in activate_dependencies'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in activate' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:304:in block in activate_bin_path'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:303:in synchronize' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:303:in activate_bin_path'
from /usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `

'
:/

@keyvan-montazeri
Copy link

@nastasiupta you need to create a new issue on ffi repo.

@jigardave8
Copy link

just change the Xcode compatible version in xcode Project from 14 to 13 . it worked for me..

@maisonhai3
Copy link

maisonhai3 commented Jan 16, 2023

I got the same error.

My case is:

  • We were developing with Unity.
  • In Unity Editor, we updated from Firebase 9.0.0 to 10.3.0.
  • In Unity Editor, I built to XCode project.
  • Unity said the build process failed due to "unable to install cocopods".
  • Then, I opened the XCode project folder in a terminal.
  • Run pod install, where it said I had "its extensions are not built": ffi-1.15.5 and json-1.8.6.
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":
  In Podfile:
    Firebase/Auth (= 10.3.0)

None of your spec sources contain a spec satisfying the dependency: `Firebase/Auth (= 10.3.0)`.
  • I run pod repo update but it failed, too. I was unable to update ffi and his friend.
    LoadError - dlopen(/Users/maihai/.gem/ruby/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle, 0x0009): tried: '/Users/maihai/.gem/ruby/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
  • And, gem suggest to run gem pristine ffi --version 1.15.5.
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
  • I had to add sudo to its suggestion: sudo gem pristine ffi --version 1.15.5.

After updating the pod successfully, I run pod install again, and everything became okay.

@abinhho
Copy link

abinhho commented Apr 6, 2023

Mac M1+. This commands fixed the issue.

sudo arch -x86_64 gem install ffi
pod deintegrate
arch -x86_64 pod install

@TommyLeong
Copy link

Not exactly what I've did to made it work, I've tried so many things. Here's a few things I've tried:

Im writing them in sequence to replicate my success steps as much as possible.

1st:

  • Ran the command highlighted here
  • Grant terminal permission in the Privacy Settings

Seems after upgrading the MacOS to v13, gem will use universal-darwin22 to compile files. If you check /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ there is only universal-darwin21 availble. So, the solution is simple, try to create a link for universal-darwin22 then install ffi.
On terminal:

cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/

sudo ln -sf universal-darwin21 universal-darwin22

sudo gem install ffi

Worked! Thanks. Need to allow Terminal to modify apps in Settings!

image

2rd:
I also executed the following command when the error of Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5 keeps appearing.

sudo gem pristine ffi --version 1.15.5

3rd:

  • Ran only the 1st and 3rd command.
  • Note: I did not perform pod deintegrate

Mac M1+. This commands fixed the issue.

sudo arch -x86_64 gem install ffi
pod deintegrate
arch -x86_64 pod install

grahammendick added a commit to grahammendick/navigation that referenced this issue Jun 24, 2023
The init command wouldn't work - apparently a bug with the macos ventura udpate, see CocoaPods/CocoaPods#11627 (comment)
@amosgyamfi
Copy link

Seems after upgrading MacOS to v13, gem will use universal-darwin22 to compile files. If you check /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ there is only universal-darwin21 available. So, the solution is simple, try to create a link for universal-darwin22 then install ffi.

On terminal:

cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/

sudo ln -sf universal-darwin21 universal-darwin22

sudo gem install ffi

I have been trying to fix this for more than 3 weeks. It works. Thanks.

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