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

tdesktop 3.5.x and 3.6.x compilation with clang 13-14 failed #24014

Closed
h0tc0d3 opened this issue Feb 3, 2022 · 3 comments · Fixed by #24435
Closed

tdesktop 3.5.x and 3.6.x compilation with clang 13-14 failed #24014

h0tc0d3 opened this issue Feb 3, 2022 · 3 comments · Fixed by #24435
Labels

Comments

@h0tc0d3
Copy link

h0tc0d3 commented Feb 3, 2022

Steps to reproduce

Build with clang 13. The previous version tdesktop worked fine.

Expected behaviour

Actual behaviour

[ 53%] Building CXX object Telegram/CMakeFiles/Telegram.dir/SourceFiles/api/api_hash.cpp.o
[ 53%] Building CXX object Telegram/CMakeFiles/Telegram.dir/SourceFiles/api/api_polls.cpp.o
[ 53%] Building CXX object Telegram/CMakeFiles/Telegram.dir/SourceFiles/api/api_sending.cpp.o
In file included from <built-in>:485:
In file included from /build/telegram-desktop/src/build/Telegram/CMakeFiles/Telegram.dir/cmake_pch.hxx:5:
In file included from /build/telegram-desktop/src/tdesktop-3.5.0-full/Telegram/SourceFiles/stdafx.h:102:
In file included from /usr/include/range/v3/all.hpp:17:
In file included from /usr/include/range/v3/action.hpp:32:
In file included from /usr/include/range/v3/action/split.hpp:28:
/usr/include/range/v3/range/conversion.hpp:379:29: error: alias template 'QVector' requires template arguments; argument deduction only allowed for class templates
                -> decltype(ContT(range_cpp17_iterator_t<Rng>{},
                            ^
/usr/include/meta/meta.hpp:541:5: note: in instantiation of template class 'ranges::detail::from_range<QVector>' requested here
    using invoke = typename Fn::template invoke<Args...>;
    ^
/usr/include/range/v3/range/conversion.hpp:46:13: note: in instantiation of template type alias 'invoke' requested here
            using container_t = meta::invoke<MetaFn, Rng>;
            ^
/usr/include/range/v3/range/conversion.hpp:338:46: note: in instantiation of template type alias 'container_t' requested here
                    convertible_to_cont<Rng, container_t<MetaFn, Rng>>)
                                             ^
/usr/include/range/v3/detail/prologue.hpp:35:26: note: expanded from macro 'template'
    template<__VA_ARGS__ CPP_TEMPLATE_AUX_                                                               ^
/usr/include/range/v3/range/conversion.hpp:304:13: note: in instantiation of template class 'ranges::detail::to_container::fn<ranges::detail::from_range<QVector>>' requested here
          , Fn
            ^
/usr/include/range/v3/range/conversion.hpp:425:20: note: in instantiation of template class 'ranges::detail::to_container::closure<ranges::detail::from_range<QVector>, ranges::detail::to_container::fn<ranges::detail::from_range<QVector>>>' requested here
            return detail::to_container_fn<detail::from_range<ContT>>{}(
                   ^
/build/telegram-desktop/src/tdesktop-3.5.0-full/Telegram/SourceFiles/api/api_media.cpp:86:12: note: in instantiation of function template specialization 'ranges::_to_::to<QVector, std::vector<tl::boxed<MTPinputDocument>> &>' requested here
                        ranges::to<QVector>(info.attachedStickers)),
                                ^
/usr/include/qt6/QtCore/qcontainerfwd.h:63:22: note: template is declared here
template<typename T> using QVector = QList<T>;
                     ^
In file included from <built-in>:485:
In file included from /build/telegram-desktop/src/build/Telegram/CMakeFiles/Telegram.dir/cmake_pch.hxx:5:
In file included from /build/telegram-desktop/src/tdesktop-3.5.0-full/Telegram/SourceFiles/stdafx.h:102:
In file included from /usr/include/range/v3/all.hpp:17:
In file included from /usr/include/range/v3/action.hpp:32:
In file included from /usr/include/range/v3/action/split.hpp:28:
/usr/include/range/v3/range/conversion.hpp:425:20: error: type 'detail::to_container_fn<detail::from_range<QVector>>' (aka 'closure<ranges::detail::from_range<QVector>, ranges::detail::to_container::fn<ranges::detail::from_range<QVector>>>') does not provide a call operator
            return detail::to_container_fn<detail::from_range<ContT>>{}(
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/telegram-desktop/src/tdesktop-3.5.0-full/Telegram/SourceFiles/api/api_media.cpp:86:12: note: in instantiation of function template specialization 'ranges::_to_::to<QVector, std::vector<tl::boxed<MTPinputDocument>> &>' requested here
                        ranges::to<QVector>(info.attachedStickers)),
                                ^
2 errors generated.
make[2]: *** [Telegram/CMakeFiles/Telegram.dir/build.make:493: Telegram/CMakeFiles/Telegram.dir/SourceFiles/api/api_media.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:1550: Telegram/CMakeFiles/Telegram.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Build failed, check /build

Operating system

Linux

Version of Telegram Desktop

3.5.0

Installation source

Other (unofficial) source

Logs

No response

@h0tc0d3 h0tc0d3 added the bug label Feb 3, 2022
@h0tc0d3
Copy link
Author

h0tc0d3 commented Feb 21, 2022

Any ideas?

@h0tc0d3 h0tc0d3 changed the title tdesktop 3.5.0 compilation with clang 13 failed tdesktop 3.5.x compilation with clang 13 failed Feb 22, 2022
@h0tc0d3
Copy link
Author

h0tc0d3 commented Mar 14, 2022

@john-preston ericniebler/range-v3#1691 (comment)

That's a language limitation due to a feature Clang has yet to implement. This can't be fixed on Range-v3's side, so you'd have to report to whomever is calling ranges::to<QVector>.

Affect only Qt6. Does not affect Qt5.

@h0tc0d3 h0tc0d3 changed the title tdesktop 3.5.x compilation with clang 13 failed tdesktop 3.5.x and 3.6.x compilation with clang 13 failed Mar 14, 2022
@h0tc0d3 h0tc0d3 changed the title tdesktop 3.5.x and 3.6.x compilation with clang 13 failed tdesktop 3.5.x and 3.6.x compilation with clang 13-14 failed Mar 23, 2022
@h0tc0d3
Copy link
Author

h0tc0d3 commented Mar 23, 2022

@john-preston Affects llvm 14 too.

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

Successfully merging a pull request may close this issue.

1 participant