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

Update ffi gem installation instructions #103008

Merged
merged 1 commit into from May 4, 2022

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented May 4, 2022

Update the outdated Rosetta arch -x86_64 instructions to instead use the preferred --enable-libffi-alloc flag when pod install fails on machines using the default system version of Ruby. I used this command to get pod install working on my new M1.
ffi/ffi#800

Already updated https://github.com/flutter/flutter/wiki/Developing-with-Flutter-on-Apple-Silicon

See #99195

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@jmagman jmagman self-assigned this May 4, 2022
@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 4, 2022
@jmagman jmagman added platform-ios iOS applications specifically platform-mac Building on or for macOS specifically labels May 4, 2022
@@ -371,7 +371,7 @@ class CocoaPods {
).send();
_logger.printError(
'Error: To set up CocoaPods for ARM macOS, run:\n'
' arch -x86_64 sudo gem install ffi\n',
' sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc\n',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the additional -- between "ffi" and "--enable-libffi-alloc" mean?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess they aren't parsing it as a flag but as a string positional parameter? I don't know why they did it like that, but the -- is needed.
ffi/ffi#800 (comment)

@@ -371,7 +371,7 @@ class CocoaPods {
).send();
_logger.printError(
'Error: To set up CocoaPods for ARM macOS, run:\n'
' arch -x86_64 sudo gem install ffi\n',
' sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc\n',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the user need to have a specific gem version to have this flag? Or is it old enough we don't have to worry?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they run this command they will get the newest version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-ios iOS applications specifically platform-mac Building on or for macOS specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants