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

Build fails with error: no matching function for call to ‘find(..)’ #3804

Closed
MathieuDuponchelle opened this issue Oct 15, 2024 · 2 comments
Labels
bug Bug report

Comments

@MathieuDuponchelle
Copy link

Building CEF 129 as part of centricular/gstcefsrc#89 fails on my end with:

/home/meh/devel/gstreamer/sandbox/gstcefsrc/third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/libcef_dll/wrapper/cef_message_router.cc: In member function ‘virtual bool {anonymous}::CefMessageRouterBrowserSideImpl::AddHandler(CefMessageRouterBrowserSide::Handler*, bool)’:
/home/meh/devel/gstreamer/sandbox/gstcefsrc/third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/libcef_dll/wrapper/cef_message_router.cc:201:18: error: no matching function for call to ‘find(std::vector<CefMessageRouterBrowserSide::Handler*>::iterator, std::vector<CefMessageRouterBrowserSide::Handler*>::iterator, CefMessageRouterBrowserSide::Handler*&)’
  201 |     if (std::find(handlers_.begin(), handlers_.end(), handler) ==
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/istream:40,
                 from /usr/include/c++/14/sstream:40,
                 from /home/meh/devel/gstreamer/sandbox/gstcefsrc/third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/include/base/cef_logging.h:183,
                 from /home/meh/devel/gstreamer/sandbox/gstcefsrc/third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/include/base/cef_ref_counted.h:51,
                 from /home/meh/devel/gstreamer/sandbox/gstcefsrc/third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/include/wrapper/cef_message_router.h:40,
                 from /home/meh/devel/gstreamer/sandbox/gstcefsrc/third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/libcef_dll/wrapper/cef_message_router.cc:5:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: ‘template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)’
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
/home/meh/devel/gstreamer/sandbox/gstcefsrc/third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/libcef_dll/wrapper/cef_message_router.cc:201:18: note:   ‘__gnu_cxx::__normal_iterator<CefMessageRouterBrowserSide::Handler**, std::vector<CefMessageRouterBrowserSide::Handler*> >’ is not derived from ‘std::istreambuf_iterator<_CharT>’
  201 |     if (std::find(handlers_.begin(), handlers_.end(), handler) ==
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/meh/devel/gstreamer/sandbox/gstcefsrc/third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/libcef_dll/wrapper/cef_message_router.cc: In member function ‘virtual bool {anonymous}::CefMessageRouterBrowserSideImpl::RemoveHandler(CefMessageRouterBrowserSide::Handler*)’:
/home/meh/devel/gstreamer/sandbox/gstcefsrc/third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/libcef_dll/wrapper/cef_message_router.cc:211:24: error: no matching function for call to ‘find(std::vector<CefMessageRouterBrowserSide::Handler*>::iterator, std::vector<CefMessageRouterBrowserSide::Handler*>::iterator, CefMessageRouterBrowserSide::Handler*&)’
  211 |     auto it = std::find(handlers_.begin(), handlers_.end(), handler);
      |               ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: ‘template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)’
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
/home/meh/devel/gstreamer/sandbox/gstcefsrc/third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/libcef_dll/wrapper/cef_message_router.cc:211:24: note:   ‘__gnu_cxx::__normal_iterator<CefMessageRouterBrowserSide::Handler**, std::vector<CefMessageRouterBrowserSide::Handler*> >’ is not derived from ‘std::istreambuf_iterator<_CharT>’
  211 |     auto it = std::find(handlers_.begin(), handlers_.end(), handler);
      |               ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-undefined-var-template’ may have been intended to silence earlier diagnostics
make[2]: *** [libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/build.make:2568: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/wrapper/cef_message_router.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:154: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

To Reproduce

Try to build the linked project

Expected behavior

The project should not fail to build but it does

Versions (please complete the following information):

  • OS: Fedora Linux 40
  • CEF Version: 129.0.10

Additional context

Manually adding #include <algorithm> in third_party/cef/cef_binary_129.0.10+ge52707f+chromium-129.0.6668.71_linux64/include/base/cef_logging.h addresses the issue

@magreenblatt
Copy link
Collaborator

Looks like a missing #include <algorithm> in cef_message_router.cc

@MathieuDuponchelle
Copy link
Author

Looks like a missing #include <algorithm> in cef_message_router.cc

Indeed, that fixes it as well, made MR thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants