telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.44k stars 5.26k forks source link

[Question] Build failure, Linux. Failed to build lib_storage #8471

Closed loimu closed 4 years ago

loimu commented 4 years ago

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);
      |          ~~~~~~~~^~~~~~~~~~~~~~
ilya-fedin commented 4 years ago

You have an incompatible version of the mapbox library.

loimu commented 4 years ago

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

ilya-fedin commented 4 years ago

Is it backwards incompatible?

I guess not if you're here

loimu commented 4 years ago

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

ilya-fedin commented 4 years ago

mapbox-variant is a header-only library.

xvitaly commented 4 years ago

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

mymedia2 commented 4 years ago

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

ilya-fedin commented 4 years ago

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)

john-preston commented 4 years ago

@mymedia2 @xvitaly @loimu

Next version will remove the mapbox variant dependency.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.