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

Cannot build idb_companion in Xcode 15.0 on the current master (2022-09-19) #848

Open
mforys opened this issue Sep 19, 2023 · 4 comments
Open

Comments

@mforys
Copy link

mforys commented Sep 19, 2023

Description

I cannot build idb_companion in Xcode 15.0 on the current master (2022-09-19).

Reproduction

RuleScriptExecution /Users/marek/Library/Developer/Xcode/DerivedData/idb_companion-egamwafdjrhfidaompecbbuqtunn/Build/Intermediates.noindex/idb_companion.build/Debug/IDBGRPCSwift.build/DerivedSources/idb.pb.swift /Users/marek/Library/Developer/Xcode/DerivedData/idb_companion-egamwafdjrhfidaompecbbuqtunn/Build/Intermediates.noindex/idb_companion.build/Debug/IDBGRPCSwift.build/DerivedSources/idb.grpc.swift /Users/marek/_repos/_originals/idb/proto/idb.proto normal undefined_arch (in target 'IDBGRPCSwift' from project 'idb_companion')
    cd /Users/marek/_repos/_originals/idb
    /bin/sh -c \#\ Generate\ grpc\ code\ from\ .proto'
'PATH\=\$PATH:/opt/homebrew/bin/:/usr/local/bin:\$HOME/homebrew/bin/'
''
'GRPC_PACKAGE_DIR\=\$\{BUILD_DIR%Build/\*\}SourcePackages/checkouts/grpc-swift'
''
'protoc\ \\'
'\ \ --proto_path\=\$INPUT_FILE_DIR\ \\'
'\ \ --swift_out\=\$DERIVED_FILE_DIR\ \\'
'\ \ --grpc-swift_out\=\$DERIVED_FILE_DIR\ \\'
'\ \ --grpc-swift_opt\=Visibility\=Public\ \\'
'\ \ --swift_opt\=Visibility\=Public\ \\'
'\ \ --plugin\=protoc-gen-grpc-swift\=\$GRPC_PACKAGE_DIR/.build/release/protoc-gen-grpc-swift\ \\'
'\ \ --plugin\=protoc-gen-swift\=\$GRPC_PACKAGE_DIR/.build/release/protoc-gen-swift\ \\'
'\ \ \$INPUT_FILE_PATH'
'

/bin/sh: line 6: protoc: command not found
Command RuleScriptExecution failed with a nonzero exit code

Additional Information

  • idb revision:
commit fdb96ec46b9826762adfe0b34b5b1a892ee4ac6d (HEAD -> main, origin/main, origin/HEAD)
Author: Endre Fejes <[email protected]>
Date:   Mon Sep 18 02:18:52 2023 -0700

    Add iPhone 14* and 15* devices

@mforys mforys changed the title Cannot build idb_companion in Xcode 15.0 Cannot build idb_companion in Xcode 15.0 on the current master (2022-09-19) Sep 19, 2023
@mforys
Copy link
Author

mforys commented Sep 19, 2023

Actually, when I follow the documentation even this step fails as there is no Podfile ...

➜  idb git:(main) pod install
[!] No `Podfile' found in the project directory.
➜  idb git:(main) 

@answer-huang
Copy link

@mforys you should install protoc first.

@JJdeGroot
Copy link

JJdeGroot commented Sep 26, 2023

Similar issue here,

./idb_build.sh idb_companion build /Users/JJ/Downloads
/bin/sh: line 6: protoc: command not found
Command RuleScriptExecution failed with a nonzero exit code

note: Run script build phase 'Build Shimulators' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'FBControlCore' from project 'FBSimulatorControl')
/Users/jj/Github/idb/idb_companion.xcodeproj: warning: DEFINES_MODULE was set, but no umbrella header could be found to generate the module map (in target 'IDBGRPCSwift' from project 'idb_companion')
** BUILD FAILED **


The following build commands failed:
	RuleScriptExecution /Users/jj/Github/idb/build/Build/Intermediates.noindex/idb_companion.build/Release/IDBGRPCSwift.build/DerivedSources/idb.pb.swift /Users/jj/Github/idb/build/Build/Intermediates.noindex/idb_companion.build/Release/IDBGRPCSwift.build/DerivedSources/idb.grpc.swift /Users/jj/Github/idb/proto/idb.proto normal undefined_arch (in target 'IDBGRPCSwift' from project 'idb_companion')

Fixed by re-installing protobuf and force symlinking it.

brew install protobuf
brew link --overwrite protobuf
which protoc
/opt/homebrew/bin/protoc

Re-running the idb_build.sh works now.

Compiling using idb_companion.xcworkspace works now too!

@stoefln
Copy link

stoefln commented Jan 31, 2024

This might be slightly off-topic, but I didn't find any information on this elsewhere:
If we build idb-companion, how can we "use" it?
Do I need to tell the python client somehow to use the built version rather than the official version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants