Bug 227166

Summary: [LFC][WPE] Build failure with GCC 8.x
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WPE WebKitAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cdumez, darin, koivisto, zalan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Carlos Alberto Lopez Perez 2021-06-18 04:52:08 PDT
When building the WPE port with GCC 8.x (shipped by default on distros like Debian 10 or RHEL 8) the following build failure happens if LAYOUT_FORMATTING_CONTEXT is enabled:

Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-207b877e-6.cpp.o
[...]
In file included from WebCore/DerivedSources/unified-sources/UnifiedSource-207b877e-6.cpp:6:
../../Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp: In member function ‘void WebCore::LayoutIntegration::LineLayout::prepareLayoutState()’:
../../Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp:253:36: error: converting to ‘std::optional<WebCore::Layout::Edges>’ from initializer list would use explicit constructor ‘constexpr std::optional<_Tp>::optional(std::in_place_t, _Args&& ...) [with _Args = {}; typename std::enable_if<is_constructible_v<_Tp, _Args&& ...>, bool>::type <anonymous> = 0; _Tp = WebCore::Layout::Edges]’
     rootGeometry.setPadding({ { } });
                                    ^
../../Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp:253:36: error: converting to ‘std::in_place_t’ from initializer list would use explicit constructor ‘constexpr std::in_place_t::in_place_t()’
ninja: build stopped: subcommand failed.
Comment 1 Carlos Alberto Lopez Perez 2021-06-18 04:59:53 PDT
Created attachment 431769 [details]
Patch
Comment 2 Carlos Alberto Lopez Perez 2021-06-18 05:01:20 PDT
Created attachment 431770 [details]
Patch
Comment 3 zalan 2021-06-18 05:58:55 PDT
Comment on attachment 431770 [details]
Patch

Thanks for fixing it.
Comment 4 EWS 2021-06-18 06:38:01 PDT
Committed r279036 (238956@main): <https://commits.webkit.org/238956@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431770 [details].