Tdesktop: [Question] Build failure, Linux. Failed to build lib_storage

Created on 21 Aug 2020  Â·  9Comments  Â·  Source: telegramdesktop/tdesktop

Trying to build version 2.2.0 on Ubuntu Groovy, the same as in here
And I get this compilation error, which is quite bizarre given the fact the same version on the same platform with the same config is already built with no problem

[ 15%] Building CXX object Telegram/lib_storage/CMakeFiles/lib_storage.dir/storage/cache/storage_cache_compactor.cpp.o
cd /<<BUILDDIR>>/telegram-desktop-2.2.0+ds/obj-x86_64-linux-gnu/Telegram/lib_storage && /usr/bin/c++  -DDESKTOP_APP_DISABLE_CRASH_REPOR
TS -DDESKTOP_APP_USE_PACKAGED -DDESKTOP_APP_USE_PACKAGED_FONTS -DDESKTOP_APP_USE_PACKAGED_RLOTTIE -DNDEBUG -DQT_CORE_LIB -DQT_DBUS_LIB 
-DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_WAYLANDCLIENT_LIB -DQT_WIDGETS_LIB -DQT_XKBCOMMON_SUPPORT_LIB -I/<<BUILDDIR>>/telegram
-desktop-2.2.0+ds/Telegram/lib_storage -I/<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_base -I/<<BUILDDIR>>/telegram-desktop-2.2
.0+ds/Telegram/lib_rpl -I/<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_crl -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.1
4.2 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore/5.14.2/QtCore -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui/5.14.2 -isystem /u
sr/include/x86_64-linux-gnu/qt5/QtGui/5.14.2/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtXkbCommonSupport/5.14.2 -isystem /usr/i
nclude/x86_64-linux-gnu/qt5/QtXkbCommonSupport/5.14.2/QtXkbCommonSupport -isystem /<<BUILDDIR>>/telegram-desktop-2.2.0+ds/debian/qtwayl
and -isystem /<<BUILDDIR>>/telegram-desktop-2.2.0+ds/debian/qtwayland/QtWaylandClient -isystem /usr/include/x86_64-linux-gnu/qt5 -isyst
em /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux
-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/
include/x86_64-linux-gnu/qt5/QtDBus -isystem /usr/include/x86_64-linux-gnu/qt5/QtXkbCommonSupport -isystem /usr/include/x86_64-linux-gn
u/qt5/QtWaylandClient  -g -O2 -fdebug-prefix-map=/<<BUILDDIR>>/telegram-desktop-2.2.0+ds=. -fstack-protector-strong -Wformat -Werror=fo
rmat-security -Wdate-time -D_FORTIFY_SOURCE=2   -fno-strict-aliasing -pipe -Wall -W -fPIC -Wno-unused-variable -Wno-unused-parameter -W
no-unused-function -Wno-switch -Wno-comment -Wno-unused-but-set-variable -Wno-missing-field-initializers -Wno-sign-compare -Wno-attribu
tes -Wno-parentheses -Wno-stringop-overflow -Wno-maybe-uninitialized -Wno-error=class-memaccess -std=gnu++17 -Winvalid-pch -include /<<
BUILDDIR>>/telegram-desktop-2.2.0+ds/obj-x86_64-linux-gnu/Telegram/lib_storage/CMakeFiles/lib_storage.dir/cmake_pch.hxx -o CMakeFiles/l
ib_storage.dir/storage/cache/storage_cache_compactor.cpp.o -c /<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_storage/storage/cach
e/storage_cache_compactor.cpp
/<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_storage/storage/cache/storage_cache_compactor.cpp: In instantiation of ‘Storage::C
ache::details::CompactorObject::fillList(Storage::Cache::details::CompactorObject::RawSpan)::<lambda(auto:293&)> [with auto:293 = const
 std::vector<Storage::Cache::details::Store>]’:
