protoc-gen-objcgrpc: program not found or is not executable

4,580 views
Skip to first unread message

Constantine Vassilev

unread,
Oct 1, 2015, 8:42:04 PM10/1/15
to grpc.io
I am using OS X 10.11 El Capitan
1) Installed MacPorts for  El Capitan
2) 3.0.0-alpha-4 from
3) downloaded and installed gRPC 0.11

$ git clone https://github.com/grpc/grpc.git

$ cd grpc

$ git submodule update --init

$ make 

$ [sudo] make install


Then tried to compile:
grpc/examples/objective-c/helloworld
with "pod install".

Got the following message:
protoc-gen-objcgrpc: program not found or is not executable
--objcgrpc_out: protoc-gen-objcgrpc: Plugin failed with status code 1.

What is wrong?

Constantine Vassilev

unread,
Oct 1, 2015, 11:09:16 PM10/1/15
to grpc.io
this is not working:
protoc -I #{src} --objc_out=#{dir} --objcgrpc_out=#{dir} #{src}/helloworld.proto
  
 
this is working:
BINDIR=/usr/local/bin
PROTOC=$BINDIR/protoc
PLUGIN=$BINDIR/grpc_objective_c_plugin
$PROTOC -I #{src} --plugin=protoc-gen-grpc=$PLUGIN --objc_out=#{dir} --grpc_out=#{dir} #{src}/helloworld.proto

something wrong with the
--objcgrpc_out
flag

Constantine Vassilev

unread,
Oct 2, 2015, 12:01:21 AM10/2/15
to grpc.io
Now compiling the project and testing 
with iPhone6+, iOS 9.1 now I have 
the following big issue:

1) testing with LTE is working.
2) testing with WiFi is not working.

With this communication failure I don't see how
gRPC is usable with iOS 9.1

Jorge Canizales

unread,
Oct 2, 2015, 3:47:47 PM10/2/15
to grpc.io
Hi Constantine, I'm investigating that problem. I'll keep you posted with what I find.

ni...@automatic.com

unread,
Oct 5, 2015, 2:20:22 AM10/5/15
to grpc.io
I fell over this when searching for the very same error message:

"protoc-gen-objcgrpc: program not found or is not executable"

However, I've not upgraded to El Capitan yet. Everything else is the same.

Cheers,

Nick.


On Thursday, October 1, 2015 at 5:42:04 PM UTC-7, Constantine Vassilev wrote:

Jorge Canizales

unread,
Oct 5, 2015, 6:55:51 PM10/5/15
to grpc.io, ni...@automatic.com
Hi,

what steps did you follow to install grpc? The recommended way for Macs is to use homebrew. If that's what you did, running "homebrew update" should make those problems disappear.

ni...@automatic.com

unread,
Oct 6, 2015, 6:58:58 PM10/6/15
to grpc.io, ni...@automatic.com
Yep - I was using brew.

grpc isn't on a --devel branch (although protoc is currently at 2.x for mainstream, 3.x for dev). I've used protoc for over a year in various configs - assume it's something interesting in my install state that wasn't upgradable or stuck.

The fix for anyone else getting into this particular 

- remove all packages via brew (brew uninstall protoc; brew uninstall grpc)
- run this: curl -fsSL https://goo.gl/getgrpc | bash -


Cheers,


Nick

Jorge Canizales

unread,
Oct 26, 2015, 8:57:20 PM10/26/15
to grpc.io
Hi Constantine,

I've tested with an iPhone 6s on both iOS 9.0 and 9.1, and could make RPCs via WiFi without issue. I'd love to help you debug this issue, though. Could you describe in more detail the tests you're running?

Thanks,
Jorge

tboy...@gmail.com

unread,
Jul 13, 2016, 8:44:55 PM7/13/16
to grpc.io, ni...@automatic.com
Possible bug in the 0.15.0 brew formula for gRPC.

After installing gRPC with `curl -fsSL https://goo.gl/getgrpc | bash -`, using protoc with objective-c output (via pod install of a sample project) gave the error:

```
protoc-gen-objcgrpc: program not found or is not executable
```

Seems that HomeBrew did not properly symlink the `protoc-gen-objcgrpc` file for grpc.

Here's how I fixed it:

```
cd /usr/local/Cellar/grpc/0.15.0/bin/
ln -s grpc_objective_c_plugin protoc-gen-objcgrpc
brew unlink grpc && brew link grpc
```

The above steps may also be necessary for other language plugins.

Hope that helps someone.
Best,
Tom

tboy...@gmail.com

unread,
Jul 18, 2016, 6:58:58 PM7/18/16
to grpc.io, ni...@automatic.com, tboy...@gmail.com
Maybe better to pass `--plugin=protoc-gen-grpc=/usr/local/bin/grpc_objective_c_plugin` or `--plugin=protoc-gen-objcgrpc=/usr/local/bin/grpc_objective_c_plugin` to `protoc` command... I modified the sample project podspec to do this.

Seems that protoc expects plugins for languages to have a certain name, but Homebrew installs those plugins with a different name... go figure.

-Tom

Makarand Dharmapurikar

unread,
Jul 18, 2016, 8:00:52 PM7/18/16
to tboy...@gmail.com, grpc.io, ni...@automatic.com
ObjC gRPC never released version 0.15. We will release version 1.0 soon. Recommended way is now to get Protoc and the plugin directly from Cocoapods. 


--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/132d74e6-c620-4b39-a64c-20604d9fe51d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages