question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Emulated x86_64" warning doesn't go away (M1 mac)

See original GitHub issue

Description

Bootstrapped a new react-native project and got the following warning on pod install:

[!] Do not use "pod install" from inside Rosetta2 (x86_64 emulation on arm64).

[!]  - Emulated x86_64 is slower than native arm64

[!]  - May result in mixed architectures in rubygems (eg: ffi_c.bundle files may be x86_64 with an arm64 interpreter)

[!] Run "env /usr/bin/arch -arm64 /bin/bash --login" then try again.

I’m running on zsh (M1 macOS 12.1), so I ran the following but the warning remained:

env /usr/bin/arch -arm64 /bin/zsh --login
cd ios
pod install

Previously (on RN 0.66) I had run the following commands to install x86_64 ffi, which allowed me to successfully run pod install on M1. Other than that, I’m working on a fresh workstation.

arch -x86_64 gem install --user-install ffi -- --enable-libffi-alloc     

Version

0.67.1

Output of npx react-native info

System: OS: macOS 12.1 CPU: (10) arm64 Apple M1 Pro Memory: 103.91 MB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.2/bin/yarn npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm Watchman: 2022.01.17.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.1 => 0.67.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

npx react-native init foo --template react-native-template-typescript
cd foo/ios
pod install

Snack, code example, screenshot, or link to a repository

No response

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:20
  • Comments:23

github_iconTop GitHub Comments

115reactions
ridafkihcommented, Feb 18, 2022

What worked for me was installing cocoapods through brew, rather than gem.

sudo gem uninstall cocoapods
arch -arm64 brew install cocoapods

After that, you can navigate over to the ios/ directory in your project, and install away.

pod install

That should get you up and running on your M1 device of choice! Enjoy!

5reactions
brownieboycommented, Feb 19, 2022

What worked for me was installing cocoapods through brew, rather than gem.

sudo gem uninstall cocoapods
arch -arm64 brew install cocoapods

I got a “pod command not found” error after installing cocoapods via brew.

I ran brew link --overwrite cocoapods to fix that. (The brew install process does actually tell you to do that, but I missed it!)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't build to simulator on Apple Silicon
It only popped up when trying to build on my new M1 MacBook Air and Xcode 12. I've tried everything that's been reported...
Read more >
Xcode error 'building for iOS Simulator, but linking in dylib built ...
The first error that I encountered without making any changes (but moved from Intel Mac to M1 Mac) is like below. building for...
Read more >
My Journey to Setup Android Emulator for M1 MacBook Pro
My first impression of setting up Android App Development on an M1 MacBook Pro is not as positive as I hope to get...
Read more >
Why new Macs break your Docker build, and how to fix it
Solving problem with CPU emulation, some of the downsides of this solution, and future ... On a Mac Mini M1, however, things go...
Read more >
Running X86 Windows in VMWare Fusion in Macbook Pro M1
I've setup ubuntu x86 with UTM in my mac m1 setup...it is too slow with UTM. ... a virtualiser and an emulator; even...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found