[qtwebengine:x64-linux] Error in chromium autofill calling FindAndConsume in re2 #44071
Labels
category:port-bug
The issue is with a library, which is something the port should already support
Operating system
Linux Ubuntu 24.04
Compiler
GCC, G++
Steps to reproduce the behavior
Failure logs
../../../../../src/here-src-6-fc421f1193.clean/src/3rdparty/chromium/components/autofill/content/renderer/form_autofill_util.cc: In lambda function:
../../../../../src/here-src-6-fc421f1193.clean/src/3rdparty/chromium/components/autofill/content/renderer/form_autofill_util.cc:2794:36: error: no matching function for call to ‘re2::RE2::FindAndConsume(std::string_view*, re2::RE2&, std::string*)’
2794 | re2::RE2::FindAndConsume(&input, kFourDigitRegex, &match)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gen/third_party/re2/src/re2/re2.h:5,
from ../../../../../src/here-src-6-fc421f1193.clean/src/3rdparty/chromium/components/autofill/content/renderer/form_autofill_util.cc:65:
/usr/include/re2/re2.h:450:15: note: candidate: ‘template<class ... A> static bool re2::RE2::FindAndConsume(re2::StringPiece*, const re2::RE2&, A&& ...)’
450 | static bool FindAndConsume(StringPiece* input, const RE2& re, A&&... a) {
| ^~~~~~~~~~~~~~
/usr/include/re2/re2.h:450:15: note: template argument deduction/substitution failed:
../../../../../src/here-src-6-fc421f1193.clean/src/3rdparty/chromium/components/autofill/content/renderer/form_autofill_util.cc:2794:37: note: cannot convert ‘& input’ (type ‘std::string_view*’ {aka ‘std::basic_string_view’}) to type ‘re2::StringPiece’
2794 | re2::RE2::FindAndConsume(&input, kFourDigitRegex, &match)) {
Additional context
libre2-dev and libabsl-dev on the machine:
libabsl-dev is already the newest version (20220623.1-3.1ubuntu3).
libre2-dev is already the newest version (2023030-3build1).
qtwebengine portfile is using system re2 for Linux.
re2.h contains:
template <typename... A>
static bool FindAndConsume(StringPiece* input, const RE2& re, A&&... a) {
return Apply(FindAndConsumeN, input, re, Arg(std::forward(a))...);
}
The file form_auto_fill.cc has:
std::string node_text = node.NodeValue().Utf8();
std::string_view input(node_text);
std::string match;
while (matches.size() < kMaxFourDigitCombinationMatches &&
re2::RE2::FindAndConsume(&input, kFourDigitRegex, &match)) {
matches.insert(match);
}
form_auto_fill.cc is calling FindAndConsume from re2 with std::string_view whereas re2 is expecting StringPiece.
Does this need a patch? Or is there a specific version of re2 we need to install?
The text was updated successfully, but these errors were encountered: