Open PavanAppannagari opened 4 years ago
/bin/sh: line 1: protoc: command not found
This implies that when xcode is trying to run protoc it can't find the binary. Can you make sure its installed to a location that'll be picked up by xcode i.e. on your PATH?
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/idb_companion': '/usr/local/bin/idb_companion'
The idb client relies on having the idb companion installed for list-targets to work correctly.
Thank you very much for the response.How can I explicitly instruct xcode to find the binary? I ensured protoc-3.11.4/bin is included in PATH environment variable and I am successfully able to run protoc however xcode is having difficulty picking it up?. I also tried explicitly including path environment as a run argument in edit scheme window but it didn't help.Appreciate your input
Thanks
It seems the idb_companion
relies on the protoc
command.
I encountered the same issue and resolved it by installing the protobuf
on my mac.
brew install protobuf
We use GitHub Issues for bugs.
--- Please use this template, and delete everything above this line before submitting your issue ---
Description
[FILL THIS OUT: Explain what you did, what you expected to happen, and what actually happens.] Hello, I don't have the luxury to setup idb-companion using Homebrew and I am running into issues while attempting to setup idb-companion from source and it fails with the following messages in logs while building the target of idbGRPC of project idb_companion with configuration Debug. I managed to install just the idb portion using pip.Specifically I don't understand why I am seeing " /bin/sh: line 1: protoc: command not found" The command protoc passes without any issues from the command line. Appreciate if anyone can share precise steps including settingup gRPC dependencies and validating gRPC dependencies setup.I think pip did install something related to grpc while installing idb.
*RuleScriptExecution /Users/zkpu10i/Desktop/fbidb/idb-master/proto/idb.proto normal x86_64 (in target 'idbGRPC' from project 'idb_companion') cd /Users/zkpu10i/Desktop/fbidb/idb-master /bin/sh -c #\ Generate\ grpc\ code\ from\ .proto\ protoc\ --proto_path=\$INPUT_FILE_DIR\ --cpp_out=\$DERIVED_FILE_DIR\ --grpc_out=\$DERIVED_FILE_DIR\ --plugin=protoc-gen-grpc=/usr/local/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 1: protoc: command not found cp: /Users/zkpu10i/Library/Developer/Xcode/DerivedData/idb_companion-dciexygzycqqocefmewrsrnrjpox/Build/Intermediates.noindex/idb_companion.build/Debug/idbGRPC.build/DerivedSources/*.h: No such file or directory Command RuleScriptExecution failed with a nonzero exit code**
On a side note when I run idb list-targets,I see the command fails with following exception appreciate if you can help me resolve this issue 2020-03-24 15:42:45,484 [ERROR] - root - Exception thrown in main Traceback (most recent call last): File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/cli/main.py", line 215, in gen_main await root_command.run(args) File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/common/command.py", line 87, in run return await self._get_subcommand_for_args(args).run(args) File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/cli/commands/base.py", line 49, in run await self._run_impl(args) File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/cli/commands/base.py", line 79, in _run_impl await self.run_with_client(args=args, client=client) File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/cli/commands/list_targets.py", line 27, in run_with_client targets = await client.list_targets() File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/common/logging.py", line 113, in _async_wrapper raise self.translate_exception(ex) File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/common/logging.py", line 88, in _async_wrapper value = await function(*args, kwargs) File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/client/grpc.py", line 157, in func_wrapper return await func(*args, *kwargs) File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/client/grpc.py", line 1168, in list_targets await self.spawn_notifier() File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/client/grpc.py", line 751, in spawn_notifier await companion_spawner.spawn_notifier() File "/Users/spongebob/Library/Python/3.7/lib/python/site-packages/idb/common/companion_spawner.py", line 94, in spawn_notifier cmd, stdout=asyncio.subprocess.PIPE, stderr=log_file File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/subprocess.py", line 217, in create_subprocess_exec stderr=stderr, kwds) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 1533, in subprocess_exec bufsize, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/unix_events.py", line 190, in _make_subprocess_transport kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_subprocess.py", line 37, in init stderr=stderr, bufsize=bufsize, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/unix_events.py", line 763, in _start universal_newlines=False, bufsize=bufsize, kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in init restore_signals, start_new_session) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/idb_companion': '/usr/local/bin/idb_companion'
Reproduction
[FILL THIS OUT: How can we reproduce the bug? Provide logs for the client and server.]
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]