Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914983 - dev-qt/qtwebengine-5.15.10_p20230815: build failure - class absl::string_view» has no member named «as_string»
Summary: dev-qt/qtwebengine-5.15.10_p20230815: build failure - class absl::string_view...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-30 18:41 UTC by pva
Modified: 2023-10-01 12:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info.txt,9.93 KB, text/plain)
2023-09-30 18:41 UTC, pva
Details
build.log.xz (build.log.xz,463.11 KB, application/x-xz)
2023-09-30 18:41 UTC, pva
Details
qtwebengine-5.15.10_p20230815-as_string.patch (qtwebengine-5.15.10_p20230815-as_string.patch,567 bytes, patch)
2023-09-30 18:42 UTC, pva
Details | Diff
qtwebengine-5.15.10_p20230815-re2_StringPiece_set.patch (qtwebengine-5.15.10_p20230815-re2_StringPiece_set.patch,2.52 KB, patch)
2023-09-30 20:22 UTC, pva
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pva 2023-09-30 18:41:27 UTC
dev-qt/qtwebengine-5.15.10_p20230815 fails to build with:

../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/gpu/command_buffer/service/program_manager.cc: In member funct
ion «std::string gpu::gles2::Program::ProcessLogInfo(const std::string&)»:
../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/gpu/command_buffer/service/program_manager.cc:623:25: ошибка: 
«using re2::StringPiece = class absl::string_view» {aka «class absl::string_view»} has not member named «as_string»
  623 |   return output + input.as_string();
      |                      


Looking at upstream sources[1], we see that std::string(input) now. A simple patch fixes this build failure:

-  return output + input.as_string();
+  return output + std::string(input);


Refs:
[1] https://github.com/qt/qtwebengine-chromium/blame/14780aaa6b0f85a6912878b3874c18e63c99a5d9/chromium/gpu/command_buffer/service/program_manager.cc#L617C19-L617C38
Comment 1 pva 2023-09-30 18:41:45 UTC
Created attachment 871855 [details]
emerge --info
Comment 2 pva 2023-09-30 18:41:59 UTC
Created attachment 871856 [details]
build.log.xz
Comment 3 pva 2023-09-30 18:42:24 UTC
Created attachment 871857 [details, diff]
qtwebengine-5.15.10_p20230815-as_string.patch
Comment 4 pva 2023-09-30 20:22:07 UTC
And another failure:

../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc: In member function «virtual bool extensions::FormDataParserUrlEncoded::SetSource(base::StringPiece)»:
../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc:424:11: ошибка: «using re2::StringPiece = class absl::string_view» {aka «class absl::string_view»} не содержит элемента с именем «set»
  424 |   source_.set(source.data(), source.size());
      |           ^~~
../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc: In member function «virtual bool extensions::FormDataParserMultipart::SetSource(base::StringPiece)»:
../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/extensions/browser/api/web_request/form_data_parser.cc:568:11: ошибка: «using re2::StringPiece = class absl::string_view» {aka «class absl::string_view»} не содержит элемента с именем «set»
  568 |   source_.set(source.data(), source.size());
      |           ^~~


Patch fix this issue: https://github.com/qt/qtwebengine-chromium/commit/0bfda71ae38597646a21e3141a9b95e74cc95636.patch?diff=unified
Comment 5 pva 2023-09-30 20:22:24 UTC
Created attachment 871860 [details, diff]
qtwebengine-5.15.10_p20230815-re2_StringPiece_set.patch
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-01 01:56:58 UTC
Are you using a newer version of re2 from an overlay? The plan is to switch to bundled.
Comment 7 pva 2023-10-01 06:44:22 UTC
(In reply to Sam James from comment #6)
> Are you using a newer version of re2 from an overlay? The plan is to switch
> to bundled.

Oh, I missed that re2 came from my overlay. So yes, I'm using dev-libs/re2-0.2023.06.02, which is not in the tree atm.


Anyway, I found that the build fails later on linkage with:

/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/portage/dev-qt/qtwebengine-5.15.10_p20230815/work/qtwebengine-5.15.10_p20230815_build/src/core/release/obj/gpu/config/config_sources/gpu_control_list.o: в функции «gpu::(anonymous namespace)::StringMismatch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*) [clone .part.0]»:
gpu_control_list.cc:(.text._ZN3gpu12_GLOBAL__N_114StringMismatchERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKc.part.0+0xc6): undefined reference to `re2::RE2::FullMatchN(absl::string_view, re2::RE2 const&, re2::RE2::Arg const* const*, int)'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/portage/dev-qt/qtwebengine-5.15.10_p20230815/work/qtwebengine-5.15.10_p20230815_build/src/core/release/obj/gpu/config/config_sources/gpu_control_list.o: в функции «gpu::GpuControlList::MachineModelInfo::Contains(gpu::GPUInfo const&) const»:
gpu_control_list.cc:(.text._ZNK3gpu14GpuControlList16MachineModelInfo8ContainsERKNS_7GPUInfoE+0xaa): undefined reference to `re2::RE2::FullMatchN(absl::string_view, re2::RE2 const&, re2::RE2::Arg const* const*, int)'



I looked into sources in src/3rdparty/chromium/gpu/config/gpu_control_list.cc, I found #include "third_party/re2/src/re2/re2.h", so switching to the bundled version is the best solution for this problem as I see. Thank you for pointing to the right direction.


BTW, do you have patch to try build with bundled re2?
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-01 06:54:44 UTC
(In reply to pva from comment #7)
> (In reply to Sam James from comment #6)
> > Are you using a newer version of re2 from an overlay? The plan is to switch
> > to bundled.
> 
> Oh, I missed that re2 came from my overlay. So yes, I'm using
> dev-libs/re2-0.2023.06.02, which is not in the tree atm.
> 
> 
> Anyway, I found that the build fails later on linkage with:
> 

yeah, that's why we have to switch ;)

See the huge discussion in bug 908373 and https://github.com/gentoo/gentoo/pull/31893 and https://github.com/gentoo/gentoo/pull/31388.

> [...]
> 
> BTW, do you have patch to try build with bundled re2?

Not tried yet, please let me know if you do though.