After upgrading to OS X Mavericks, running make
in my Mesos build directory results in errors:
google/protobuf/message.cc:130:60: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >'
return ParseFromZeroCopyStream(&zero_copy_input) && input->eof();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:108:28: note: template is declared here
class _LIBCPP_TYPE_VIS basic_istream;
^
google/protobuf/message.cc:135:67: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >'
return ParsePartialFromZeroCopyStream(&zero_copy_input) && input->eof();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:108:28: note: template is declared here
class _LIBCPP_TYPE_VIS basic_istream;
^
google/protobuf/message.cc:175:16: error: implicit instantiation of undefined template 'std::__1::basic_ostream<char, std::__1::char_traits<char> >'
return output->good();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:110:28: note: template is declared here
class _LIBCPP_TYPE_VIS basic_ostream;
I started with a clean build directory, re-ran ./bootstrap
, and ran cd build && ../configure
.
For people who find this page while Googling error messages thrown up by some other software that depends on old versions of Google's protobuf
libraries, here's another solution:
Modify the file src/google/protobuf/message.cc
and add the line #include <iostream>
after the opening comment block, right before all the rest of the #include
lines. That one-line change was enough to enable me to compile protoc
from protobuf-2.4.1
with the command-line tools from XCode 7.3 on an El Capitan Mac.
OS X Mavericks replaced the gcc
command with clang:
$ gcc
clang: error: no input files
However, Mesos currently expects to be compiled with the GNU Compiler Collection. You need to install GCC 4.7 with Homebrew and configure your build directory to use it. To be sure, start with an empty build directory:
# Install GCC 4.7
brew tap homebrew/versions
brew install gcc47
# Configure Mesos build to use GCC
cd /path/to/mesos
rm -rf build
mkdir build
cd build
CC=gcc-4.7 CXX=g++-4.7 ../configure
Then you can run make
like before.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With