/usr/include/mapbox/variant.hpp:203:72:   required by substitution of ‘template<class F, class ... Args> struct mapbox::util::detail::d
educed_result_type<F(Args ...), decltype ((void)(declval<F>()((declval<Args>)()...)))> [with F = mapbox::util::visitor<Storage::Cache::details::CompactorObject::fillList(Storage::Cache::details::CompactorObject::RawSpan)::<lambda(auto:293&)> >&&; Args = {const std::vector<Storage::Cache::details::Store, std::allocator<Storage::Cache::details::Store> >&}]’
/usr/include/mapbox/variant.hpp:209:8:   required from ‘struct mapbox::util::detail::visitor_result_type<mapbox::util::visitor<Storage::Cache::details::CompactorObject::fillList(Storage::Cache::details::CompactorObject::RawSpan)::<lambda(auto:293&)> >&&(const std::vector<Storage::Cache::details::Store>&), void>’
/usr/include/mapbox/variant.hpp:220:7:   required by substitution of ‘template<class F, class T> using result_of_unary_visit = typename mapbox::util::detail::visitor_result_type<F&&(T&&)>::type [with F = mapbox::util::visitor<Storage::Cache::details::CompactorObject::fillList(Storage::Cache::details::CompactorObject::RawSpan)::<lambda(auto:293&)> >; T = const std::vector<Storage::Cache::details::Store>&]’
/usr/include/mapbox/variant.hpp:835:15:   required by substitution of ‘template<class F, class V, class T0, class R> static R mapbox::util::variant<std::vector<Storage::Cache::details::Store, std::allocator<Storage::Cache::details::Store> >, std::vector<Storage::Cache::details::StoreWithTime, std::allocator<Storage::Cache::details::StoreWithTime> > >::visit<F, V, T0, R>(V&&, F&&) [with F = mapbox::util::visitor<Storage::Cache::details::CompactorObject::fillList(Storage::Cache::details::CompactorObject::RawSpan)::<lambda(auto:293&)> >; V = const mapbox::util::variant<std::vector<Storage::Cache::details::Store, std::allocator<Storage::Cache::details::Store> >, std::vector<Storage::Cache::details::StoreWithTime, std::allocator<Storage::Cache::details::StoreWithTime> > >&; T0 = const std::vector<Storage::Cache::details::Store>&; R = <missing>]’
/usr/include/mapbox/variant.hpp:855:35:   required by substitution of ‘template<class ... Fs> decltype (((const mapbox::util::variant<std::vector<Storage::Cache::details::Store, std::allocator<Storage::Cache::details::Store> >, std::vector<Storage::Cache::details::StoreWithTime, std::allocator<Storage::Cache::details::StoreWithTime> > >*)this)->mapbox::util::variant<std::vector<Storage::Cache::details::Store, std::allocator<Storage::Cache::details::Store> >, std::vector<Storage::Cache::details::StoreWithTime, std::allocator<Storage::Cache::details::StoreWithTime> > >::visit<F, V, T0, R>((*(const mapbox::util::variant<std::vector<Storage::Cache::details::Store, std::allocator<Storage::Cache::details::Store> >, std::vector<Storage::Cache::details::StoreWithTime, std::allocator<Storage::Cache::details::StoreWithTime> > >*)this), mapbox::util::make_visitor((forward<Fs>)(mapbox::util::variant<Types ...>::match::fs)...))) mapbox::util::variant<std::vector<Storage::Cache::details::Store, std::allocator<Storage::Cache::details::Store> >, std::vector<Storage::Cache::details::StoreWithTime, std::allocator<Storage::Cache::details::StoreWithTime> > >::match<Fs ...>(Fs&& ...) const & [with Fs = {Storage::Cache::details::CompactorObject::fillList(Storage::Cache::details::CompactorObject::RawSpan)::<lambda(auto:293&)>}]’
/<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_storage/storage/cache/storage_cache_compactor.cpp:336:3:   required from here
/<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_storage/storage/cache/storage_cache_compactor.cpp:335:18: error: no matching function for call to ‘Storage::Cache::details::CompactorObject::fillList(const std::vector<Storage::Cache::details::Store>&, Storage::Cache::details::CompactorObject::RawSpan&)’
  335 |   return fillList(list, values);
      |          ~~~~~~~~^~~~~~~~~~~~~~
/<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_storage/storage/cache/storage_cache_compactor.cpp:333:6: note: candidate: ‘Storage::Cache::details::CompactorObject::RawSpan Storage::Cache::details::CompactorObject::fillList(Storage::Cache::details::CompactorObject::RawSpan)’
  333 | auto CompactorObject::fillList(RawSpan values) -> RawSpan {
      |      ^~~~~~~~~~~~~~~
/<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_storage/storage/cache/storage_cache_compactor.cpp:333:6: note:   candidate expects 1 argument, 2 provided
/<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_storage/storage/cache/storage_cache_compactor.cpp:56:10: note: candidate: ‘template<class RecordStore> Storage::Cache::details::CompactorObject::RawSpan Storage::Cache::details::CompactorObject::fillList(std::vector<T>&, Storage::Cache::details::CompactorObject::RawSpan)’
   56 |  RawSpan fillList(std::vector<RecordStore> &list, RawSpan values);
      |          ^~~~~~~~
/<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_storage/storage/cache/storage_cache_compactor.cpp:56:10: note:   template argument deduction/substitution failed:
/<<BUILDDIR>>/telegram-desktop-2.2.0+ds/Telegram/lib_storage/storage/cache/storage_cache_compactor.cpp:335:18: note:   types ‘std::vector<T>’ and ‘const std::vector<Storage::Cache::details::Store>’ have incompatible cv-qualifiers
  335 |   return fillList(list, values);
      |          ~~~~~~~~^~~~~~~~~~~~~~
question

Most helpful comment

@mymedia2 @xvitaly @loimu

Next version will remove the mapbox variant dependency.

All 9 comments

You have an incompatible version of the mapbox library.

How come? Is it backwards incompatible? It wasn't even a major version upgrade, just a dot version

Is it backwards incompatible?

I guess not if you're here

How does the binary work though, being incompatible on an API level?

mapbox-variant is a header-only library.

Same issue on Fedora 33+. mapbox-variant 1.2.0 update broke API.

@Aokromes could you please leave a link how you fix the bug?

the type of this issue is question and the question was answered (and AFAIK there are no plans to move to the new release of mapbox-variant)

@mymedia2 @xvitaly @loimu

Next version will remove the mapbox variant dependency.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Liudvikas picture Liudvikas  Â·  3Comments

ArmeF97 picture ArmeF97  Â·  3Comments

TotalKrill picture TotalKrill  Â·  3Comments

Justinzobel picture Justinzobel  Â·  3Comments

whywhyy picture whywhyy  Â·  3Comments