-
Notifications
You must be signed in to change notification settings - Fork 436
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
idb-companion installation fails on Mac M1 #649
Comments
Same error on my Mac M1 neither. |
I also faced the same error. |
yup |
Same here |
same |
1 similar comment
same |
Any way to fix this issue? |
same here |
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.
|
@pwszebor Thanks ! |
Is this really a good solution? Is it possible to have both the arm version of brew and x86 version at the same time and if it is what possible side effects could that have? |
Wondering the same thing, is it possible to run two versions of homebrew side by side without any issues? |
No issues so far for me. The arm64 version is still the default, "which brew" points at it, it's installed in /opt/homebrew as opposed to Intel version which is in /usr/local/Homebrew. |
I tried to install the x86_64 version of homebrew after I had the arm64 version already installed and the x86 version became the default one unlike what @pwszebor said. Guess I'll wait for an arm64 version of idb. |
same here |
got rosetta homebrew setup, it just fails at a brew-cask step now because apparently that package is gone ... script is outdated ... should be |
same here |
Same Here |
Same Here ! |
Any updates on this? |
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! |
Yes, @Ashoat . You are totally right. We need to use this workaround for now. |
I had success installing
And then in a arm shell, I ran
No idea how it works, but it does :) Sources: |
if you don't want to install $ arch # arm64
$ git clone [email protected]:facebook/idb.git
$ cd idb
$ ./idb_build.sh idb_companion build /opt/homebrew
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/FBDeviceControl.framework/Versions/A/Resources/libShimulator.dylib
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/FBSimulatorControl.framework/Versions/A/Resources/libShimulator.dylib
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/XCTestBootstrap.framework/Versions/A/Resources/libShimulator.dylib
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/FBControlCore.framework/Versions/A/Resources/libShimulator.dylib
$ idb_companion --version
> {"build_time":"12:32:07","build_date":"Oct 10 2021"} then install $ pip3 install fb-idb
$ idb list-targets
> iPad (9th generation) ..... tested on Mac Mini 2020 M1 |
This worked well for me, but also requires a $ arch # arm64
$ git clone [email protected]:facebook/idb.git
$ cd idb
$ pod install
$ ./idb_build.sh idb_companion build /opt/homebrew
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/FBDeviceControl.framework/Versions/A/Resources/libShimulator.dylib
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/FBSimulatorControl.framework/Versions/A/Resources/libShimulator.dylib
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/XCTestBootstrap.framework/Versions/A/Resources/libShimulator.dylib
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/FBControlCore.framework/Versions/A/Resources/libShimulator.dylib
$ idb_companion --version
> {"build_time":"12:32:07","build_date":"Oct 10 2021"} |
I follow your tips is failed? jett@jmac idb % ./idb_build.sh idb_companion build /opt/homebrew
using target idb_companion
using command build
using output directory /opt/homebrew
objc[32108]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1f35afb78) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1149302c8). One of the two will be used. Which one is undefined.
objc[32108]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1f35afbc8) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x114930318). One of the two will be used. Which one is undefined.
Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace idb_companion.xcworkspace -scheme idb_companion -sdk macosx -derivedDataPath build build
User defaults from command line:
IDEDerivedDataPathOverride = /Users/jett/idb/build
IDEPackageSupportUseBuiltinSCM = YES
Build settings from command line:
SDKROOT = macosx11.3
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Using build description from disk
note: Build preparation complete
Libtool /Users/jett/idb/build/Build/Products/Debug/gRPC-C++/libgRPC-C++.a normal (in target 'gRPC-C++' from project 'Pods')
cd /Users/jett/idb/Pods
export MACOSX_DEPLOYMENT_TARGET\=10.10
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only arm64 -D -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -L/Users/jett/idb/build/Build/Products/Debug/gRPC-C++ -filelist /Users/jett/idb/build/Build/Intermediates.noindex/Pods.build/Debug/gRPC-C++.build/Objects-normal/arm64/gRPC-C++.LinkFileList -dependency_info /Users/jett/idb/build/Build/Intermediates.noindex/Pods.build/Debug/gRPC-C++.build/Objects-normal/arm64/gRPC-C++_libtool_dependency_info.dat -o /Users/jett/idb/build/Build/Products/Debug/gRPC-C++/libgRPC-C++.a
PhaseScriptExecution Build\ Shimulators /Users/jett/idb/build/Build/Intermediates.noindex/FBSimulatorControl.build/Debug/FBControlCore.build/Script-71B9E0DA268C68A700D40A91.sh (in target 'FBControlCore' from project 'FBSimulatorControl')
cd /Users/jett/idb
/bin/sh -c /Users/jett/idb/build/Build/Intermediates.noindex/FBSimulatorControl.build/Debug/FBControlCore.build/Script-71B9E0DA268C68A700D40A91.sh
+ build_shim Shimulator /Users/jett/idb/Shims/Binaries
+ local shim_to_build=Shimulator
+ local shim_destination=/Users/jett/idb/Shims/Binaries
+ local build_log_mirror=/Users/jett/idb/build/Build/Intermediates.noindex/FBSimulatorControl.build/Debug/FBControlCore.build/Shimulator-build.log
+ xcodebuild -project Shims/Shimulator/Shimulator.xcodeproj -scheme Shimulator build
+ tee /Users/jett/idb/build/Build/Intermediates.noindex/FBSimulatorControl.build/Debug/FBControlCore.build/Shimulator-build.log
RuleScriptExecution /Users/jett/idb/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.pb.h /Users/jett/idb/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.pb.cc /Users/jett/idb/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.grpc.pb.h /Users/jett/idb/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.grpc.pb.cc /Users/jett/idb/proto/idb.proto normal arm64 (in target 'idbGRPC' from project 'idb_companion')
cd /Users/jett/idb
/bin/sh -c \#\ Generate\ grpc\ code\ from\ .proto'
'PATH\=\$PATH:/opt/homebrew/bin/:/usr/local/bin'
''
'protoc\ --proto_path\=\$INPUT_FILE_DIR\ --cpp_out\=\$DERIVED_FILE_DIR\ --grpc_out\=\$DERIVED_FILE_DIR\ --plugin\=protoc-gen-grpc\=\$\(brew\ --prefix\)/bin/grpc_cpp_plugin\ \$INPUT_FILE_PATH'
''
'\#\ Copy\ headers'
'mkdir\ -p\ \$\{BUILT_PRODUCTS_DIR\}/\$\{PRODUCT_NAME\}'
'cp\ -a\ \$\{DERIVED_FILES_DIR\}/\*.h\ \$\{BUILT_PRODUCTS_DIR\}/\$\{PRODUCT_NAME\}'
'
/bin/sh: line 3: protoc: command not found
cp: /Users/jett/idb/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/*.h: No such file or directory
Command RuleScriptExecution failed with a nonzero exit code
** BUILD FAILED **
The following build commands failed:
RuleScriptExecution /Users/jett/idb/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.pb.h /Users/jett/idb/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.pb.cc /Users/jett/idb/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.grpc.pb.h /Users/jett/idb/build/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/idb.grpc.pb.cc /Users/jett/idb/proto/idb.proto normal arm64
(1 failure) |
@jekoie I am not sure but I feel like GRPC and Protocol buffers is missing,
Could you please try, $ brew install protobuf
$ brew install grpc |
thx |
I've followed these instructions but get the following compile error during the build:
Looks like there's a dep I'm not getting? System is M1 Mac mini on macOS 12 |
I am not one of the maintainers but I think the header file has problem FBDapServerCommands.h#L18. It looks very normal to get that error @DShepherd I think one of the tags should work, could you please try? $ git clone [email protected]:facebook/idb.git
$ cd idb
$ git checkout v1.1.5
$ ./idb_build.sh idb_companion build /opt/homebrew
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/FBDeviceControl.framework/Versions/A/Resources/libShimulator.dylib
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/FBSimulatorControl.framework/Versions/A/Resources/libShimulator.dylib
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/XCTestBootstrap.framework/Versions/A/Resources/libShimulator.dylib
$ codesign --force --sign - --timestamp=none /opt/homebrew/Frameworks/FBControlCore.framework/Versions/A/Resources/libShimulator.dylib
$ idb_companion --version |
I have the same issue (M1 Pro) as @DShepherd.
I also tried import, but it didn't help.
|
Issue has been solve with commit d339206. |
Thanks! I successfully built with the latest commit. |
This worked thanks |
Can we release a new version with the commit that fixes this, please? |
I was able to build off commit 7762446 on my M1 by installing gRPC and updating the
updated Podfile:
and then |
@kklobe Tried your approach - didn't work for me for some reason. And I've tried my best. Does your Flipper run on Apple arch now? |
@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. |
Thanks @plasticrake, I updated my comment to make the |
i failed to install by the version of |
@kklobe Thanks! I've been able to build a Flipper for M1. This is how I did it:
|
this worked for me February 2022. |
None of these solutions work for me on M1 :( |
These steps works for me, however, only after I also ran |
@fortmarek steps are working for me. |
This worked for me as well. |
Build on M1 has been fixed on idb-companion v1.1.7. A arm64_monterey bottle was also published. |
best way to do it: |
I also had this problem on the Mac M1 Pro. For me, I am using Homebrew to install the Install
Symlink the Install Check the Symlink the |
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
idb
revision: [FILL THIS OUT]The text was updated successfully, but these errors were encountered: