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

[qtwebengine:x64-linux] Error in chromium autofill calling FindAndConsume in re2 #44071

Open
niru-s opened this issue Feb 28, 2025 · 0 comments
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@niru-s
Copy link

niru-s commented Feb 28, 2025

Operating system

Linux Ubuntu 24.04

Compiler

GCC, G++

Steps to reproduce the behavior

Installing vcpkg qtwebengine from manifest file.
qtwebengine version 6.8.2#1

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?

@niru-s niru-s added the category:port-bug The issue is with a library, which is something the port should already support label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

No branches or pull requests

2 participants