Fork me on GitHub

Project Notes

Installing gRPC for MacOSX

Getting gRPC running under MacOSX

:arrow_forward: return to the Catalog

Notes

To use gRPC, we need:

  • gRPC runtime for the language(s) used
  • depending on your chosen language, may need the protocol buffers compiler

This should be simplified in future releases.

Install protocol buffer compiler

There are at least two methods:

brew

I use homebrew to manage most of my software installation, so I’ll try that first.

$ brew update  # make sure brew is up to date
$ brew tap grpc/grpc
==> Tapping grpc/grpc
Cloning into '/usr/local/Library/Taps/grpc/homebrew-grpc'...
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 10 (delta 0), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (10/10), done.
Checking connectivity... done.
Tapped 2 formulae (37 files, 43K)
$ brew install --without-libgrpc grpc
[...]
Editor support and examples have been installed to:
  /usr/local/Cellar/google-protobuf/3.0.0-beta-2/share/doc/google-protobuf
==> Summary
  /usr/local/Cellar/google-protobuf/3.0.0-beta-2: 330 files, 16.2M, built in 2 minutes 17 seconds
==> Installing grpc/grpc/grpc
==> Downloading https://github.com/grpc/grpc/archive/release-0_13_0.tar.gz
==> Downloading from https://codeload.github.com/grpc/grpc/tar.gz/release-0_13_0
######################################################################## 100.0%
==> make install-plugins prefix=/usr/local/Cellar/grpc/0.13.0
  /usr/local/Cellar/grpc/0.13.0: 9 files, 281K, built in 21 seconds
$ protoc --version
libprotoc 3.0.0

So far, so good..

And then later I needed the gRPC C core library (i.e. shouldn’t have used –without-libgrpc), so re-installed:

$ brew uninstall grpc
[...]
$ brew install grpc
[...]
$ protoc --version
libprotoc 3.0.0
$ which grpc_cpp_plugin
/usr/local/bin/grpc_cpp_plugin
$ ls /usr/local/include/grpc*
/usr/local/include/grpc:
byte_buffer.h   census.h    grpc.h      grpc_zookeeper.h  status.h
byte_buffer_reader.h  compression.h   grpc_security.h   impl      support

/usr/local/include/grpc++:
channel.h   completion_queue.h  generic     impl      server.h    server_context.h
client_context.h  create_channel.h  grpc++.h    security    server_builder.h  support

Better!

Credits and References

About LCK#54 gRPCMacOSXMessaging
Project Source on GitHub Return to the Project Catalog

This page is a web-friendly rendering of my project notes shared in the LittleCodingKata GitHub repository.

LittleCodingKata is my collection of programming exercises, research and code toys broadly spanning things that relate to programming and software development (languages, frameworks and tools).

These range from the trivial to the complex and serious. Many are inspired by existing work and I'll note credits and references where applicable. The focus is quite scattered, as I variously work on things new and important in the moment, or go back to revisit things from the past.

This is primarily a personal collection for my own edification and learning, but anyone who stumbles by is welcome to borrow, steal or reference the work here. And if you spot errors or issues I'd really appreciate some feedback - create an issue, send me an email or even send a pull-request.