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

Error when compiling flightlib on MacOS #191

Open
santurini opened this issue Jul 16, 2023 · 0 comments
Open

Error when compiling flightlib on MacOS #191

santurini opened this issue Jul 16, 2023 · 0 comments

Comments

@santurini
Copy link

OS: MacOS Ventura
clang version: Apple clang version 14.0.3 (clang-1403.0.22.14.1)

[  1%] Built target gtest
[  2%] Built target gtest_main
[ 82%] Built target yaml-cpp
[ 83%] Building CXX object CMakeFiles/flightlib.dir/src/bridges/unity_bridge.cpp.o
[ 84%] Building CXX object CMakeFiles/flightlib.dir/src/envs/quadrotor_env/quadrotor_env.cpp.o
[ 84%] Building CXX object CMakeFiles/flightlib.dir/src/envs/test_env.cpp.o
[ 85%] Building CXX object CMakeFiles/flightlib.dir/src/sensors/rgb_camera.cpp.o
[ 85%] Building CXX object CMakeFiles/flightlib.dir/src/sensors/sensor_base.cpp.o
[ 86%] Building CXX object CMakeFiles/flightlib.dir/src/envs/vec_env.cpp.o
In file included from /Users/arturo/Desktop/flightmare/flightlib/src/bridges/unity_bridge.cpp:1:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_bridge.hpp:22:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_message_types.hpp:17:
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:825:5: error: static assertion failed due to requirement 'sizeof(nlohmann::basic_json<std::map, std::vector, std::string, bool, long long, unsigned long long, double, std::allocator, nlohmann::adl_serializer>) == 0': could not find to_json() method in T's namespace
    static_assert(sizeof(BasicJsonType) == 0,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:834:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::call<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    return call(j, std::forward<T>(val), priority_tag<1>{});
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:915:5: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::operator()<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    ::nlohmann::to_json(j, std::forward<ValueType>(val));
    ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:1967:24: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::__bit_const_reference<std::vector<bool>>>::to_json<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
                       ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/allocator.h:168:28: note: in instantiation of function template specialization 'nlohmann::basic_json<>::basic_json<std::__bit_const_reference<std::vector<bool>>, std::__bit_const_reference<std::vector<bool>>, 0>' requested here
        ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
                           ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/allocator_traits.h:296:13: note: in instantiation of function template specialization 'std::allocator<nlohmann::basic_json<>>::construct<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
        __a.construct(__p, _VSTD::forward<_Args>(__args)...);
            ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/uninitialized_algorithms.h:553:31: note: (skipping 7 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    allocator_traits<_Alloc>::construct(__alloc, std::__to_address(__first2), *__first1);
                              ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:820:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json<nlohmann::basic_json<>, std::vector<bool>, 0>' requested here
    return to_json(j, std::forward<T>(val));
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:834:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::call<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    return call(j, std::forward<T>(val), priority_tag<1>{});
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:915:5: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::operator()<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    ::nlohmann::to_json(j, std::forward<ValueType>(val));
    ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:1967:24: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::vector<bool>>::to_json<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
                       ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_message_types.hpp:146:30: note: in instantiation of function template specialization 'nlohmann::basic_json<>::basic_json<const std::vector<bool> &, std::vector<bool>, 0>' requested here
           {"enabledLayers", o.enabled_layers},
                             ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:825:41: note: expression evaluates to '16 == 0'
    static_assert(sizeof(BasicJsonType) == 0,
                  ~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from /Users/arturo/Desktop/flightmare/flightlib/src/envs/vec_env.cpp:1:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/envs/vec_env.hpp:13:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_bridge.hpp:22:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_message_types.hpp:17:
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:825:5: error: static assertion failed due to requirement 'sizeof(nlohmann::basic_json<std::map, std::vector, std::string, bool, long long, unsigned long long, double, std::allocator, nlohmann::adl_serializer>) == 0': could not find to_json() method in T's namespace
    static_assert(sizeof(BasicJsonType) == 0,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:834:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::call<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    return call(j, std::forward<T>(val), priority_tag<1>{});
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:915:5: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::operator()<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    ::nlohmann::to_json(j, std::forward<ValueType>(val));
    ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:1967:24: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::__bit_const_reference<std::vector<bool>>>::to_json<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
                       ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/allocator.h:168:28: note: in instantiation of function template specialization 'nlohmann::basic_json<>::basic_json<std::__bit_const_reference<std::vector<bool>>, std::__bit_const_reference<std::vector<bool>>, 0>' requested here
        ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
                           ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/allocator_traits.h:296:13: note: in instantiation of function template specialization 'std::allocator<nlohmann::basic_json<>>::construct<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
        __a.construct(__p, _VSTD::forward<_Args>(__args)...);
            ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/uninitialized_algorithms.h:553:31: note: (skipping 7 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    allocator_traits<_Alloc>::construct(__alloc, std::__to_address(__first2), *__first1);
                              ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:820:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json<nlohmann::basic_json<>, std::vector<bool>, 0>' requested here
    return to_json(j, std::forward<T>(val));
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:834:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::call<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    return call(j, std::forward<T>(val), priority_tag<1>{});
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:915:5: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::operator()<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    ::nlohmann::to_json(j, std::forward<ValueType>(val));
    ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:1967:24: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::vector<bool>>::to_json<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
                       ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_message_types.hpp:146:30: note: in instantiation of function template specialization 'nlohmann::basic_json<>::basic_json<const std::vector<bool> &, std::vector<bool>, 0>' requested here
           {"enabledLayers", o.enabled_layers},
                             ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:825:41: note: expression evaluates to '16 == 0'
    static_assert(sizeof(BasicJsonType) == 0,
                  ~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from /Users/arturo/Desktop/flightmare/flightlib/src/envs/test_env.cpp:1:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/envs/test_env.hpp:10:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/envs/quadrotor_env/quadrotor_env.hpp:12:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_bridge.hpp:22:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_message_types.hpp:17:
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:825:5: error: static assertion failed due to requirement 'sizeof(nlohmann::basic_json<std::map, std::vector, std::string, bool, long long, unsigned long long, double, std::allocator, nlohmann::adl_serializer>) == 0': could not find to_json() method in T's namespace
    static_assert(sizeof(BasicJsonType) == 0,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:834:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::call<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    return call(j, std::forward<T>(val), priority_tag<1>{});
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:915:5: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::operator()<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    ::nlohmann::to_json(j, std::forward<ValueType>(val));
    ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:1967:24: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::__bit_const_reference<std::vector<bool>>>::to_json<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
                       ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/allocator.h:168:28: note: in instantiation of function template specialization 'nlohmann::basic_json<>::basic_json<std::__bit_const_reference<std::vector<bool>>, std::__bit_const_reference<std::vector<bool>>, 0>' requested here
        ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
                           ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/allocator_traits.h:296:13: note: in instantiation of function template specialization 'std::allocator<nlohmann::basic_json<>>::construct<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
        __a.construct(__p, _VSTD::forward<_Args>(__args)...);
            ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/uninitialized_algorithms.h:553:31: note: (skipping 7 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    allocator_traits<_Alloc>::construct(__alloc, std::__to_address(__first2), *__first1);
                              ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:820:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json<nlohmann::basic_json<>, std::vector<bool>, 0>' requested here
    return to_json(j, std::forward<T>(val));
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:834:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::call<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    return call(j, std::forward<T>(val), priority_tag<1>{});
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:915:5: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::operator()<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    ::nlohmann::to_json(j, std::forward<ValueType>(val));
    ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:1967:24: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::vector<bool>>::to_json<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
                       ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_message_types.hpp:146:30: note: in instantiation of function template specialization 'nlohmann::basic_json<>::basic_json<const std::vector<bool> &, std::vector<bool>, 0>' requested here
           {"enabledLayers", o.enabled_layers},
                             ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:825:41: note: expression evaluates to '16 == 0'
    static_assert(sizeof(BasicJsonType) == 0,
                  ~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from /Users/arturo/Desktop/flightmare/flightlib/src/envs/quadrotor_env/quadrotor_env.cpp:1:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/envs/quadrotor_env/quadrotor_env.hpp:12:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_bridge.hpp:22:
In file included from /Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_message_types.hpp:17:
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:825:5: error: static assertion failed due to requirement 'sizeof(nlohmann::basic_json<std::map, std::vector, std::string, bool, long long, unsigned long long, double, std::allocator, nlohmann::adl_serializer>) == 0': could not find to_json() method in T's namespace
    static_assert(sizeof(BasicJsonType) == 0,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:834:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::call<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    return call(j, std::forward<T>(val), priority_tag<1>{});
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:915:5: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::operator()<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    ::nlohmann::to_json(j, std::forward<ValueType>(val));
    ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:1967:24: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::__bit_const_reference<std::vector<bool>>>::to_json<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
    JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
                       ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/allocator.h:168:28: note: in instantiation of function template specialization 'nlohmann::basic_json<>::basic_json<std::__bit_const_reference<std::vector<bool>>, std::__bit_const_reference<std::vector<bool>>, 0>' requested here
        ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
                           ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/allocator_traits.h:296:13: note: in instantiation of function template specialization 'std::allocator<nlohmann::basic_json<>>::construct<nlohmann::basic_json<>, std::__bit_const_reference<std::vector<bool>>>' requested here
        __a.construct(__p, _VSTD::forward<_Args>(__args)...);
            ^
/opt/homebrew/opt/llvm/bin/../include/c++/v1/__memory/uninitialized_algorithms.h:553:31: note: (skipping 7 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    allocator_traits<_Alloc>::construct(__alloc, std::__to_address(__first2), *__first1);
                              ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:820:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json<nlohmann::basic_json<>, std::vector<bool>, 0>' requested here
    return to_json(j, std::forward<T>(val));
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:834:12: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::call<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    return call(j, std::forward<T>(val), priority_tag<1>{});
           ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:915:5: note: in instantiation of function template specialization 'nlohmann::detail::to_json_fn::operator()<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    ::nlohmann::to_json(j, std::forward<ValueType>(val));
    ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:1967:24: note: in instantiation of function template specialization 'nlohmann::adl_serializer<std::vector<bool>>::to_json<nlohmann::basic_json<>, const std::vector<bool> &>' requested here
    JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));
                       ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/bridges/unity_message_types.hpp:146:30: note: in instantiation of function template specialization 'nlohmann::basic_json<>::basic_json<const std::vector<bool> &, std::vector<bool>, 0>' requested here
           {"enabledLayers", o.enabled_layers},
                             ^
/Users/arturo/Desktop/flightmare/flightlib/include/flightlib/json/json.hpp:825:41: note: expression evaluates to '16 == 0'
    static_assert(sizeof(BasicJsonType) == 0,
                  ~~~~~~~~~~~~~~~~~~~~~~^~~~
1 error generated.
make[2]: *** [CMakeFiles/flightlib.dir/src/bridges/unity_bridge.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
make[2]: *** [CMakeFiles/flightlib.dir/src/envs/test_env.cpp.o] Error 1
1 error generated.
make[2]: *** [CMakeFiles/flightlib.dir/src/envs/vec_env.cpp.o] Error 1
1 error generated.
make[2]: *** [CMakeFiles/flightlib.dir/src/envs/quadrotor_env/quadrotor_env.cpp.o] Error 1
make[1]: *** [CMakeFiles/flightlib.dir/all] Error 2
make: *** [all] Error 2
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

1 participant