Skip to content
This repository has been archived by the owner on Oct 17, 2019. It is now read-only.

Build failure: no viable conversion... #179

Closed
alphapapa opened this issue Dec 21, 2017 · 3 comments
Closed

Build failure: no viable conversion... #179

alphapapa opened this issue Dec 21, 2017 · 3 comments

Comments

@alphapapa
Copy link
Contributor

System:

  • Nheko commit/version: ece20dd
  • Operating System: Ubuntu Trusty 14.04
  • Qt version: 5.9
  • C++ compiler: clang 3.6
[ 65%] Building CXX object CMakeFiles/nheko.dir/src/RoomList.cc.o
/home/me/tmp/src/nheko/src/RoomInfoListItem.cc:61:18: error: no viable conversion from 'typename std::remove_reference<InvitedRoom &>::type' (aka 'mtx::responses::InvitedRoom') to 'std::vector<events::collections::StrippedEvents>'
  , invitedRoom_{std::move(room)}
                 ^~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_vector.h:320:7: note: candidate constructor not viable: no known conversion from 'typename std::remove_reference<InvitedRoom &>::type'
      (aka 'mtx::responses::InvitedRoom') to 'const std::vector<mpark::variant<mtx::events::StrippedEvent<mtx::events::state::Aliases>, mtx::events::StrippedEvent<mtx::events::state::Avatar>,
      mtx::events::StrippedEvent<mtx::events::state::CanonicalAlias>, mtx::events::StrippedEvent<mtx::events::state::Create>, mtx::events::StrippedEvent<mtx::events::state::GuestAccess>,
      mtx::events::StrippedEvent<mtx::events::state::HistoryVisibility>, mtx::events::StrippedEvent<mtx::events::state::JoinRules>, mtx::events::StrippedEvent<mtx::events::state::Member>, mtx::events::StrippedEvent<mtx::events::state::Name>,
      mtx::events::StrippedEvent<mtx::events::state::PinnedEvents>, mtx::events::StrippedEvent<mtx::events::state::PowerLevels>, mtx::events::StrippedEvent<mtx::events::state::Topic> >,
      std::allocator<mpark::variant<mtx::events::StrippedEvent<mtx::events::state::Aliases>, mtx::events::StrippedEvent<mtx::events::state::Avatar>, mtx::events::StrippedEvent<mtx::events::state::CanonicalAlias>,
      mtx::events::StrippedEvent<mtx::events::state::Create>, mtx::events::StrippedEvent<mtx::events::state::GuestAccess>, mtx::events::StrippedEvent<mtx::events::state::HistoryVisibility>,
      mtx::events::StrippedEvent<mtx::events::state::JoinRules>, mtx::events::StrippedEvent<mtx::events::state::Member>, mtx::events::StrippedEvent<mtx::events::state::Name>, mtx::events::StrippedEvent<mtx::events::state::PinnedEvents>,
      mtx::events::StrippedEvent<mtx::events::state::PowerLevels>, mtx::events::StrippedEvent<mtx::events::state::Topic> > > > &' for 1st argument
      vector(const vector& __x)
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_vector.h:337:7: note: candidate constructor not viable: no known conversion from 'typename std::remove_reference<InvitedRoom &>::type'
      (aka 'mtx::responses::InvitedRoom') to 'std::vector<mpark::variant<mtx::events::StrippedEvent<mtx::events::state::Aliases>, mtx::events::StrippedEvent<mtx::events::state::Avatar>,
      mtx::events::StrippedEvent<mtx::events::state::CanonicalAlias>, mtx::events::StrippedEvent<mtx::events::state::Create>, mtx::events::StrippedEvent<mtx::events::state::GuestAccess>,
      mtx::events::StrippedEvent<mtx::events::state::HistoryVisibility>, mtx::events::StrippedEvent<mtx::events::state::JoinRules>, mtx::events::StrippedEvent<mtx::events::state::Member>, mtx::events::StrippedEvent<mtx::events::state::Name>,
      mtx::events::StrippedEvent<mtx::events::state::PinnedEvents>, mtx::events::StrippedEvent<mtx::events::state::PowerLevels>, mtx::events::StrippedEvent<mtx::events::state::Topic> >,
      std::allocator<mpark::variant<mtx::events::StrippedEvent<mtx::events::state::Aliases>, mtx::events::StrippedEvent<mtx::events::state::Avatar>, mtx::events::StrippedEvent<mtx::events::state::CanonicalAlias>,
      mtx::events::StrippedEvent<mtx::events::state::Create>, mtx::events::StrippedEvent<mtx::events::state::GuestAccess>, mtx::events::StrippedEvent<mtx::events::state::HistoryVisibility>,
      mtx::events::StrippedEvent<mtx::events::state::JoinRules>, mtx::events::StrippedEvent<mtx::events::state::Member>, mtx::events::StrippedEvent<mtx::events::state::Name>, mtx::events::StrippedEvent<mtx::events::state::PinnedEvents>,
      mtx::events::StrippedEvent<mtx::events::state::PowerLevels>, mtx::events::StrippedEvent<mtx::events::state::Topic> > > > &&' for 1st argument
      vector(vector&& __x) noexcept
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_vector.h:375:7: note: candidate constructor not viable: no known conversion from 'typename std::remove_reference<InvitedRoom &>::type'
      (aka 'mtx::responses::InvitedRoom') to 'initializer_list<value_type>' for 1st argument
      vector(initializer_list<value_type> __l,
      ^
[ 66%] Building CXX object CMakeFiles/nheko.dir/src/RoomMessages.cc.o
[ 66%] Building CXX object CMakeFiles/nheko.dir/src/RoomState.cc.o
1 error generated.
make[2]: *** [CMakeFiles/nheko.dir/src/RoomInfoListItem.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/me/tmp/src/nheko/build'
make[1]: *** [CMakeFiles/nheko.dir/all] Error 2
make[1]: Leaving directory `/home/me/tmp/src/nheko/build'
make: *** [all] Error 2
make: Leaving directory `/home/me/tmp/src/nheko/build'
@alphapapa
Copy link
Contributor Author

Still happens on latest commit:

[ 65%] Building CXX object CMakeFiles/nheko.dir/src/RoomList.cc.o
[ 66%] Building CXX object CMakeFiles/nheko.dir/src/RoomMessages.cc.o
/home/me/tmp/src/nheko/src/RoomInfoListItem.cc:61:18: error: no viable conversion from 'typename std::remove_reference<InvitedRoom &>::type' (aka 'mtx::responses::InvitedRoom') to 'std::vector<events::collections::StrippedEvents>'
  , invitedRoom_{std::move(room)}
                 ^~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_vector.h:320:7: note: candidate constructor not viable: no known conversion from 'typename std::remove_reference<InvitedRoom &>::type'
      (aka 'mtx::responses::InvitedRoom') to 'const std::vector<mpark::variant<mtx::events::StrippedEvent<mtx::events::state::Aliases>, mtx::events::StrippedEvent<mtx::events::state::Avatar>,
      mtx::events::StrippedEvent<mtx::events::state::CanonicalAlias>, mtx::events::StrippedEvent<mtx::events::state::Create>, mtx::events::StrippedEvent<mtx::events::state::GuestAccess>,
      mtx::events::StrippedEvent<mtx::events::state::HistoryVisibility>, mtx::events::StrippedEvent<mtx::events::state::JoinRules>, mtx::events::StrippedEvent<mtx::events::state::Member>, mtx::events::StrippedEvent<mtx::events::state::Name>,
      mtx::events::StrippedEvent<mtx::events::state::PinnedEvents>, mtx::events::StrippedEvent<mtx::events::state::PowerLevels>, mtx::events::StrippedEvent<mtx::events::state::Topic> >,
      std::allocator<mpark::variant<mtx::events::StrippedEvent<mtx::events::state::Aliases>, mtx::events::StrippedEvent<mtx::events::state::Avatar>, mtx::events::StrippedEvent<mtx::events::state::CanonicalAlias>,
      mtx::events::StrippedEvent<mtx::events::state::Create>, mtx::events::StrippedEvent<mtx::events::state::GuestAccess>, mtx::events::StrippedEvent<mtx::events::state::HistoryVisibility>,
      mtx::events::StrippedEvent<mtx::events::state::JoinRules>, mtx::events::StrippedEvent<mtx::events::state::Member>, mtx::events::StrippedEvent<mtx::events::state::Name>, mtx::events::StrippedEvent<mtx::events::state::PinnedEvents>,
      mtx::events::StrippedEvent<mtx::events::state::PowerLevels>, mtx::events::StrippedEvent<mtx::events::state::Topic> > > > &' for 1st argument
      vector(const vector& __x)
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_vector.h:337:7: note: candidate constructor not viable: no known conversion from 'typename std::remove_reference<InvitedRoom &>::type'
      (aka 'mtx::responses::InvitedRoom') to 'std::vector<mpark::variant<mtx::events::StrippedEvent<mtx::events::state::Aliases>, mtx::events::StrippedEvent<mtx::events::state::Avatar>,
      mtx::events::StrippedEvent<mtx::events::state::CanonicalAlias>, mtx::events::StrippedEvent<mtx::events::state::Create>, mtx::events::StrippedEvent<mtx::events::state::GuestAccess>,
      mtx::events::StrippedEvent<mtx::events::state::HistoryVisibility>, mtx::events::StrippedEvent<mtx::events::state::JoinRules>, mtx::events::StrippedEvent<mtx::events::state::Member>, mtx::events::StrippedEvent<mtx::events::state::Name>,
      mtx::events::StrippedEvent<mtx::events::state::PinnedEvents>, mtx::events::StrippedEvent<mtx::events::state::PowerLevels>, mtx::events::StrippedEvent<mtx::events::state::Topic> >,
      std::allocator<mpark::variant<mtx::events::StrippedEvent<mtx::events::state::Aliases>, mtx::events::StrippedEvent<mtx::events::state::Avatar>, mtx::events::StrippedEvent<mtx::events::state::CanonicalAlias>,
      mtx::events::StrippedEvent<mtx::events::state::Create>, mtx::events::StrippedEvent<mtx::events::state::GuestAccess>, mtx::events::StrippedEvent<mtx::events::state::HistoryVisibility>,
      mtx::events::StrippedEvent<mtx::events::state::JoinRules>, mtx::events::StrippedEvent<mtx::events::state::Member>, mtx::events::StrippedEvent<mtx::events::state::Name>, mtx::events::StrippedEvent<mtx::events::state::PinnedEvents>,
      mtx::events::StrippedEvent<mtx::events::state::PowerLevels>, mtx::events::StrippedEvent<mtx::events::state::Topic> > > > &&' for 1st argument
      vector(vector&& __x) noexcept
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_vector.h:375:7: note: candidate constructor not viable: no known conversion from 'typename std::remove_reference<InvitedRoom &>::type'
      (aka 'mtx::responses::InvitedRoom') to 'initializer_list<value_type>' for 1st argument
      vector(initializer_list<value_type> __l,
      ^
[ 66%] Building CXX object CMakeFiles/nheko.dir/src/RoomState.cc.o
1 error generated.
make[2]: *** [CMakeFiles/nheko.dir/src/RoomInfoListItem.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/home/me/tmp/src/nheko/build'
make[1]: *** [CMakeFiles/nheko.dir/all] Error 2
make[1]: Leaving directory `/home/me/tmp/src/nheko/build'
make: *** [all] Error 2
make: Leaving directory `/home/me/tmp/src/nheko/build'

Thanks.

@mujx
Copy link
Owner

mujx commented Dec 26, 2017

This is most likely an issue with the compiler (newer version is required).

@alphapapa
Copy link
Contributor Author

I was able to install Clang 3.8 from Ubuntu's repos and it worked. Thanks.

alphapapa added a commit to alphapapa/nheko that referenced this issue Dec 26, 2017
@mujx mujx closed this as completed in #182 Dec 26, 2017
mujx pushed a commit that referenced this issue Dec 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants