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

Third party Json issue #153

Closed
johnc1231 opened this issue Apr 5, 2019 · 7 comments
Closed

Third party Json issue #153

johnc1231 opened this issue Apr 5, 2019 · 7 comments

Comments

@johnc1231
Copy link

Issue summary

I am trying to install retro from source. When I do so, I encounter this error during the make -j8 retro step that happens during the pip3 install -e . step.

In file included from .../ArtificialIntelligence/ProjectExploration/gym-retro/src/coreinfo.cpp:1:
/Users/johncompitello/Computer_Science/College/ArtificialIntelligence/ProjectExploration/gym-retro/third-party/json.hpp:1201:9: error: static_assert failed "could not find from_json() method in T's namespace"
        static_assert(sizeof(BasicJsonType) == 0,
        ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~
.../ArtificialIntelligence/ProjectExploration/gym-retro/third-party/json.hpp:1216: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 long, unsigned long 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> {});
               ^
.../ArtificialIntelligence/ProjectExploration/gym-retro/third-party/json.hpp:9660: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 long, unsigned long 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);
        ^
.../ArtificialIntelligence/ProjectExploration/gym-retro/third-party/json.hpp:12181: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 long, unsigned long
      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);
                                   ^
.../ArtificialIntelligence/ProjectExploration/gym-retro/third-party/json.hpp:12443:16: note: in instantiation of function template specialization 'nlohmann::basic_json<std::map,
      std::vector, std::__1::basic_string<char>, bool, long long, unsigned long 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>();
               ^
/Library/Developer/CommandLineTools/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 long,
      unsigned long 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);}
                            ^
.../ArtificialIntelligence/ProjectExploration/gym-retro/src/coreinfo.cpp:111:27: 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 long, unsigned long long, double, std::allocator, adl_serializer>,
      void>' requested here
                s_coreToLib[core.key()] = core->at("lib");

System information

  • OSX Mojave
  • 3.4.5
  • Current master
@christopherhesse
Copy link
Collaborator

I don't see any reason you would get that error but your python version is too old to be supported and there might also be some issue with the compiler you are using. Can I ask why you want to build retro from source?

@johnc1231
Copy link
Author

johnc1231 commented Apr 6, 2019

I am trying to integrate a new game, so I need to build from source I believe. Just need to be able to add some game data.

I switched to Python version 3.6.8 and recloned and retried the build, same error.

Checked my clang version as well:

Apple LLVM version 10.0.1 (clang-1001.0.46.3)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

@johnc1231
Copy link
Author

Ok, I figured out that I don't need to build from source in order to add a game, but it's likely I'll want to use the integration UI at some point in the future, so it'd be good to figure out how to get past this

@christopherhesse
Copy link
Collaborator

Building from source is also not required for the integration UI.

@eaplatanios
Copy link
Contributor

This should have been fixed as part of PR #152. There is a small bug causing this in coreinfo.cpp.

@christopherhesse
Copy link
Collaborator

Thanks for the fix @eaplatanios !

@christopherhesse
Copy link
Collaborator

Fixed in #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants