idb: idb-companion installation fails on Mac M1
Description
I’m working on a Mac Mini M1, already installed fb-idb, but when trying to brew install idb-companion it fails all the time with the following error:

Reproduction
brew install idb-companion / brew reinstall --build-from-source idb-companion
Solution
[OPTIONAL: Do you know what needs to be done to address this issue? Ideally, provide a pull request which fixes this issue.]
Additional Information
idbrevision: [FILL THIS OUT]
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 41
- Comments: 52 (1 by maintainers)
I managed to install idb_companion on a M1 Mac by installing x86_64 version of homebrew first and then using that to install idb_companion.
This worked well for me, but also requires a
pod installfor the fresh repo clone:I had success installing
idb-companioninside a x86 zsh and later installingfb-idbvia pip3.And then in a arm shell, I ran
No idea how it works, but it does 😃
Sources: https://gist.github.com/progrium/b286cd8c82ce0825b2eb3b0b3a0720a0 https://github.com/facebook/idb/issues/649#issuecomment-811746606
if you don’t want to install
brewwith x86_64 architecture,then install
idb,tested on Mac Mini 2020 M1
These steps works for me, however, only after I also ran
brew install protobuf grpc- otherwise, the command./idb_build.sh idb_companion build /opt/homebrewwould fail as the internal Xcode project relies on a couple of binaries installed. Unfortunately, it’s not too obvious fromxcodebuild’s output but I recommend opening the project in Xcode and try to build theidb_companionexecutable there.@jekoie I am not sure but I feel like GRPC and Protocol buffers is missing,
Could you please try,
This worked thanks
You are right, your solution solve my errors.
Build on M1 has been fixed on idb-companion v1.1.7. A arm64_monterey bottle was also published.
None of these solutions work for me on M1 😦
I was able to build off commit 776244655c06001953a94f3e38ec8cbd1c0dde9e on my M1 by installing gRPC and updating the
Podfiletags forpod 'Protobuf-C++'to match myprotocversion (which comes from conda on my system via thepip3 install fb-idbstep):updated Podfile:
and then
pod installand./idb_build.sh idb_companion build /opt/homebrewgave me an M1-native working Flipper.i failed to install by the version of
libprotoc 3.17.3, but working well by usinglibprotoc 3.19.3. Thanks a lot @kklobe!!Issue has been solve with commit d339206e071b7968dff798042330056281268bea.
this worked for me February 2022. To be sure its installed, run
which idbto show the path it is installed in@kklobe Thanks!
I’ve been able to build a Flipper for M1. This is how I did it:
desktop/scripts/build-release.tslibprotocversion is 3.18.1I got it working using @kklobe’s instructions but I had to run
pod installbefore./idb_build.sh idb_companion build /opt/homebrew. Thank you @kklobe!@keeprock yes (I am building Flipper locally with no source changes, just an Electron version bump). I just updated to the latest commit there and everything is still working.
@mxmzb – Does
brew install --HEAD idb-companionwork for you? If not, then a new version won’t help. The problem is that even though this issue (#649) was solved with d339206, M1 support was quickly broken again after. #747 tracks the new issue.We were having trouble getting IDB to run in the M1 environment without Rosetta. However it seems to work well if you set up Homebrew with Rosetta, and then run the install via that!