Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not compile under FreeBSD 10.3+Clang 3.4.1+Boost 1.58 or FreeBSD 11+Clang 3.8.0+Boost 1.56 - 2 errors #126

Closed
abclogin opened this issue May 31, 2016 · 4 comments · Fixed by abclogin/blackhole#1

Comments

@abclogin
Copy link

FreeBSD 10.3, Clang 3.4.1, Boost 1.58
Branch issue/xx/beta

Error # 1

/home/username/bhbeta/src/formatter/json.cpp:51:9: error: static_assert failed
      "type mismatch"
        static_assert(
        ^

Error # 2

In file included from /home/username/bhbeta/src/formatter/json.cpp:13:
/home/username/bhbeta/foreign/rapidjson/include/rapidjson/document.h:1065:22: error:
      call to constructor of 'rapidjson::GenericValue<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' is ambiguous
        GenericValue v(value);
                     ^ ~~~~~

Full log:

[  2%] Building CXX object CMakeFiles/blackhole.dir/src/formatter/json.cpp.o
In file included from /home/username/bhbeta/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:11:
In file included from /usr/local/include/boost/mpl/if.hpp:19:
In file included from /usr/local/include/boost/mpl/aux_/na_spec.hpp:28:
In file included from /usr/local/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp:66:
In file included from /usr/local/include/boost/preprocessor/arithmetic/add.hpp:21:
In file included from /usr/local/include/boost/preprocessor/tuple/elem.hpp:21:
In file included from /usr/local/include/boost/preprocessor/facilities/overload.hpp:17:
/usr/local/include/boost/preprocessor/variadic/size.hpp:22:9: warning:
      'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:11:
In file included from /usr/local/include/boost/mpl/if.hpp:19:
In file included from /usr/local/include/boost/mpl/aux_/na_spec.hpp:28:
In file included from /usr/local/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp:66:
In file included from /usr/local/include/boost/preprocessor/arithmetic/add.hpp:21:
In file included from /usr/local/include/boost/preprocessor/tuple/elem.hpp:22:
In file included from /usr/local/include/boost/preprocessor/tuple/rem.hpp:20:
/usr/local/include/boost/preprocessor/tuple/detail/is_single_return.hpp:19:28: warning:
      'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC
                           ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:11:
In file included from /usr/local/include/boost/mpl/if.hpp:19:
In file included from /usr/local/include/boost/mpl/aux_/na_spec.hpp:28:
In file included from /usr/local/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp:66:
In file included from /usr/local/include/boost/preprocessor/arithmetic/add.hpp:21:
In file included from /usr/local/include/boost/preprocessor/tuple/elem.hpp:22:
/usr/local/include/boost/preprocessor/tuple/rem.hpp:25:8: warning:
      'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#        if BOOST_PP_VARIADICS_MSVC
            ^
/usr/local/include/boost/preprocessor/tuple/rem.hpp:39:30: warning:
      'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
# if BOOST_PP_VARIADICS && !(BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400)
                             ^
/usr/local/include/boost/preprocessor/tuple/rem.hpp:40:8: warning:
      'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#        if BOOST_PP_VARIADICS_MSVC
            ^
/usr/local/include/boost/preprocessor/tuple/rem.hpp:123:9: warning:
      'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:11:
In file included from /usr/local/include/boost/mpl/if.hpp:19:
In file included from /usr/local/include/boost/mpl/aux_/na_spec.hpp:28:
In file included from /usr/local/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp:66:
In file included from /usr/local/include/boost/preprocessor/arithmetic/add.hpp:21:
In file included from /usr/local/include/boost/preprocessor/tuple/elem.hpp:23:
/usr/local/include/boost/preprocessor/variadic/elem.hpp:22:9: warning:
      'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:11:
In file included from /usr/local/include/boost/mpl/if.hpp:19:
In file included from /usr/local/include/boost/mpl/aux_/na_spec.hpp:28:
In file included from /usr/local/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp:66:
In file included from /usr/local/include/boost/preprocessor/arithmetic/add.hpp:21:
/usr/local/include/boost/preprocessor/tuple/elem.hpp:27:9: warning:
      'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:13:
In file included from /usr/local/include/boost/preprocessor/tuple/to_list.hpp:21:
/usr/local/include/boost/preprocessor/tuple/size.hpp:21:9: warning:
      'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:13:
/usr/local/include/boost/preprocessor/tuple/to_list.hpp:27:9: warning:
      'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:7:
/usr/local/include/boost/optional/optional.hpp:1254:53: warning: unused
      parameter 'out' [-Wunused-parameter]
operator<<(std::basic_ostream<CharType, CharTrait>& out, optional_detail...
                                                    ^
/usr/local/include/boost/optional/optional.hpp:1254:95: warning: unused
      parameter 'v' [-Wunused-parameter]
  ...CharTrait>& out, optional_detail::optional_tag const& v)
                                                           ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:21:
In file included from /home/username/bhbeta/include/blackhole/record.hpp:7:
In file included from /home/username/bhbeta/include/blackhole/attributes.hpp:13:
In file included from /usr/local/include/boost/container/small_vector.hpp:27:
In file included from /usr/local/include/boost/container/vector.hpp:27:
In file included from /usr/local/include/boost/container/allocator_traits.hpp:39:
/usr/local/include/boost/intrusive/pointer_traits.hpp:200:7: warning: unknown
      command tag name [-Wdocumentation-unknown-command]
   ///@cond
      ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:21:
In file included from /home/username/bhbeta/include/blackhole/record.hpp:7:
In file included from /home/username/bhbeta/include/blackhole/attributes.hpp:13:
In file included from /usr/local/include/boost/container/small_vector.hpp:27:
In file included from /usr/local/include/boost/container/vector.hpp:28:
In file included from /usr/local/include/boost/container/new_allocator.hpp:24:
/usr/local/include/boost/container/throw_exception.hpp:95:4: warning: function
      'throw_bad_alloc' could be declared with attribute 'noreturn'
      [-Wmissing-noreturn]
   {
   ^
/usr/local/include/boost/container/throw_exception.hpp:111:4: warning: function
      'throw_out_of_range' could be declared with attribute 'noreturn'
      [-Wmissing-noreturn]
   {
   ^
/usr/local/include/boost/container/throw_exception.hpp:127:4: warning: function
      'throw_length_error' could be declared with attribute 'noreturn'
      [-Wmissing-noreturn]
   {
   ^
/usr/local/include/boost/container/throw_exception.hpp:144:4: warning: function
      'throw_logic_error' could be declared with attribute 'noreturn'
      [-Wmissing-noreturn]
   {
   ^
/usr/local/include/boost/container/throw_exception.hpp:160:4: warning: function
      'throw_runtime_error' could be declared with attribute 'noreturn'
      [-Wmissing-noreturn]
   {
   ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:21:
In file included from /home/username/bhbeta/include/blackhole/record.hpp:7:
In file included from /home/username/bhbeta/include/blackhole/attributes.hpp:13:
In file included from /usr/local/include/boost/container/small_vector.hpp:27:
/usr/local/include/boost/container/vector.hpp:584:45: warning: unused parameter
      'x' [-Wunused-parameter]
   void swap_resources(vector_alloc_holder &x) BOOST_NOEXCEPT_OR_NOTHROW
                                            ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:24:
In file included from /home/username/bhbeta/include/blackhole/detail/attribute.hpp:3:
In file included from /usr/local/include/boost/variant/variant.hpp:21:
In file included from /usr/local/include/boost/type_index.hpp:29:
In file included from /usr/local/include/boost/type_index/stl_type_index.hpp:22:
/usr/local/include/boost/type_index/type_index_facade.hpp:68:9: warning:
      unknown command tag name [-Wdocumentation-unknown-command]
    /// @endcond
        ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:24:
In file included from /home/username/bhbeta/include/blackhole/detail/attribute.hpp:3:
In file included from /usr/local/include/boost/variant/variant.hpp:21:
In file included from /usr/local/include/boost/type_index.hpp:29:
/usr/local/include/boost/type_index/stl_type_index.hpp:178:5: warning:
      '_MSC_VER' is not defined, evaluates to 0 [-Wundef]
#if _MSC_VER > 1600 || (__GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(_...
    ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:24:
In file included from /home/username/bhbeta/include/blackhole/detail/attribute.hpp:3:
In file included from /usr/local/include/boost/variant/variant.hpp:29:
/usr/local/include/boost/variant/detail/forced_return.hpp:47:1: warning:
      function 'forced_return<void>' could be declared with attribute 'noreturn'
      [-Wmissing-noreturn]
{
^
/home/username/bhbeta/src/formatter/json.cpp:204:7: warning: '__APPLE__' is not
      defined, evaluates to 0 [-Wundef]
#elif __APPLE__
      ^
/home/username/bhbeta/src/formatter/json.cpp:51:9: error: static_assert failed
      "type mismatch"
        static_assert(
        ^
/home/username/bhbeta/src/formatter/json.cpp:267:9: note: in instantiation of
      function template specialization 'blackhole::v1::formatter::<anonymous
      namespace>::visitor_t::operator()<long long>' requested here
        visitor(value);
        ^
/home/username/bhbeta/src/formatter/json.cpp:226:13: note: in instantiation of
      function template specialization
      'blackhole::v1::formatter::json_t::inner_t::builder<rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > >::apply<long
      long>' requested here
            apply("timestamp", std::chrono::duration_cast<
            ^
/home/username/bhbeta/src/formatter/json.cpp:328:13: note: in instantiation of member
      function
      'blackhole::v1::formatter::json_t::inner_t::builder<rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > >::timestamp'
      requested here
    builder.timestamp();
            ^
In file included from /home/username/bhbeta/src/formatter/json.cpp:13:
/home/username/bhbeta/foreign/rapidjson/include/rapidjson/document.h:1065:22: error:
      call to constructor of 'rapidjson::GenericValue<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' is ambiguous
        GenericValue v(value);
                     ^ ~~~~~
/home/username/bhbeta/foreign/rapidjson/include/rapidjson/document.h:1136:16: note:
      in instantiation of function template specialization
      'rapidjson::GenericValue<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::AddMember<long
      long>' requested here
        return AddMember(n, value, allocator);
               ^
/home/username/bhbeta/src/formatter/json.cpp:56:14: note: in instantiation of
      function template specialization
      'rapidjson::GenericValue<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::AddMember<long
      long>' requested here
        node.AddMember(rapidjson::StringRef(name.data(), name.size()), v...
             ^
/home/username/bhbeta/src/formatter/json.cpp:267:9: note: in instantiation of
      function template specialization 'blackhole::v1::formatter::<anonymous
      namespace>::visitor_t::operator()<long long>' requested here
        visitor(value);
        ^
/home/username/bhbeta/src/formatter/json.cpp:226:13: note: in instantiation of
      function template specialization
      'blackhole::v1::formatter::json_t::inner_t::builder<rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > >::apply<long
      long>' requested here
            apply("timestamp", std::chrono::duration_cast<
            ^
/home/username/bhbeta/src/formatter/json.cpp:328:13: note: in instantiation of member
      function
      'blackhole::v1::formatter::json_t::inner_t::builder<rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > >::timestamp'
      requested here
    builder.timestamp();
            ^
/home/username/bhbeta/foreign/rapidjson/include/rapidjson/document.h:510:14: note:
      candidate constructor
    explicit GenericValue(int i) RAPIDJSON_NOEXCEPT : data_(), flags_(kN...
             ^
/home/username/bhbeta/foreign/rapidjson/include/rapidjson/document.h:517:14: note:
      candidate constructor
    explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_(), flag...
             ^
/home/username/bhbeta/foreign/rapidjson/include/rapidjson/document.h:524:14: note:
      candidate constructor
    explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_(), fla...
             ^
/home/username/bhbeta/foreign/rapidjson/include/rapidjson/document.h:538:14: note:
      candidate constructor
    explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_(), fl...
             ^
/home/username/bhbeta/foreign/rapidjson/include/rapidjson/document.h:549:14: note:
      candidate constructor
    explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_(), flags_...
             ^
23 warnings and 2 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/username/bhbeta
*** Error code 1

Stop.
make[1]: stopped in /usr/home/username/bhbeta
*** Error code 1

Stop.
make: stopped in /usr/home/username/bhbeta
root@freeb1:/home/username/bhbeta #
@abclogin
Copy link
Author

abclogin commented May 31, 2016

FreeBSD 11 Clang 3.8.0 Boost 1.56
blackhole master branch
Same errors:

[  3%] Building CXX object CMakeFiles/blackhole.dir/src/formatter/json.cpp.o
In file included from /home/username/blackhole/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:28:
In file included from /usr/local/include/boost/static_assert.hpp:18:
/usr/local/include/boost/detail/workaround.hpp:44:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __BORLANDC___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:49:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __CODEGEARC___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:54:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _MSC_VER_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:59:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _MSC_FULL_VER_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:76:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __GNUC___WORKAROUND_GUARD 0
        ^
/usr/local/include/boost/detail/workaround.hpp:81:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __GNUC_MINOR___WORKAROUND_GUARD 0
        ^
/usr/local/include/boost/detail/workaround.hpp:86:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0
        ^
/usr/local/include/boost/detail/workaround.hpp:89:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __IBMCPP___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:94:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __SUNPRO_CC_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:99:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __DECCXX_VER_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:104:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __MWERKS___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:109:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __EDG___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:114:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __EDG_VERSION___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:119:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __HP_aCC_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:124:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __hpxstd98_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:129:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _CRAYC_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:134:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __DMC___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:144:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __COMO___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:149:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __COMO_VERSION___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:154:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __INTEL_COMPILER_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:159:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __ICL_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:164:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _COMPILER_VERSION_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:170:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _RWSTD_VER_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:180:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __GLIBCPP___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:185:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:190:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __SGI_STL_PORT_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:195:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _STLPORT_VERSION_WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:200:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1
        ^
/usr/local/include/boost/detail/workaround.hpp:205:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define _CPPLIB_VER_WORKAROUND_GUARD 1
        ^
In file included from /home/username/blackhole/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:11:
In file included from /usr/local/include/boost/mpl/if.hpp:19:
In file included from /usr/local/include/boost/mpl/aux_/na_spec.hpp:28:
In file included from /usr/local/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp:66:
In file included from /usr/local/include/boost/preprocessor/arithmetic/add.hpp:21:
In file included from /usr/local/include/boost/preprocessor/tuple/elem.hpp:20:
In file included from /usr/local/include/boost/preprocessor/facilities/overload.hpp:17:
/usr/local/include/boost/preprocessor/variadic/size.hpp:22:9: warning: 'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0
      [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/blackhole/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:11:
In file included from /usr/local/include/boost/mpl/if.hpp:19:
In file included from /usr/local/include/boost/mpl/aux_/na_spec.hpp:28:
In file included from /usr/local/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp:66:
In file included from /usr/local/include/boost/preprocessor/arithmetic/add.hpp:21:
In file included from /usr/local/include/boost/preprocessor/tuple/elem.hpp:21:
/usr/local/include/boost/preprocessor/tuple/rem.hpp:33:30: warning: 'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
# if BOOST_PP_VARIADICS && !(BOOST_PP_VARIADICS_MSVC && _MSC_VER == 1400)
                             ^
/usr/local/include/boost/preprocessor/tuple/rem.hpp:113:9: warning: 'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/blackhole/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:11:
In file included from /usr/local/include/boost/mpl/if.hpp:19:
In file included from /usr/local/include/boost/mpl/aux_/na_spec.hpp:28:
In file included from /usr/local/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp:66:
In file included from /usr/local/include/boost/preprocessor/arithmetic/add.hpp:21:
In file included from /usr/local/include/boost/preprocessor/tuple/elem.hpp:22:
/usr/local/include/boost/preprocessor/variadic/elem.hpp:22:9: warning: 'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0
      [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/blackhole/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:11:
In file included from /usr/local/include/boost/mpl/if.hpp:19:
In file included from /usr/local/include/boost/mpl/aux_/na_spec.hpp:28:
In file included from /usr/local/include/boost/mpl/aux_/preprocessor/def_params_tail.hpp:66:
In file included from /usr/local/include/boost/preprocessor/arithmetic/add.hpp:21:
/usr/local/include/boost/preprocessor/tuple/elem.hpp:25:9: warning: 'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/blackhole/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:13:
In file included from /usr/local/include/boost/preprocessor/tuple/to_list.hpp:21:
/usr/local/include/boost/preprocessor/tuple/size.hpp:21:9: warning: 'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0 [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/blackhole/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:33:
In file included from /usr/local/include/boost/type_traits/type_with_alignment.hpp:13:
/usr/local/include/boost/preprocessor/tuple/to_list.hpp:27:9: warning: 'BOOST_PP_VARIADICS_MSVC' is not defined, evaluates to 0
      [-Wundef]
#    if BOOST_PP_VARIADICS_MSVC
        ^
In file included from /home/username/blackhole/src/formatter/json.cpp:7:
In file included from /usr/local/include/boost/optional/optional.hpp:39:
In file included from /usr/local/include/boost/type_traits/is_nothrow_move_assignable.hpp:23:
In file included from /usr/local/include/boost/utility/declval.hpp:15:
/usr/local/include/boost/type_traits/add_rvalue_reference.hpp:9:9: warning: macro name is a reserved identifier [-Wreserved-id-macro]
#define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
        ^
In file included from /home/username/blackhole/src/formatter/json.cpp:18:
In file included from /home/username/blackhole/include/blackhole/attribute.hpp:8:
In file included from /usr/local/include/boost/mpl/contains.hpp:20:
In file included from /usr/local/include/boost/mpl/aux_/contains_impl.hpp:20:
In file included from /usr/local/include/boost/mpl/find.hpp:17:
In file included from /usr/local/include/boost/mpl/find_if.hpp:17:
In file included from /usr/local/include/boost/mpl/aux_/find_if_pred.hpp:14:
In file included from /usr/local/include/boost/mpl/aux_/iter_apply.hpp:17:
In file included from /usr/local/include/boost/mpl/apply.hpp:24:
In file included from /usr/local/include/boost/mpl/placeholders.hpp:24:
In file included from /usr/local/include/boost/mpl/arg.hpp:37:
In file included from /usr/local/include/boost/mpl/aux_/include_preprocessed.hpp:37:
/usr/local/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp:27:9: warning: use of old-style cast [-Wold-style-cast]
        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/aux_/na_assert.hpp:25:5: note: expanded from macro 'BOOST_MPL_AUX_ASSERT_NOT_NA'
    BOOST_MPL_ASSERT_NOT((boost::mpl::is_na<type>)) \
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/assert.hpp:313:43: note: expanded from macro 'BOOST_MPL_ASSERT_NOT'
              boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
                                          ^              ~
/usr/local/include/boost/mpl/assert.hpp:60:58: note: expanded from macro '\
BOOST_MPL_AUX_ASSERT_CONSTANT'
#   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
                                                         ^~~~
In file included from /home/username/blackhole/src/formatter/json.cpp:18:
In file included from /home/username/blackhole/include/blackhole/attribute.hpp:8:
In file included from /usr/local/include/boost/mpl/contains.hpp:20:
In file included from /usr/local/include/boost/mpl/aux_/contains_impl.hpp:20:
In file included from /usr/local/include/boost/mpl/find.hpp:17:
In file included from /usr/local/include/boost/mpl/find_if.hpp:17:
In file included from /usr/local/include/boost/mpl/aux_/find_if_pred.hpp:14:
In file included from /usr/local/include/boost/mpl/aux_/iter_apply.hpp:17:
In file included from /usr/local/include/boost/mpl/apply.hpp:24:
In file included from /usr/local/include/boost/mpl/placeholders.hpp:24:
In file included from /usr/local/include/boost/mpl/arg.hpp:37:
In file included from /usr/local/include/boost/mpl/aux_/include_preprocessed.hpp:37:
/usr/local/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp:45:9: warning: use of old-style cast [-Wold-style-cast]
        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/aux_/na_assert.hpp:25:5: note: expanded from macro 'BOOST_MPL_AUX_ASSERT_NOT_NA'
    BOOST_MPL_ASSERT_NOT((boost::mpl::is_na<type>)) \
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/assert.hpp:313:43: note: expanded from macro 'BOOST_MPL_ASSERT_NOT'
              boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
                                          ^              ~
/usr/local/include/boost/mpl/assert.hpp:60:58: note: expanded from macro '\
BOOST_MPL_AUX_ASSERT_CONSTANT'
#   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
                                                         ^~~~
In file included from /home/username/blackhole/src/formatter/json.cpp:18:
In file included from /home/username/blackhole/include/blackhole/attribute.hpp:8:
In file included from /usr/local/include/boost/mpl/contains.hpp:20:
In file included from /usr/local/include/boost/mpl/aux_/contains_impl.hpp:20:
In file included from /usr/local/include/boost/mpl/find.hpp:17:
In file included from /usr/local/include/boost/mpl/find_if.hpp:17:
In file included from /usr/local/include/boost/mpl/aux_/find_if_pred.hpp:14:
In file included from /usr/local/include/boost/mpl/aux_/iter_apply.hpp:17:
In file included from /usr/local/include/boost/mpl/apply.hpp:24:
In file included from /usr/local/include/boost/mpl/placeholders.hpp:24:
In file included from /usr/local/include/boost/mpl/arg.hpp:37:
In file included from /usr/local/include/boost/mpl/aux_/include_preprocessed.hpp:37:
/usr/local/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp:63:9: warning: use of old-style cast [-Wold-style-cast]
        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/aux_/na_assert.hpp:25:5: note: expanded from macro 'BOOST_MPL_AUX_ASSERT_NOT_NA'
    BOOST_MPL_ASSERT_NOT((boost::mpl::is_na<type>)) \
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/assert.hpp:313:43: note: expanded from macro 'BOOST_MPL_ASSERT_NOT'
              boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
                                          ^              ~
/usr/local/include/boost/mpl/assert.hpp:60:58: note: expanded from macro '\
BOOST_MPL_AUX_ASSERT_CONSTANT'
#   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
                                                         ^~~~
In file included from /home/username/blackhole/src/formatter/json.cpp:18:
In file included from /home/username/blackhole/include/blackhole/attribute.hpp:8:
In file included from /usr/local/include/boost/mpl/contains.hpp:20:
In file included from /usr/local/include/boost/mpl/aux_/contains_impl.hpp:20:
In file included from /usr/local/include/boost/mpl/find.hpp:17:
In file included from /usr/local/include/boost/mpl/find_if.hpp:17:
In file included from /usr/local/include/boost/mpl/aux_/find_if_pred.hpp:14:
In file included from /usr/local/include/boost/mpl/aux_/iter_apply.hpp:17:
In file included from /usr/local/include/boost/mpl/apply.hpp:24:
In file included from /usr/local/include/boost/mpl/placeholders.hpp:24:
In file included from /usr/local/include/boost/mpl/arg.hpp:37:
In file included from /usr/local/include/boost/mpl/aux_/include_preprocessed.hpp:37:
/usr/local/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp:81:9: warning: use of old-style cast [-Wold-style-cast]
        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/aux_/na_assert.hpp:25:5: note: expanded from macro 'BOOST_MPL_AUX_ASSERT_NOT_NA'
    BOOST_MPL_ASSERT_NOT((boost::mpl::is_na<type>)) \
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/assert.hpp:313:43: note: expanded from macro 'BOOST_MPL_ASSERT_NOT'
              boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
                                          ^              ~
/usr/local/include/boost/mpl/assert.hpp:60:58: note: expanded from macro '\
BOOST_MPL_AUX_ASSERT_CONSTANT'
#   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
                                                         ^~~~
In file included from /home/username/blackhole/src/formatter/json.cpp:18:
In file included from /home/username/blackhole/include/blackhole/attribute.hpp:8:
In file included from /usr/local/include/boost/mpl/contains.hpp:20:
In file included from /usr/local/include/boost/mpl/aux_/contains_impl.hpp:20:
In file included from /usr/local/include/boost/mpl/find.hpp:17:
In file included from /usr/local/include/boost/mpl/find_if.hpp:17:
In file included from /usr/local/include/boost/mpl/aux_/find_if_pred.hpp:14:
In file included from /usr/local/include/boost/mpl/aux_/iter_apply.hpp:17:
In file included from /usr/local/include/boost/mpl/apply.hpp:24:
In file included from /usr/local/include/boost/mpl/placeholders.hpp:24:
In file included from /usr/local/include/boost/mpl/arg.hpp:37:
In file included from /usr/local/include/boost/mpl/aux_/include_preprocessed.hpp:37:
/usr/local/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp:99:9: warning: use of old-style cast [-Wold-style-cast]
        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/aux_/na_assert.hpp:25:5: note: expanded from macro 'BOOST_MPL_AUX_ASSERT_NOT_NA'
    BOOST_MPL_ASSERT_NOT((boost::mpl::is_na<type>)) \
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/assert.hpp:313:43: note: expanded from macro 'BOOST_MPL_ASSERT_NOT'
              boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
                                          ^              ~
/usr/local/include/boost/mpl/assert.hpp:60:58: note: expanded from macro '\
BOOST_MPL_AUX_ASSERT_CONSTANT'
#   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
                                                         ^~~~
In file included from /home/username/blackhole/src/formatter/json.cpp:18:
In file included from /home/username/blackhole/include/blackhole/attribute.hpp:8:
In file included from /usr/local/include/boost/mpl/contains.hpp:20:
In file included from /usr/local/include/boost/mpl/aux_/contains_impl.hpp:20:
In file included from /usr/local/include/boost/mpl/find.hpp:17:
In file included from /usr/local/include/boost/mpl/find_if.hpp:17:
In file included from /usr/local/include/boost/mpl/aux_/find_if_pred.hpp:14:
In file included from /usr/local/include/boost/mpl/aux_/iter_apply.hpp:17:
In file included from /usr/local/include/boost/mpl/apply.hpp:24:
In file included from /usr/local/include/boost/mpl/placeholders.hpp:24:
In file included from /usr/local/include/boost/mpl/arg.hpp:37:
In file included from /usr/local/include/boost/mpl/aux_/include_preprocessed.hpp:37:
/usr/local/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp:117:9: warning: use of old-style cast [-Wold-style-cast]
        BOOST_MPL_AUX_ASSERT_NOT_NA(type);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/aux_/na_assert.hpp:25:5: note: expanded from macro 'BOOST_MPL_AUX_ASSERT_NOT_NA'
    BOOST_MPL_ASSERT_NOT((boost::mpl::is_na<type>)) \
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/mpl/assert.hpp:313:43: note: expanded from macro 'BOOST_MPL_ASSERT_NOT'
              boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
                                          ^              ~
/usr/local/include/boost/mpl/assert.hpp:60:58: note: expanded from macro '\
BOOST_MPL_AUX_ASSERT_CONSTANT'
#   define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
                                                         ^~~~
In file included from /home/username/blackhole/src/formatter/json.cpp:24:
In file included from /home/username/blackhole/include/blackhole/detail/attribute.hpp:3:
In file included from /usr/local/include/boost/variant/variant.hpp:31:
/usr/local/include/boost/variant/detail/forced_return.hpp:47:1: warning: function 'forced_return<void>' could be declared with attribute
      'noreturn' [-Wmissing-noreturn]
{
^
/home/username/blackhole/src/formatter/json.cpp:200:7: warning: '__APPLE__' is not defined, evaluates to 0 [-Wundef]
#elif __APPLE__
      ^
/home/username/blackhole/src/formatter/json.cpp:47:9: error: static_assert failed "type mismatch"
        static_assert(
        ^
/home/username/blackhole/src/formatter/json.cpp:265:9: note: in instantiation of function template specialization
      'blackhole::v1::formatter::(anonymous namespace)::visitor_t::operator()<long long>' requested here
        visitor(value);
        ^
/home/username/blackhole/src/formatter/json.cpp:222:13: note: in instantiation of function template specialization
      'blackhole::v1::formatter::json_t::inner_t::builder<rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > >::apply<long
      long>' requested here
            apply("timestamp", std::chrono::duration_cast<
            ^
/home/username/blackhole/src/formatter/json.cpp:347:13: note: in instantiation of member function
      'blackhole::v1::formatter::json_t::inner_t::builder<rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > >::timestamp'
      requested here
    builder.timestamp();
            ^
In file included from /home/username/blackhole/src/formatter/json.cpp:13:
/home/username/blackhole/foreign/rapidjson/include/rapidjson/document.h:1065:22: error: call to constructor of
      'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' is ambiguous
        GenericValue v(value);
                     ^ ~~~~~
/home/username/blackhole/foreign/rapidjson/include/rapidjson/document.h:1136:16: note: in instantiation of function template specialization
      'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::AddMember<long long>'
      requested here
        return AddMember(n, value, allocator);
               ^
/home/username/blackhole/src/formatter/json.cpp:52:14: note: in instantiation of function template specialization
      'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::AddMember<long long>'
      requested here
        node.AddMember(rapidjson::StringRef(name.data(), name.size()), value, allocator);
             ^
/home/username/blackhole/src/formatter/json.cpp:265:9: note: in instantiation of function template specialization
      'blackhole::v1::formatter::(anonymous namespace)::visitor_t::operator()<long long>' requested here
        visitor(value);
        ^
/home/username/blackhole/src/formatter/json.cpp:222:13: note: in instantiation of function template specialization
      'blackhole::v1::formatter::json_t::inner_t::builder<rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > >::apply<long
      long>' requested here
            apply("timestamp", std::chrono::duration_cast<
            ^
/home/username/blackhole/src/formatter/json.cpp:347:13: note: in instantiation of member function
      'blackhole::v1::formatter::json_t::inner_t::builder<rapidjson::GenericDocument<rapidjson::UTF8<char>,
      rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > >::timestamp'
      requested here
    builder.timestamp();
            ^
/home/username/blackhole/foreign/rapidjson/include/rapidjson/document.h:510:14: note: candidate constructor
    explicit GenericValue(int i) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberIntFlag) {
             ^
/home/username/blackhole/foreign/rapidjson/include/rapidjson/document.h:517:14: note: candidate constructor
    explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUintFlag) {
             ^
/home/username/blackhole/foreign/rapidjson/include/rapidjson/document.h:524:14: note: candidate constructor
    explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberInt64Flag) {
             ^
/home/username/blackhole/foreign/rapidjson/include/rapidjson/document.h:538:14: note: candidate constructor
    explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUint64Flag) {
             ^
/home/username/blackhole/foreign/rapidjson/include/rapidjson/document.h:549:14: note: candidate constructor
    explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberDoubleFlag) { data_.n.d = d; }
             ^
45 warnings and 2 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /usr/home/username/blackhole
*** Error code 1

Stop.
make[1]: stopped in /usr/home/username/blackhole
*** Error code 1

Stop.
make: stopped in /usr/home/username/blackhole

@abclogin
Copy link
Author

With FreeBSD 10.3, Clang 3.41, Boost 1.55 error is same (I used fix #127 for Boost 1.55)

@3Hren
Copy link
Owner

3Hren commented May 31, 2016

Unfortunately I cannot reproduce this issue, because on my platforms long long equals std::int64_t. Please check with #128.

@abclogin
Copy link
Author

abclogin commented Jun 1, 2016

I checked with #128.
This error is fixed.

Other error is detected. See #129

3Hren added a commit that referenced this issue Jun 1, 2016
Blackhole can handle both signed int64 and unsigned integers,
but std::chrono representation type is long long, which may
vary depending on architecture where building occurs. Thus,
it may lead to ambiguous integer promotion when it's time
to format.

This commit does explicit cast to resolve ambiguity.

This should fix #126 and #129.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants