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

Getting LoadError while running make-demo.sh on M1 #16

Closed
kyeap opened this issue Oct 29, 2022 · 1 comment
Closed

Getting LoadError while running make-demo.sh on M1 #16

kyeap opened this issue Oct 29, 2022 · 1 comment

Comments

@kyeap
Copy link

kyeap commented Oct 29, 2022

Thank you for creating this repo that have seem to helped many.

Issue

getting following error while running ./make-demo.sh on M1

failed while trying to run /usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod install --repo-update --ansi

LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi.rb:5:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/ethon-0.15.0/lib/ethon.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:440:in `download_typhoeus_impl_async'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:372:in `download_and_save_with_retries_async'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:365:in `download_file_async'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:338:in `download_file'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:78:in `deprecated_local_podspecs'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:60:in `preheat_existing_files'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-core-1.11.3/lib/cocoapods-core/cdn_source.rb:257:in `update'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:144:in `block (3 levels) in update'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:143:in `block (2 levels) in update'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:142:in `each'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:142:in `block in update'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:140:in `open'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/sources_manager.rb:140:in `update'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:145:in `block in update_repositories'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:143:in `each'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:143:in `update_repositories'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:237:in `block in resolve_dependencies'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:236:in `resolve_dependencies'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `load'
/usr/local/Cellar/cocoapods/1.11.3/libexec/bin/pod:23:in `<main>'

How to reproduce/ I got the error

I probably missed some steps, since you said that you have ran it on M1 macs.

  1. clone repo
  2. run make-demo.sh

Tried

  • sudo gem install ffi as suggested in many SO answers
  • opening terminal with rosetta as described in this SO answer

Environment

  • Apple M1 Pro
  • CocoaPods : 1.11.3
  • Ruby : ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.x86_64-darwin21]
  • RubyGems : 3.0.3.1
  • Host : macOS 12.6
  • Xcode : 14.0.1
  • Git : git version 2.36.0

If it helps: The reason I am trying to get this repo running is because I am getting the "Module 'FirebaseCore' not found" error and saw your reply suggesting to run this repo to compare the pod files.

Thank you again!

@mikehardy
Copy link
Owner

FFI does not support the M1 architecture. That is FFI's fault, not this repo.

You'll have to modify how you do installs such that pod uses the x86_64 arch, and supporting that is out of scope for this repository.

Your problem is documented all over the internet if you search, here is a related stackoverflow:

https://stackoverflow.com/questions/66644365/cocoapods-on-m1-apple-silicon-fails-with-ffi-wrong-architecture

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

2 participants