Project

General

Profile

Bug #3674

Updated by Junxiao Shi over 8 years ago

I have OS X 10.11, Boost 1\_59 1_59 and Apple LLVM version 7.0.2 (clang-700.1.81). I installed MacPorts and did: 

     sudo port install pkgconfig boost sqlite3 libcryptopp libpcap 
     export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig 

 I am able to compile and install ndn-cxx. 
 But when I compile NFD I get many errors starting with those below. To solve it, I changed the line 
 https://github.com/named-data/NFD/blob/master/core/logger.hpp#L149  

       BOOST_LOG(g_logger.boostLogger) << NFD_LOG_LINE(msg, expression); \ 

 to: 

       BOOST_LOG(g_logger.boostLogger) << "" << NFD_LOG_LINE(msg, expression); \ 

 Error output: 

     ../daemon/table/cs.cpp:84:3: error: invalid operands to binary expression ('basic_record_ostream<char_type>' and '::nfd::LoggerTimestamp') 
       NFD_LOG_DEBUG("insert " << data.getName()); 
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     /Users/jefft0/work/NFD/core/logger.hpp:154:35: note: expanded from macro 'NFD_LOG_DEBUG' 
     #define NFD_LOG_DEBUG(expression) NFD_LOG(DEBUG, DEBUG,     expression) 
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     /Users/jefft0/work/NFD/core/logger.hpp:149:39: note: expanded from macro 'NFD_LOG' 
           BOOST_LOG(g_logger.boostLogger) << NFD_LOG_LINE(msg, expression); \ 
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     /opt/local/include/boost/log/utility/formatting_ostream.hpp:377:31: note: candidate function not viable: no known conversion from '::nfd::LoggerTimestamp' to 'ios_base_manip' (aka 'std::ios_base &(*)(std::ios_base &)') for 1st argument 
         basic_formatting_ostream& operator<< (ios_base_manip manip) 
 

Back