Skip to content

Work around ffi "symbol not found" error from CocoaPods on ARM Macs with x86_64 ffi gem #70796

@jmagman

Description

@jmagman

Running CocoaPods in Rosetta on an ARM mac to embed plugins (arch -x86_64 pod install) fails:

LoadError - dlsym(0x7fbbeb6837d0, Init_ffi_c): symbol not found - /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/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.13.1/lib/ffi.rb:6:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi.rb:3:in `<top (required)>'

The workaround is to install the ffi gem in x86:

arch -x86_64 sudo gem install ffi

Figure out how to install this from flutter (prompt sudo) without making bundler people mad, or at least add a doctor check similar to the one where CocoaPods isn't installed and prompt them to run that command.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listplatform-host-armBuilding on an ARM-based platformplatform-iosiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions