Bug 184441 - [GTK][WPE] TestWTF and TestJSC fail to compile due to missing forwarding headers
Summary: [GTK][WPE] TestWTF and TestJSC fail to compile due to missing forwarding headers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-09 22:48 PDT by Fujii Hironori
Modified: 2018-07-10 11:25 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.16 KB, patch)
2018-04-09 22:51 PDT, Fujii Hironori
Hironori.Fujii: review-
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-sierra (2.27 MB, application/zip)
2018-04-09 23:54 PDT, EWS Watchlist
no flags Details
WIP patch (790 bytes, patch)
2018-04-10 20:40 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (3.31 KB, patch)
2018-04-10 21:16 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (3.31 KB, patch)
2018-07-10 01:16 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2018-04-09 22:48:12 PDT
[GTK][WPE] TestJSC fails to compile due to missing forwarding headers

It's easy to reproduce this compilation error by this command:

./Tools/Scripts/build-webkit --gtk --release --makeargs=TestJSC

> [2448/4480] Building CXX object Tools/TestWebKitAPI/C...s/TestJSC.dir/Tests/JavaScriptCore/glib/TestJSC.cpp.o
> FAILED: Tools/TestWebKitAPI/CMakeFiles/TestJSC.dir/Tests/JavaScriptCore/glib/TestJSC.cpp.o 
> /usr/lib/ccache/c++  -DBUILDING_GTK__=1 -DBUILDING_WEBKIT2__ -DBUILDING_WITH_CMAKE=1 -DDATA_DIR=\"share\" -DGETTEXT_PACKAGE=\"WebKit2GTK-4.0\" -DGTEST_HAS_RTTI=0 -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DTEST_WEBKIT2_RESOURCES_DIR=\"/home/fujii/work/webkit/ga/Tools/TestWebKitAPI/Tests/WebKit\" -DWEBKITGTK_API_VERSION_STRING=\"4.0\" -IDerivedSources/ForwardingHeaders -IDerivedSources/ForwardingHeaders/JavaScriptCore -IDerivedSources/ForwardingHeaders/JavaScriptCore/glib -IDerivedSources/JavaScriptCore/javascriptcoregtk -I../../Source/WebKit/UIProcess/API/C/soup -I../../Source/WebKit/UIProcess/API/C/gtk -I../../Source/WebKit/UIProcess/API/gtk -isystem ../DependenciesGTK/Root/include/gtk-3.0 -isystem ../DependenciesGTK/Root/include/gio-unix-2.0 -isystem ../DependenciesGTK/Root/include/cairo -isystem ../DependenciesGTK/Root/include/pango-1.0 -isystem ../DependenciesGTK/Root/include/harfbuzz -isystem ../DependenciesGTK/Root/include/gdk-pixbuf-2.0 -isystem ../DependenciesGTK/Root/include/pixman-1 -isystem ../DependenciesGTK/Root/include/freetype2 -isystem /usr/include/libpng16 -isystem ../DependenciesGTK/Root/include/libxml2 -isystem ../DependenciesGTK/Root/include/libdrm -isystem ../DependenciesGTK/Root/include/glib-2.0 -isystem ../DependenciesGTK/Root/lib/glib-2.0/include -isystem ../DependenciesGTK/Root/include/at-spi2-atk/2.0 -isystem ../DependenciesGTK/Root/include/at-spi-2.0 -isystem ../DependenciesGTK/Root/include/atk-1.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem ../DependenciesGTK/Root/include/libsoup-2.4 -I../../Tools/TestWebKitAPI -I. -I../../Source -I../../Source/JavaScriptCore -I../../Source/ThirdParty/gtest/include -I../../Source/WebKit/Platform/IPC -I../../Source/WebKit/Shared -I../../Source/WebKit/Shared/API -I../../Source/WebKit/Shared/API/c -I../../Source/WebKit/Shared/Plugins -I../../Source/WebKit/UIProcess -I../../Source/WebKit/UIProcess/API -I../../Source/WebKit/WebProcess/InjectedBundle -I../../Source/WebKit/WebProcess/InjectedBundle/API/c -I../../Source/bmalloc -IDerivedSources -I../../Source/ThirdParty -fdiagnostics-color=always -Wno-expansion-to-defined -Wno-attributes -Wno-noexcept-type -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wextra -Wall  -fno-strict-aliasing -fno-exceptions -std=c++14 -fno-rtti -O3 -DNDEBUG -fPIE   -Wno-sign-compare -Wno-undef -Wno-unused-parameter -MD -MT Tools/TestWebKitAPI/CMakeFiles/TestJSC.dir/Tests/JavaScriptCore/glib/TestJSC.cpp.o -MF Tools/TestWebKitAPI/CMakeFiles/TestJSC.dir/Tests/JavaScriptCore/glib/TestJSC.cpp.o.d -o Tools/TestWebKitAPI/CMakeFiles/TestJSC.dir/Tests/JavaScriptCore/glib/TestJSC.cpp.o -c ../../Tools/TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp
> In file included from DerivedSources/ForwardingHeaders/WebKit/WKBase.h:1:0,
>                  from ../../Source/WebKit/UIProcess/API/C/WebKit2_C.h:29,
>                  from DerivedSources/ForwardingHeaders/WebKit/WebKit2_C.h:1,
>                  from ../../Tools/TestWebKitAPI/config.h:49,
>                  from ../../Tools/TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:20:
> ../../Source/WebKit/Shared/API/c/WKBase.h:30:10: fatal error: WebKit/WKDeclarationSpecifiers.h: No such file or directory
>  #include <WebKit/WKDeclarationSpecifiers.h>
>           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 1 Fujii Hironori 2018-04-09 22:51:14 PDT
Created attachment 337593 [details]
Patch
Comment 2 EWS Watchlist 2018-04-09 23:54:49 PDT
Comment on attachment 337593 [details]
Patch

Attachment 337593 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/7264721

New failing tests:
imported/w3c/web-platform-tests/workers/name-property.html
Comment 3 EWS Watchlist 2018-04-09 23:54:50 PDT
Created attachment 337595 [details]
Archive of layout-test-results from ews102 for mac-sierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-sierra  Platform: Mac OS X 10.12.6
Comment 4 Michael Catanzaro 2018-04-10 12:55:43 PDT
Comment on attachment 337593 [details]
Patch

Does TestWebKit need both these dependencies, too?

Does TestWebCore need the PALForwardingHeaders dependency?

Why are PALForwardingHeaders special?
Comment 5 Fujii Hironori 2018-04-10 17:53:31 PDT
Tools/TestWebKitAPI/config.h includes <WebCore/PlatformExportMacros.h> and <pal/ExportMacros.h>.
https://trac.webkit.org/browser/webkit/trunk/Tools/TestWebKitAPI/config.h?rev=229029#L32

Then, TestWebKitAPI needs the forwarding headers of WebCore and PAL.

The forwarding headers of WebCore are generated by generate-forwarding-headers.pl in GTK port.
https://trac.webkit.org/browser/webkit/trunk/Tools/TestWebKitAPI/PlatformGTK.cmake?rev=229029#L8

The forwarding headers of PAL are generated by WEBKIT_MAKE_FORWARDING_HEADERS in all CMake ports.
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/PAL/pal/CMakeLists.txt?rev=229029#L53

TestWebKit and TestWebCore already has a implicit dependency to PAL because WebCore depends on PAL.
Comment 6 Fujii Hironori 2018-04-10 20:01:45 PDT
Thanks for Michael's feedback, I realised this patch doens't solve the problem for TestWTF.

> ./Tools/Scripts/build-webkit --gtk --release --makeargs=TestWTF

