Task #2169
Updated by Alex Afanasyev over 9 years ago
Create a wiki page for the issue. I'm putting a straw-man text here. OS X 10.8 by default uses libstdc++ from gcc 4.2.1, which does not support C++11 features. ndn-cxx, NFD, NLSR, etc. are selecting the correct STL library using `-stdlib=libc++`. However, all dependencies (boost, cryptopp, protoc, log4cxx) needs to be compiled with the same STL library, otherwise code will not compile. I couldn't find an easy way to do it with macrports. The following steps assume that [homebrew](http://brew.sh/) is used: The following ports are necessary to compile `ndn-cxx`, `NFD`, `NLSR`, `repo-ng`: - `autoconf` - `automake` - `libtool` - `pkg-config` - `readline` - `sqlite` - `boost` (C++) - `cryptopp` (C++) - `log4cxx` (C++) - `protobuf` (C++) All C++ ports ports, except boost, needs to be configured in C++11 model (with --c++11 flag): slightly updated to be compiled with `libc++`. The following steps will accomplish the goal: - Preliminary steps Update port definitions brew update Install non-C++ ports brew install autoconf automake libtool pkg-config readline sqlite - Install `boost` in libc++ mode: brew install boost --c++11 - Install modified `protobuf` brew edit protobuf after line 66, add ENV.append 'CXXFLAGS', '-stdlib=libc++' if build.cxx11? After that protobuf can be installed as: brew install cryptopp protobuf --c++11 - Install modified `cryptopp` brew edit cryptopp after line 11, add ENV.append 'CXXFLAGS', '-stdlib=libc++' Install brea install cryptopp - Install modified `log4cxx` brew edit log4cxx --c++11 after line 26, add ENV.append 'CXXFLAGS', '-stdlib=libc++' Install brew install protobuf --c++11 log4cxx