Project

General

Profile

Actions

Bug #3834

closed

NDN_LOG causes compilation error on OSX 10.10 with boost 1.59.0

Added by Weiwei Liu over 7 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Utils
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

In util/logger.hpp, we have a workaround for Boost Ticket 11549. But this workaround methods somehow failed to work on OSX 10.10 with boost version 1.59.0.

../tests/unit-tests/util/log-module2.cpp:33:3: error: invalid operands to binary expression ('basic_record_ostream<char_type>' and '::ndn::util::LoggerTimestamp')
  NDN_LOG_TRACE("trace" << 2);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:137:35: note: expanded from macro 'NDN_LOG_TRACE'
#define NDN_LOG_TRACE(expression) NDN_LOG(TRACE, TRACE, expression)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:128:40: note: expanded from macro 'NDN_LOG'
      NDN_BOOST_LOG(getNdnCxxLogger()) << ::ndn::util::LoggerTimestamp{} \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/boost/log/utility/formatting_ostream.hpp:377:31: note: candidate function not viable: no known conversion from '::ndn::util::LoggerTimestamp' to 'ios_base_manip' (aka 'std::ios_base &(*)(std::ios_base &)') for 1st argument
    basic_formatting_ostream& operator<< (ios_base_manip manip)
                              ^
/opt/local/include/boost/log/utility/formatting_ostream.hpp:382:31: note: candidate function not viable: no known conversion from '::ndn::util::LoggerTimestamp' to 'basic_ios_manip' (aka 'std::basic_ios<char_type, traits_type> &(*)(std::basic_ios<char_type, traits_type> &)') for 1st argument
    basic_formatting_ostream& operator<< (basic_ios_manip manip)
                              ^
/opt/local/include/boost/log/utility/formatting_ostream.hpp:387:31: note: candidate function not viable: no known conversion from '::ndn::util::LoggerTimestamp' to 'stream_manip' (aka 'ostream_type &(*)(ostream_type &)') for 1st argument
    basic_formatting_ostream& operator<< (stream_manip manip)
...
/opt/local/include/boost/log/utility/formatting_ostream.hpp:802:1: note: candidate template ignored: substitution failure [with StreamT = boost::log::v2_mt_posix::basic_record_ostream<char> &, T = ndn::util::LoggerTimestamp]: no type named 'type' in 'boost::log::v2_mt_posix::aux::enable_if_formatting_ostream<boost::log::v2_mt_posix::basic_record_ostream<char> &, boost::log::v2_mt_posix::basic_record_ostream<char> &>'
operator<< (StreamT&& strm, T const& value)
^
../tests/unit-tests/util/log-module2.cpp:34:3: error: invalid operands to binary expression ('basic_record_ostream<char_type>' and '::ndn::util::LoggerTimestamp')
  NDN_LOG_DEBUG("debug" << 2);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:142:35: note: expanded from macro 'NDN_LOG_DEBUG'
#define NDN_LOG_DEBUG(expression) NDN_LOG(DEBUG, DEBUG, expression)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:128:40: note: expanded from macro 'NDN_LOG'
      NDN_BOOST_LOG(getNdnCxxLogger()) << ::ndn::util::LoggerTimestamp{} \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/boost/log/utility/formatting_ostream.hpp:377:31: note: candidate function not viable: no known conversion from '::ndn::util::LoggerTimestamp' to 'ios_base_manip' (aka 'std::ios_base &(*)(std::ios_base &)') for 1st argument
    basic_formatting_ostream& operator<< (ios_base_manip manip)
...
../tests/unit-tests/util/log-module2.cpp:35:3: error: invalid operands to binary expression ('basic_record_ostream<char_type>' and '::ndn::util::LoggerTimestamp')
  NDN_LOG_INFO("info" << 2);
  ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:147:34: note: expanded from macro 'NDN_LOG_INFO'
#define NDN_LOG_INFO(expression) NDN_LOG(INFO, INFO, expression)
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:128:40: note: expanded from macro 'NDN_LOG'
      NDN_BOOST_LOG(getNdnCxxLogger()) << ::ndn::util::LoggerTimestamp{} \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
../tests/unit-tests/util/log-module1.cpp:38:3: error: invalid operands to binary expression ('basic_record_ostream<char_type>' and '::ndn::util::LoggerTimestamp')
  NDN_LOG_FATAL("fatal" << 1);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:162:35: note: expanded from macro 'NDN_LOG_FATAL'
#define NDN_LOG_FATAL(expression) NDN_LOG(FATAL, FATAL, expression)
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/weiweiliu/development/ndn-cxx/src/util/logger.hpp:128:40: note: expanded from macro 'NDN_LOG'
      NDN_BOOST_LOG(getNdnCxxLogger()) << ::ndn::util::LoggerTimestamp{} \
...
6 errors generated.
Actions #1

Updated by Davide Pesavento over 7 years ago

  • Subject changed from compilation fails on OSX 10.10 with boost version 105900 to NDN_LOG causes compilation error on OSX 10.10 with boost 1.59.0
  • Description updated (diff)
  • Target version set to v0.6
  • Start date deleted (10/30/2016)
Actions #2

Updated by Junxiao Shi over 7 years ago

  • Description updated (diff)
Actions #3

Updated by Junxiao Shi over 6 years ago

  • Status changed from New to Rejected

macOS 10.13 has been released, so OS X 10.10 is no longer a supported platform.

Actions #4

Updated by Davide Pesavento over 6 years ago

Junxiao Shi wrote:

macOS 10.13 has been released, so OS X 10.10 is no longer a supported platform.

I don't think this is specific to 10.10. It probably happens on more recent macOS versions as well, as long as boost version is == 1.59.0. So, unless we declare that boost version unsupported, this issue should be reopened.

Actions #5

Updated by Junxiao Shi over 6 years ago

Please provide build logs showing this issue still occuring on a supported platform, and not "somehow" as the issue was reproducible on only one computer.

Actions

Also available in: Atom PDF