> + /home/fujii/work/webkit/ga/Tools/jhbuild/jhbuild-wrapper --gtk run cmake --build /home/fujii/work/webkit/ga/WebKitBuild/Release --config Release -- TestWTF
> [1043/1118] Building CXX object Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Counters.cpp.o
> FAILED: Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Counters.cpp.o 
> /usr/lib/ccache/c++  -DBUILDING_GTK__=1 -DBUILDING_WEBKIT2__ -DBUILDING_WITH_CMAKE=1 -DGETTEXT_PACKAGE=\"WebKit2GTK-4.0\" -DGTEST_HAS_RTTI=0 -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DTEST_WEBKIT2_RESOURCES_DIR=\"/home/fujii/work/webkit/ga/Tools/TestWebKitAPI/Tests/WebKit\" -DWEBKITGTK_API_VERSION_STRING=\"4.0\" -IDerivedSources/ForwardingHeaders -IDerivedSources/ForwardingHeaders/JavaScriptCore -IDerivedSources/ForwardingHeaders/JavaScriptCore/glib -IDerivedSources/JavaScriptCore/javascriptcoregtk -I../../Source/WebKit/UIProcess/API/C/soup -I../../Source/WebKit/UIProcess/API/C/gtk -I../../Source/WebKit/UIProcess/API/gtk -isystem ../DependenciesGTK/Root/include/gtk-3.0 -isystem ../DependenciesGTK/Root/include/gio-unix-2.0 -isystem ../DependenciesGTK/Root/include/cairo -isystem ../DependenciesGTK/Root/include/pango-1.0 -isystem ../DependenciesGTK/Root/include/harfbuzz -isystem ../DependenciesGTK/Root/include/gdk-pixbuf-2.0 -isystem ../DependenciesGTK/Root/include/pixman-1 -isystem ../DependenciesGTK/Root/include/freetype2 -isystem /usr/include/libpng16 -isystem ../DependenciesGTK/Root/include/libxml2 -isystem ../DependenciesGTK/Root/include/libdrm -isystem ../DependenciesGTK/Root/include/glib-2.0 -isystem ../DependenciesGTK/Root/lib/glib-2.0/include -isystem ../DependenciesGTK/Root/include/at-spi2-atk/2.0 -isystem ../DependenciesGTK/Root/include/at-spi-2.0 -isystem ../DependenciesGTK/Root/include/atk-1.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem ../DependenciesGTK/Root/include/libsoup-2.4 -I../../Tools/TestWebKitAPI -I. -I../../Source -I../../Source/JavaScriptCore -I../../Source/ThirdParty/gtest/include -I../../Source/WebKit/Platform/IPC -I../../Source/WebKit/Shared -I../../Source/WebKit/Shared/API -I../../Source/WebKit/Shared/API/c -I../../Source/WebKit/Shared/Plugins -I../../Source/WebKit/UIProcess -I../../Source/WebKit/UIProcess/API -I../../Source/WebKit/WebProcess/InjectedBundle -I../../Source/WebKit/WebProcess/InjectedBundle/API/c -I../../Source/bmalloc -IDerivedSources -I../../Source/ThirdParty -fdiagnostics-color=always -Wno-expansion-to-defined -Wno-attributes -Wno-noexcept-type -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wextra -Wall  -fno-strict-aliasing -fno-exceptions -std=c++14 -fno-rtti -O3 -DNDEBUG -fPIE   -Wno-dangling-else -Wno-sign-compare -Wno-undef -Wno-unused-parameter -MD -MT Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Counters.cpp.o -MF Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Counters.cpp.o.d -o Tools/TestWebKitAPI/CMakeFiles/TestWTF.dir/Counters.cpp.o -c ../../Tools/TestWebKitAPI/Counters.cpp
> In file included from ../../Tools/TestWebKitAPI/Counters.cpp:26:0:
> ../../Tools/TestWebKitAPI/config.h:33:10: fatal error: pal/ExportMacros.h: No such file or directory
>  #include <pal/ExportMacros.h>
Comment 7 Fujii Hironori 2018-04-10 20:34:55 PDT
(In reply to Fujii Hironori from comment #5)
> Tools/TestWebKitAPI/config.h includes <WebCore/PlatformExportMacros.h> and
> <pal/ExportMacros.h>.
> https://trac.webkit.org/browser/webkit/trunk/Tools/TestWebKitAPI/config.
> h?rev=229029#L32
> 
> Then, TestWebKitAPI needs the forwarding headers of WebCore and PAL.

It seems that config.h doesn't need to include those headers.
Comment 8 Fujii Hironori 2018-04-10 20:39:42 PDT
#include <WebCore/PlatformExportMacros.h> has been added in Bug 136521.
Comment 9 Fujii Hironori 2018-04-10 20:40:47 PDT
Created attachment 337672 [details]
WIP patch
Comment 10 Fujii Hironori 2018-04-10 21:05:10 PDT
(In reply to Fujii Hironori from comment #7)
> It seems that config.h doesn't need to include those headers.

I'm wrong. It is needed.
Comment 11 Fujii Hironori 2018-04-10 21:16:54 PDT
Created attachment 337673 [details]
Patch
Comment 12 Fujii Hironori 2018-07-10 01:16:15 PDT
Created attachment 344679 [details]
Patch

This is still happening. It's easy to reproduce. Rebased the patch onto ToT.
Comment 13 WebKit Commit Bot 2018-07-10 11:24:11 PDT
Comment on attachment 344679 [details]
Patch

Clearing flags on attachment: 344679

Committed r233692: <https://trac.webkit.org/changeset/233692>
Comment 14 WebKit Commit Bot 2018-07-10 11:24:13 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Radar WebKit Bug Importer 2018-07-10 11:25:26 PDT
<rdar://problem/42032626>