Building from Source
Download latest version of Procbuffer. [Https://code.google.com/p/protobuf/downloads/list].
- e.g "Wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2"
Untar the tar.bz2 file
- Tar xfvj protobuf-2.5.0.tar.bz2
Configure the Protobuf.
- CD protobuf-2.5.0
- ./configure Cc=clang cxx=clang++ cxxflags= '-std=c++11-stdlib=libc++-o3-g ' ldflags= '-stdlib=libc++ ' LIBS= '-lc++-lc++ Abi
Make the source
- Make-j 4
- sudo make install
At Make-j 4 o'clock, the following error may occur
In file included from./google/protobuf/stubs/common.h: A: in file included from/library/developer/commandlinetools/usr/bin/. /include/c++/v1/string:439: in file included from/library/developer/commandlinetools/usr/bin/. /include/c++/v1/algorithm:628: in file included from/library/developer/commandlinetools/usr/bin/. /include/c++/v1/memory:604:/library/developer/commandlinetools/usr/bin/. /include/c++/v1/iterator:341:Ten: Fatal error:'__debug'File not found
Encountered an error like this: Execute the following command
Echo ' #define _libcpp_assert (x, M) ((void) 0) ' | sudo tee-a/library/developer/commandlinetools/usr/include/c++/v1/__debug >/dev/null
Reference
Http://sleepythread.blogspot.com/2013/11/installing-protoc-25x-compiler-google.html
https://github.com/JuliaLang/julia/issues/10822
Http://stackoverflow.com/questions/29529455/missing-c-header-debug-after-updating-osx-command-line-tools-6-3
Mac OS X 10.10.3 installation Protoc