open-webrtc-toolkit / owt-client-native

Open WebRTC Toolkit client SDK for native Windows/Linux/iOS applications.
https://01.org/open-webrtc-toolkit
Apache License 2.0
384 stars 180 forks source link

OWT fails to build with latest MSVC 2022 - 17.8.0 #736

Open dvrogozh opened 7 months ago

dvrogozh commented 7 months ago

We are trying to update OWT on our side to the latest, i.e. from 8ae3944d to 4fb6299b. We use these dockerfiles:

Build which worked for us before started to fail yesterday. We believe this might be some issue uncovered with MSVC toolchain update:

Build errors:

../../talk/owt/sdk/base/customizedframescapturer.cc(33): error C2676: binary '<<': 'rtc::webrtc_checks_impl::LogStreamer<>' does not define this operator or a conversion to a type acceptable to the predefined operator
C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(243): note: could be 'rtc::webrtc_checks_impl::LogStreamer<V> rtc::webrtc_checks_impl::LogStreamer<>::operator <<(const U &) const'
../../talk/owt/sdk/base/customizedframescapturer.cc(33): note: 'rtc::webrtc_checks_impl::LogStreamer<V> rtc::webrtc_checks_impl::LogStreamer<>::operator <<(const U &) const': could not deduce template argument for 'V'
C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(235): note: or       'rtc::webrtc_checks_impl::LogStreamer<V> rtc::webrtc_checks_impl::LogStreamer<>::operator <<(U) const'
../../talk/owt/sdk/base/customizedframescapturer.cc(33): note: 'rtc::webrtc_checks_impl::LogStreamer<V> rtc::webrtc_checks_impl::LogStreamer<>::operator <<(U) const': could not deduce template argument for 'V'

C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(244): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'rtc::webrtc_checks_impl::LogStreamer<rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kStdString,const std::string *>>'
C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(244): note: 'rtc::webrtc_checks_impl::LogStreamer<rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kStdString,const std::string *>>::LogStreamer': no overloaded function could convert all the argument types
C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(280): note: could be 'rtc::webrtc_checks_impl::LogStreamer<rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kStdString,const std::string *>>::LogStreamer(T,const rtc::webrtc_checks_impl::LogStreamer<> *)'
        with
        [
            T=rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kStdString,const std::string *>
        ]
C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(244): note: 'rtc::webrtc_checks_impl::LogStreamer<rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kStdString,const std::string *>>::LogStreamer(T,const rtc::webrtc_checks_impl::LogStreamer<> *)': cannot convert argument 1 from 'rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>' to 'T'
        with
        [
            T=rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kStdString,const std::string *>
        ]
C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(244): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(244): note: while trying to match the argument list '(rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kCharP,const char *>, const rtc::webrtc_checks_impl::LogStreamer<> *)'
C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(244): note: the template instantiation context (the oldest one first) is
C:\buildhome\src\third_party\webrtc\api/units/data_rate.h(85): note: see reference to function template instantiation 'rtc::webrtc_checks_impl::LogStreamer<rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kStdString,const std::string *>> rtc::webrtc_checks_impl::LogStreamer<>::operator <<<char[47],rtc::webrtc_checks_impl::Val<rtc::webrtc_checks_impl::CheckArgType::kStdString,const std::string *>,0x0>(const U (&)) const' being compiled
        with
        [
            U=char [47]
        ]

C:\buildhome\src\third_party\webrtc\logging/rtc_event_log/events/rtc_event_field_encoding.h(113): error C2676: binary '<<': 'rtc::webrtc_checks_impl::LogStreamer<>' does not define this operator or a conversion to a type acceptable to the predefined operator
C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(243): note: could be 'rtc::webrtc_checks_impl::LogStreamer<V> rtc::webrtc_checks_impl::LogStreamer<>::operator <<(const U &) const'
C:\buildhome\src\third_party\webrtc\logging/rtc_event_log/events/rtc_event_field_encoding.h(113): note: 'rtc::webrtc_checks_impl::LogStreamer<V> rtc::webrtc_checks_impl::LogStreamer<>::operator <<(const U &) const': could not deduce template argument for 'V'
C:\buildhome\src\third_party\webrtc\rtc_base/checks.h(235): note: or       'rtc::webrtc_checks_impl::LogStreamer<V> rtc::webrtc_checks_impl::LogStreamer<>::operator <<(U) const'
C:\buildhome\src\third_party\webrtc\logging/rtc_event_log/events/rtc_event_field_encoding.h(113): note: 'rtc::webrtc_checks_impl::LogStreamer<V> rtc::webrtc_checks_impl::LogStreamer<>::operator <<(U) const': could not deduce template argument for 'V'
dvrogozh commented 7 months ago

Just to link issues, at least partially this is caused by MSVC toolchain bug with the most recent MSVC update. See [1].

[1] https://developercommunity.visualstudio.com/t/std::declval-cannot-output-character-str/10472732?space=62&q=AVX512&sort=newest