Bug 230630 - games/nxengine: fails to build with libc++ 7
Summary: games/nxengine: fails to build with libc++ 7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jan Beich
URL:
Keywords: needs-patch
Depends on:
Blocks: 230355
  Show dependency treegraph
 
Reported: 2018-08-14 21:13 UTC by Jan Beich
Modified: 2018-08-24 09:35 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (lifanov)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2018-08-14 21:13:56 UTC
$ poudriere jail -cj clang7 -a amd64 -v projects/clang700-import -m svn+https
$ poudriere testport -j clang7 games/nxengine
[...]
In file included from src/i18n/translate.cpp:2:
src/i18n/../common/json.hpp:1379:9: error: static_assert failed "could not find from_json() method in T's namespace"
        static_assert(sizeof(BasicJsonType) == 0,
        ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~
src/i18n/../common/json.hpp:1388:16: note: in instantiation of function template specialization 'nlohmann::detail::from_json_fn::call<nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>, std::__1::basic_string_view<char, std::__1::char_traits<char> > >' requested here
        return call(j, val, priority_tag<1> {});
               ^
src/i18n/../common/json.hpp:6860:9: note: in instantiation of function template specialization 'nlohmann::detail::from_json_fn::operator()<nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>, std::__1::basic_string_view<char, std::__1::char_traits<char> > >' requested here
        ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
        ^
src/i18n/../common/json.hpp:9579:36: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::__1::basic_string_view<char, std::__1::char_traits<char> >, void>::from_json<const nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer> &, std::__1::basic_string_view<char, std::__1::char_traits<char> > >' requested here
        JSONSerializer<ValueType>::from_json(*this, ret);
                                   ^
src/i18n/../common/json.hpp:9842:16: note: in instantiation of function template specialization 'nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>::get<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::basic_string_view<char, std::__1::char_traits<char> >, 0>' requested here
        return get<ValueType>();
               ^
/usr/include/c++/v1/string:875:29: note: in instantiation of function template specialization 'nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>::operator basic_string_view<std::__1::basic_string_view<char, std::__1::char_traits<char> >, 0>' requested here
        {__self_view __sv = __t; return assign(__sv);}
                            ^
src/i18n/translate.cpp:22:34: note: in instantiation of function template specialization 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=<nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>, void>' requested here
            _strings[ it.key() ] = it.value();
                                 ^
1 error generated.

http://package18.nyi.freebsd.org/data/headamd64PR230355-default/2018-08-11_19h01m06s/logs/errors/nxengine-2.6.3_1.log
Comment 1 Jan Beich freebsd_committer 2018-08-14 21:14:52 UTC
Regressed by https://reviews.llvm.org/rL336132 and fixed by https://github.com/nlohmann/json/commit/8165707990e4. nxengine-evo-2.6.3 bundles json-2.1.1, so you'll need to backport.
Comment 2 Jan Beich freebsd_committer 2018-08-14 21:49:55 UTC
Or maybe unbundle json, see ports r477206.
Comment 3 commit-hook freebsd_committer 2018-08-24 09:34:56 UTC
A commit references this bug:

Author: jbeich
Date: Fri Aug 24 09:34:29 UTC 2018
New revision: 477951
URL: https://svnweb.freebsd.org/changeset/ports/477951

Log:
  games/nxengine: unbreak with libc++ 7

  In file included from src/i18n/translate.cpp:2:
  src/i18n/../common/json.hpp:1379:9: error: static_assert failed "could not find from_json() method in T's namespace"
          static_assert(sizeof(BasicJsonType) == 0,
          ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~
  src/i18n/../common/json.hpp:1388:16: note: in instantiation of function template specialization 'nlohmann::detail::from_json_fn::call<nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>, std::__1::basic_string_view<char, std::__1::char_traits<char> > >' requested here
          return call(j, val, priority_tag<1> {});
                 ^
  src/i18n/../common/json.hpp:6860:9: note: in instantiation of function template specialization 'nlohmann::detail::from_json_fn::operator()<nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>, std::__1::basic_string_view<char, std::__1::char_traits<char> > >' requested here
          ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);
          ^
  src/i18n/../common/json.hpp:9579:36: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::__1::basic_string_view<char, std::__1::char_traits<char> >, void>::from_json<const nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer> &, std::__1::basic_string_view<char, std::__1::char_traits<char> > >' requested here
          JSONSerializer<ValueType>::from_json(*this, ret);
                                     ^
  src/i18n/../common/json.hpp:9842:16: note: in instantiation of function template specialization 'nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>::get<std::__1::basic_string_view<char, std::__1::char_traits<char> >, std::__1::basic_string_view<char, std::__1::char_traits<char> >, 0>' requested here
          return get<ValueType>();
                 ^
  /usr/include/c++/v1/string:875:29: note: in instantiation of function template specialization 'nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>::operator basic_string_view<std::__1::basic_string_view<char, std::__1::char_traits<char> >, 0>' requested here
          {__self_view __sv = __t; return assign(__sv);}
                              ^
  src/i18n/translate.cpp:22:34: note: in instantiation of function template specialization 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::operator=<nlohmann::basic_json<std::map, std::vector, std::__1::basic_string<char>, bool, long, unsigned long, double, std::allocator, adl_serializer>, void>' requested here
              _strings[ it.key() ] = it.value();
                                   ^

  PR:		230630
  Obtained from:	upstream (json-3.2.0)
  Approved by:	portmgr blanket

Changes:
  head/games/nxengine/files/patch-libc++7