Skip to content

Instantly share code, notes, and snippets.

@onexdrk
Created November 23, 2014 23:47
Show Gist options
  • Save onexdrk/603013194e8b1ee5043a to your computer and use it in GitHub Desktop.
Save onexdrk/603013194e8b1ee5043a to your computer and use it in GitHub Desktop.
install protobuf 2.3.0 on mac os (10.10 in my case)
To install protobuf 2.3.0 in mac os (10.10) you need to do folowing:
install mac os developer tools
download and extract protobuf 2.3.0 : https://code.google.com/p/protobuf/downloads/list
open src/google/protobuf/message.h
and change lines to (see https://code.google.com/p/protobuf/issues/detail?id=570 and http://alfredgamulo.com/problem-installing-protobuf-2-3-0-on-mac/ if you want)
#ifdef __DECCXX
// HP C++'s iosfwd doesn't work.
#include <iostream>
#else
#include <sstream>
//#include <iosfwd>
#endif
and then run:
make clean (if you try to make before)
./configure
./make
!! ./make check will fail, don’t worry about
sudo make install
protoc —version
@kevindenight
Copy link

kevindenight commented Jan 17, 2017

Thanks so much!
It works!
10.12 in my case

Copy link

ghost commented Mar 14, 2017

Before you do
$ ./configure
$ make

you should go to https://github.com/google/protobuf/blob/master/src/README.md and follow there an instruction for Mac users:

Note for Mac users
For a Mac system, Unix tools are not available by default. You will first need to install Xcode from the Mac AppStore and then run the following command from a terminal:

$ sudo xcode-select --install

To install Unix tools, you can install "port" following the instructions at https://www.macports.org . This will reside in /opt/local/bin/port for most Mac installations.

$ sudo /opt/local/bin/port install autoconf automake libtool

Then follow the Unix instructions above.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment