[protocol-buffers] Installing Google Protocol Buffers on mac

For some reason I need to use protobuf 2.4.1 in my project on OS X El Capitan. However homebrew has removed protobuf241 from its formula. I install it according @kksensei's answer manually and have to fix some error during the process.

During the make process, I get 3 error like following:

_x000D_
_x000D_
google/protobuf/message.cc:130:60: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >'_x000D_
_x000D_
  return ParseFromZeroCopyStream(&zero_copy_input) && input->eof();_x000D_
_x000D_
                                                           ^_x000D_
_x000D_
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:108:28: note: template is declared here_x000D_
_x000D_
    class _LIBCPP_TYPE_VIS basic_istream;_x000D_
_x000D_
                           ^_x000D_
_x000D_
google/protobuf/message.cc:135:67: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >'_x000D_
_x000D_
  return ParsePartialFromZeroCopyStream(&zero_copy_input) && input->eof();_x000D_
_x000D_
                                                                  ^_x000D_
_x000D_
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:108:28: note: template is declared here_x000D_
_x000D_
    class _LIBCPP_TYPE_VIS basic_istream;_x000D_
_x000D_
                           ^_x000D_
_x000D_
google/protobuf/message.cc:175:16: error: implicit instantiation of undefined template 'std::__1::basic_ostream<char, std::__1::char_traits<char> >'_x000D_
_x000D_
  return output->good();_x000D_
_x000D_
               ^_x000D_
_x000D_
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:110:28: note: template is declared here_x000D_
_x000D_
    class _LIBCPP_TYPE_VIS basic_ostream;_x000D_
_x000D_
                           ^
_x000D_
_x000D_
_x000D_

(Sorry, I dont know how to attach code when the code contains '`' )

If you get the same error, please edit src/google/protobuf/message.cc, add #include <istream> at the top of the file and do $ make again and should get no errors. After that do $ sudo make install. When install finished $protoc --version should display the correct result.